优化积分模块
This commit is contained in:
@@ -88,7 +88,7 @@ function reachBottom() {
|
||||
}
|
||||
|
||||
// 积分:商品:列表
|
||||
async function pointsGoodsPageAjax(page = listData.page) {
|
||||
async function pointsGoodsPageAjax(page = listData.page, isPull = false) {
|
||||
try {
|
||||
const res = await pointsGoodsPage({
|
||||
page: page,
|
||||
@@ -107,6 +107,15 @@ async function pointsGoodsPageAjax(page = listData.page) {
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
if (isPull) {
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: '刷新成功',
|
||||
icon: 'none'
|
||||
});
|
||||
uni.stopPullDownRefresh();
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
|
||||
// 状态修改
|
||||
|
||||
@@ -109,7 +109,7 @@ const tabs = ref([
|
||||
label: '已完成'
|
||||
},
|
||||
{
|
||||
value: '退款中',
|
||||
value: '已退款',
|
||||
label: '售后'
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -48,7 +48,7 @@ function reachBottom() {
|
||||
}
|
||||
|
||||
// 获取用户所有门店下积分列表
|
||||
async function pointUserPageAjax(page = listData.page) {
|
||||
async function pointUserPageAjax(page = listData.page, isPull = false) {
|
||||
try {
|
||||
const res = await pointUserPage({
|
||||
page: page,
|
||||
@@ -67,6 +67,15 @@ async function pointUserPageAjax(page = listData.page) {
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
if (isPull) {
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: '刷新成功',
|
||||
icon: 'none'
|
||||
});
|
||||
uni.stopPullDownRefresh();
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
|
||||
// 去积分详情
|
||||
|
||||
@@ -91,13 +91,13 @@ onPullDownRefresh(() => {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
// productPageRef.value.reachBottom();
|
||||
productPageRef.value.pointsGoodsPageAjax(1, true);
|
||||
break;
|
||||
case 2:
|
||||
recordRef.value.goodsRecordPageAjax(1, true);
|
||||
break;
|
||||
case 3:
|
||||
// userRecordRef.value.reachBottom();
|
||||
userRecordRef.value.pointUserPageAjax(1, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user