下拉刷新

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