feat: 区分普通订单和ai订单的查看物流
This commit is contained in:
+23
-6
@@ -230,11 +230,12 @@
|
||||
const pickUpVerifyRef = ref();
|
||||
|
||||
const isAiActionOrder = computed(() => {
|
||||
const orderType = Number(state.orderInfo?.type ?? state.orderType ?? 0);
|
||||
return (
|
||||
String(state.source) === 'aishop' ||
|
||||
String(state.orderType) === '5' ||
|
||||
String(state.orderInfo?.__source) === 'aishop' ||
|
||||
Number(state.orderInfo?.type) === 5
|
||||
orderType === 4 ||
|
||||
orderType === 5
|
||||
);
|
||||
});
|
||||
|
||||
@@ -321,8 +322,10 @@
|
||||
const showBottomBar = computed(() => {
|
||||
if (!isAiActionOrder.value) return true;
|
||||
const status = Number(state.orderInfo?.status);
|
||||
if ([0, 15, 20].includes(status)) return true;
|
||||
if (!isAiStoreOrder.value) return false;
|
||||
// 有物流信息(需要展示"查看物流")时,强制显示底部按钮栏
|
||||
if (hasLogistics.value) return true;
|
||||
if ([0, 15, 20, 30].includes(status)) return true;
|
||||
if (!isAiStoreOrder.value) return hasLogistics.value;
|
||||
if (isPickUpOrder.value) return false;
|
||||
if (hasDelayedItems.value) return true;
|
||||
return [10, 15, 50, 70].includes(status);
|
||||
@@ -565,8 +568,15 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 店铺订单(source=aishop)、入店订单(type=4)、赠送店铺订单(type=5) 一律弹窗查看物流;只有普通商城订单走原生跳转
|
||||
const orderType = Number(state.orderInfo?.type ?? state.orderType ?? 0);
|
||||
if (orderType !== 0 && isAiStoreOrder.value && !isPickUpOrder.value) {
|
||||
const isStoreOrGiftOrInStore =
|
||||
isAiStoreOrder.value || orderType === 4 || orderType === 5;
|
||||
if (!isStoreOrGiftOrInStore) {
|
||||
sheep.$router.go('/pages/order/express/log', { id });
|
||||
return;
|
||||
}
|
||||
if (!isPickUpOrder.value) {
|
||||
expressListPopupRef.value?.open?.();
|
||||
return;
|
||||
}
|
||||
@@ -582,8 +592,15 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 店铺订单(source=aishop)、入店订单(type=4)、赠送店铺订单(type=5) 一律弹窗查看物流;只有普通商城订单走原生跳转
|
||||
const orderType = Number(state.orderInfo?.type ?? state.orderType ?? 0);
|
||||
if (orderType !== 0 && !isPickUpOrder.value) {
|
||||
const isStoreOrGiftOrInStore =
|
||||
isAiStoreOrder.value || orderType === 4 || orderType === 5;
|
||||
if (!isStoreOrGiftOrInStore) {
|
||||
sheep.$router.go('/pages/order/express/log', { id });
|
||||
return;
|
||||
}
|
||||
if (!isPickUpOrder.value) {
|
||||
expressListPopupRef.value?.open?.();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user