增加了下拉刷新

parent 48e969bf
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
{ {
"path": "pages/index/foodClassification", "path": "pages/index/foodClassification",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": "",
"enablePullDownRefresh": true
} }
}, },
{ {
...@@ -84,37 +85,32 @@ ...@@ -84,37 +85,32 @@
"style": { "style": {
"navigationBarTitleText": "美食评论" "navigationBarTitleText": "美食评论"
} }
} },
,
{ {
"path": "pages/order/refund", "path": "pages/order/refund",
"style": { "style": {
"navigationBarTitleText": "申请退款" "navigationBarTitleText": "申请退款"
} }
} },
,
{ {
"path": "pages/index/coupon", "path": "pages/index/coupon",
"style": { "style": {
"navigationBarTitleText": "优惠券详情", "navigationBarTitleText": "优惠券详情",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
} },
,
{ {
"path": "pages/storeEntry/index", "path": "pages/storeEntry/index",
"style": { "style": {
"navigationBarTitleText": "我的店铺" "navigationBarTitleText": "我的店铺"
} }
} },
,
{ {
"path": "pages/storeEntry/detail", "path": "pages/storeEntry/detail",
"style": { "style": {
"navigationBarTitleText": "商家入驻" "navigationBarTitleText": "商家入驻"
} }
} },
,
{ {
"path": "pages/order/afterSales", "path": "pages/order/afterSales",
"style": { "style": {
......
...@@ -129,8 +129,8 @@ const params = ref({ ...@@ -129,8 +129,8 @@ const params = ref({
size: 15, size: 15,
// lon, // lon,
// lat, // lat,
lon: 106.68650025025502, lon: '',
lat: 26.567192352601154, lat: '',
isEnd: false, isEnd: false,
}); });
const pics = ref(null); const pics = ref(null);
...@@ -221,6 +221,11 @@ function refresh() { ...@@ -221,6 +221,11 @@ function refresh() {
resolve(); resolve();
}); });
} }
onPullDownRefresh(() => {
refresh().then(() => {
getMerchantList();
});
});
// 根据父级分类id查询子分类列表 // 根据父级分类id查询子分类列表
const query = (parentId) => { const query = (parentId) => {
getByParentId(parentId).then((res) => { getByParentId(parentId).then((res) => {
...@@ -298,6 +303,7 @@ const getMerchantList = () => { ...@@ -298,6 +303,7 @@ const getMerchantList = () => {
return new Promise((resolve) => { return new Promise((resolve) => {
cardData.value = cardData.value.concat(res.data.content); cardData.value = cardData.value.concat(res.data.content);
xma.hideLoading(); xma.hideLoading();
xma.stopPullDownRefresh();
setTimeout(() => { setTimeout(() => {
resolve(); resolve();
}, 500); }, 500);
......
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