下拉刷新

parent e9e29550
...@@ -223,7 +223,9 @@ function refresh() { ...@@ -223,7 +223,9 @@ function refresh() {
} }
onPullDownRefresh(() => { onPullDownRefresh(() => {
refresh().then(() => { refresh().then(() => {
getMerchantList(); getMerchantList().then(() => {
xma.stopPullDownRefresh();
});
}); });
}); });
// 根据父级分类id查询子分类列表 // 根据父级分类id查询子分类列表
...@@ -242,6 +244,7 @@ function jumpProductDetails(prodId) { ...@@ -242,6 +244,7 @@ function jumpProductDetails(prodId) {
} }
const prodSpecialFn = () => { const prodSpecialFn = () => {
prodSpecial({ categoryId: categoryId.value }).then((res) => { prodSpecial({ categoryId: categoryId.value }).then((res) => {
if (res.data.data) {
res.data.data = res.data.data.map((el) => { res.data.data = res.data.data.map((el) => {
if (el.labels && el.labels !== '') { if (el.labels && el.labels !== '') {
el.labels = el.labels.split(','); el.labels = el.labels.split(',');
...@@ -249,6 +252,7 @@ const prodSpecialFn = () => { ...@@ -249,6 +252,7 @@ const prodSpecialFn = () => {
return el; return el;
}); });
topDiscountedProducts.value = res.data.data; topDiscountedProducts.value = res.data.data;
}
}); });
}; };
const choice = (index) => { const choice = (index) => {
...@@ -300,14 +304,9 @@ const getMerchantList = () => { ...@@ -300,14 +304,9 @@ const getMerchantList = () => {
item.labels = item.labels.split(','); item.labels = item.labels.split(',');
} }
}); });
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(() => {}, 500);
setTimeout(() => {
resolve();
}, 500);
});
}); });
}; };
function getLocationFn() { function getLocationFn() {
......
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