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