feat:收银台区分标识返回页面

This commit is contained in:
2026-06-08 13:20:45 +08:00
parent 84ffbdee47
commit 65c229c37b
5 changed files with 34 additions and 4 deletions
+2 -1
View File
@@ -14,4 +14,5 @@
- 选品广场结算返回到我的店铺页
- 点底部 tab 的`AI店铺`时没开通就不跳转并提示
- `会员优选`商品卡片点击不再跳转到商品详情页
- 购物车为空时:底部不显示“去结算”
- 购物车为空时:底部不显示“去结算”
- 会员专区→买商品→支付→支付结果→返回首页「选品广场」;选品广场→买商品→支付→支付结果→返回首页「我的店铺」
+9 -3
View File
@@ -74,6 +74,7 @@
let payOrderId = ref('');
let orderInfo = ref({});
const userWallet = ref();
const returnTo = ref('');
let totalRecharge = ref();
// 检测支付环境
@@ -175,6 +176,7 @@
id.value = options.id || '';
payOrderId.value = options.payOrderId || '';
type.value = options.type || '';
returnTo.value = options.returnTo || '';
if (type.value == 2) {
state.orderType = 'aiRecharge';
@@ -206,9 +208,13 @@
sheep.$helper.toast('请选择余额支付');
return;
}
if (state.orderType === 'aiGoods') {
uni.setStorageSync('pay_return_to', 'aiStore_myshop');
}
if (returnTo.value) {
uni.setStorageSync('pay_return_to', returnTo.value);
} else if (String(type.value) === '2') {
uni.setStorageSync('pay_return_to', 'aiStore_plaza');
} else if (state.orderType === 'aiGoods') {
uni.setStorageSync('pay_return_to', 'aiStore_myshop');
}
if (state.payment === 'wallet') {
uni.showModal({
title: '提示',
+7
View File
@@ -97,6 +97,7 @@
let payOrderId = ref('');
let orderInfo = ref({});
const userWallet = ref();
const returnTo = ref('');
let totalRecharge = ref();
// 检测支付环境
@@ -197,6 +198,7 @@
id.value = options.id || '';
payOrderId.value = options.payOrderId || '';
type.value = options.type || '';
returnTo.value = options.returnTo || '';
if (type.value == 2) {
state.orderType = 'aiRecharge';
@@ -228,6 +230,11 @@
sheep.$helper.toast('请选择余额支付');
return;
}
if (returnTo.value) {
uni.setStorageSync('pay_return_to', returnTo.value);
} else if (state.orderType === 'aiGoods') {
uni.setStorageSync('pay_return_to', 'aiStore_myshop');
}
if (state.payment === 'wallet') {
uni.showModal({
title: '提示',
+1
View File
@@ -94,6 +94,7 @@
proxy.utils.go('/pages/AI/giftCashierDesk', {
id: res.data.id,
payOrderId: res.data.payOrderId,
returnTo: 'aiStore_plaza',
});
}, 1000);
}
+15
View File
@@ -131,6 +131,16 @@
});
};
const goAiStorePlazaTab = () => {
const url = '/pages/index/aiStore';
uni.redirectTo({
url,
fail: () => {
uni.reLaunch({ url });
},
});
};
const onBackHome = () => {
const returnTo = uni.getStorageSync('pay_return_to');
if (returnTo === 'aiStore_myshop') {
@@ -138,6 +148,11 @@
goAiStoreMyShopTab();
return;
}
if (returnTo === 'aiStore_plaza') {
uni.removeStorageSync('pay_return_to');
goAiStorePlazaTab();
return;
}
const orderType = String(state.orderType || '').trim();
if (orderType === 'aiGoods') {
goAiStoreMyShopTab();