优化积分模块

This commit is contained in:
gyq
2025-12-15 09:17:31 +08:00
parent ade25a0880
commit b6d4715655
4 changed files with 23 additions and 5 deletions

View File

@@ -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);
}
}
// 状态修改

View File

@@ -109,7 +109,7 @@ const tabs = ref([
label: '已完成'
},
{
value: '退款',
value: '退款',
label: '售后'
}
]);

View File

@@ -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);
}
}
// 去积分详情

View File

@@ -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;