下拉刷新

parent fdab40c4
...@@ -64,7 +64,8 @@ ...@@ -64,7 +64,8 @@
{ {
"path": "pages/index/listFood", "path": "pages/index/listFood",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": "",
"enablePullDownRefresh": true
} }
}, },
{ {
...@@ -184,7 +185,8 @@ ...@@ -184,7 +185,8 @@
{ {
"path": "pages/assistingAgriculture/commentList/index", "path": "pages/assistingAgriculture/commentList/index",
"style": { "style": {
"navigationBarTitleText": "评价列表" "navigationBarTitleText": "评价列表",
"enablePullDownRefresh": true
} }
}, },
{ {
......
...@@ -159,6 +159,7 @@ const getCommentListFn = () => { ...@@ -159,6 +159,7 @@ const getCommentListFn = () => {
}); });
getCommentList(commentParameters).then((res) => { getCommentList(commentParameters).then((res) => {
xma.hideLoading(); xma.hideLoading();
xma.stopPullDownRefresh();
total = res.data.total; total = res.data.total;
res.data.records.forEach((v) => { res.data.records.forEach((v) => {
v.avatar = imgUrl + v.avatar; v.avatar = imgUrl + v.avatar;
...@@ -183,6 +184,11 @@ const choice = (i, type) => { ...@@ -183,6 +184,11 @@ const choice = (i, type) => {
commentParameters.type = type; commentParameters.type = type;
getCommentListFn(); getCommentListFn();
}; };
onPullDownRefresh(() => {
reset();
getEvalStatisFn();
getCommentListFn();
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -114,6 +114,7 @@ const getShop = async () => { ...@@ -114,6 +114,7 @@ const getShop = async () => {
params.lng = lon; params.lng = lon;
params.lat = lat; params.lat = lat;
getShopAndProdPage(params).then((res) => { getShopAndProdPage(params).then((res) => {
xma.stopPullDownRefresh();
xma.hideLoading(); xma.hideLoading();
total = res.data.total; total = res.data.total;
res.data.records.forEach((item) => { res.data.records.forEach((item) => {
...@@ -126,6 +127,7 @@ const getShop = async () => { ...@@ -126,6 +127,7 @@ const getShop = async () => {
}; };
onPullDownRefresh(() => { onPullDownRefresh(() => {
reset();
getCoupons(); getCoupons();
getShop(); getShop();
}); });
......
...@@ -203,8 +203,8 @@ const getMerchantList = async () => { ...@@ -203,8 +203,8 @@ const getMerchantList = async () => {
listParams.lat = lat; listParams.lat = lat;
merchantList(listParams).then((res) => { merchantList(listParams).then((res) => {
xma.hideLoading(); xma.hideLoading();
xma.stopPullDownRefresh();
total = res.data.totalElements; total = res.data.totalElements;
xma.hideLoading();
console.log('商家列表', res); console.log('商家列表', res);
res.data.content.forEach((item) => { res.data.content.forEach((item) => {
item.shopLogo = import.meta.env.VITE_APP_IMG_URL + item.shopLogo; item.shopLogo = import.meta.env.VITE_APP_IMG_URL + item.shopLogo;
...@@ -262,6 +262,10 @@ onPageScroll((e) => { ...@@ -262,6 +262,10 @@ onPageScroll((e) => {
title.value = ''; title.value = '';
} }
}); });
onPullDownRefresh(() => {
reset();
getMerchantList();
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment