From 1f332bc06f622cda2bf343da60b3d89a6d96a1e4 Mon Sep 17 00:00:00 2001 From: 15093570141 <141405260+17521612761@users.noreply.github.com> Date: Fri, 8 Nov 2024 11:43:12 +0800 Subject: [PATCH] =?UTF-8?q?uniapp=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=EF=BC=9A=20=E5=85=B3=E4=BA=8E=E4=B8=8B=E5=8D=95=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E9=9D=9E=E5=BF=AB=E9=80=92=E7=89=A9=E6=B5=81=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CoreShop/pages/order/submit/submit.vue | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/order/submit/submit.vue b/CoreCms.Net.Uni-App/CoreShop/pages/order/submit/submit.vue index 3525e6f9..6c90bb69 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/order/submit/submit.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/order/submit/submit.vue @@ -261,16 +261,18 @@ success : Function, file : Function, } - + + interface TabList { + name : string, + type : OrderDistributionEnum; + show : boolean; + } + /** 获取项目配置 */ const shopConfigStore : ShopConfigStoreType = useShopConfigStore(); const state = reactive<{ orderType : PaymentTypeEnum; // 订单类型 - tabList : Array<{ // 送达方式 - name : string, - type : number; - show : boolean; - }>; + tabList : Array; // 送达方式 tabSelectType : OrderDistributionEnum; // 送达方式类型 userDefaultShip : AddressType; // 默认地址数据 leaveMsg : string; // 卖家留言 @@ -291,9 +293,9 @@ }>({ orderType: PaymentTypeEnum.common, tabList: [ - { name: '快递物流', type: 1, show: true, }, - { name: '同城配送', type: 2, show: true, }, - { name: '门店自提', type: 3, show: true, } + { name: '快递物流', type: OrderDistributionEnum.mailing, show: true, }, + { name: '同城配送', type: OrderDistributionEnum.homeDelivery, show: true, }, + { name: '门店自提', type: OrderDistributionEnum.selfDelivery, show: true, } ], tabSelectType: OrderDistributionEnum.mailing, userDefaultShip: {}, @@ -318,6 +320,7 @@ const loadingPage = ref(true); const handleSubmit = useLoadingFn(onSubmit, loading); const handleGetOrderDetail = useLoadingFn(getOrderDetail, loadingPage); + /** 是否显示积分兑换价合计 */ const isShowPointRedemptionPrice = computed(() => { return shopConfigStore.config.pointSwitch == OpenPointEnum.yes && @@ -469,6 +472,8 @@ state.tabList[1].show = orderDistribution?.data?.isOpenHomeDelivery; /** 门店自提 */ state.tabList[2].show = orderDistribution?.data?.isOpenSelfDelivery; + + state.tabSelectType = (state.tabList.find((item:TabList)=> item.show)).type || OrderDistributionEnum.mailing ; } /** 获取用户默认地址 */