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
+1
View File
@@ -15,3 +15,4 @@
- 点底部 tab 的`AI店铺`时没开通就不跳转并提示 - 点底部 tab 的`AI店铺`时没开通就不跳转并提示
- `会员优选`商品卡片点击不再跳转到商品详情页 - `会员优选`商品卡片点击不再跳转到商品详情页
- 购物车为空时:底部不显示“去结算” - 购物车为空时:底部不显示“去结算”
- 会员专区→买商品→支付→支付结果→返回首页「选品广场」;选品广场→买商品→支付→支付结果→返回首页「我的店铺」
+7 -1
View File
@@ -74,6 +74,7 @@
let payOrderId = ref(''); let payOrderId = ref('');
let orderInfo = ref({}); let orderInfo = ref({});
const userWallet = ref(); const userWallet = ref();
const returnTo = ref('');
let totalRecharge = ref(); let totalRecharge = ref();
// 检测支付环境 // 检测支付环境
@@ -175,6 +176,7 @@
id.value = options.id || ''; id.value = options.id || '';
payOrderId.value = options.payOrderId || ''; payOrderId.value = options.payOrderId || '';
type.value = options.type || ''; type.value = options.type || '';
returnTo.value = options.returnTo || '';
if (type.value == 2) { if (type.value == 2) {
state.orderType = 'aiRecharge'; state.orderType = 'aiRecharge';
@@ -206,7 +208,11 @@
sheep.$helper.toast('请选择余额支付'); sheep.$helper.toast('请选择余额支付');
return; return;
} }
if (state.orderType === 'aiGoods') { 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'); uni.setStorageSync('pay_return_to', 'aiStore_myshop');
} }
if (state.payment === 'wallet') { if (state.payment === 'wallet') {
+7
View File
@@ -97,6 +97,7 @@
let payOrderId = ref(''); let payOrderId = ref('');
let orderInfo = ref({}); let orderInfo = ref({});
const userWallet = ref(); const userWallet = ref();
const returnTo = ref('');
let totalRecharge = ref(); let totalRecharge = ref();
// 检测支付环境 // 检测支付环境
@@ -197,6 +198,7 @@
id.value = options.id || ''; id.value = options.id || '';
payOrderId.value = options.payOrderId || ''; payOrderId.value = options.payOrderId || '';
type.value = options.type || ''; type.value = options.type || '';
returnTo.value = options.returnTo || '';
if (type.value == 2) { if (type.value == 2) {
state.orderType = 'aiRecharge'; state.orderType = 'aiRecharge';
@@ -228,6 +230,11 @@
sheep.$helper.toast('请选择余额支付'); sheep.$helper.toast('请选择余额支付');
return; 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') { if (state.payment === 'wallet') {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
+1
View File
@@ -94,6 +94,7 @@
proxy.utils.go('/pages/AI/giftCashierDesk', { proxy.utils.go('/pages/AI/giftCashierDesk', {
id: res.data.id, id: res.data.id,
payOrderId: res.data.payOrderId, payOrderId: res.data.payOrderId,
returnTo: 'aiStore_plaza',
}); });
}, 1000); }, 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 onBackHome = () => {
const returnTo = uni.getStorageSync('pay_return_to'); const returnTo = uni.getStorageSync('pay_return_to');
if (returnTo === 'aiStore_myshop') { if (returnTo === 'aiStore_myshop') {
@@ -138,6 +148,11 @@
goAiStoreMyShopTab(); goAiStoreMyShopTab();
return; return;
} }
if (returnTo === 'aiStore_plaza') {
uni.removeStorageSync('pay_return_to');
goAiStorePlazaTab();
return;
}
const orderType = String(state.orderType || '').trim(); const orderType = String(state.orderType || '').trim();
if (orderType === 'aiGoods') { if (orderType === 'aiGoods') {
goAiStoreMyShopTab(); goAiStoreMyShopTab();