Эх сурвалжийг харах

feat(djk): 更新大健康模块订单详情和确认页面功能

- 修改加油功能在审核状态下的显示逻辑
- 优化大健康确认订单页面参数传递方式,从传递完整对象改为传递goodsId
- 新增getGoodsDetaile方法获取商品详情信息
- 更新订单详情页面,将硬编码的30天有效期替换为动态获取的effectiveTime
- 同步更新SMQJH组件中订单信息的有效期显示
zhangtao 2 өдөр өмнө
parent
commit
219c902aa4

+ 8 - 3
src/subPack-djk/confirmOrder/index.vue

@@ -13,16 +13,21 @@ const phone = ref(useUserStore().userInfo.mobile)
 const isEdit = ref(false)
 const points = ref(0)
 const price = ref(0)
+const goodsId = ref()
 onLoad((options: any) => {
-  console.log(options.order)
-  orderInfo.value = JSON.parse(options.order)
-  getCore()
+  goodsId.value = options.order
+  getGoodsDetaile()
 })
 async function getCore() {
   const res = await Apis.djk.djkAppletOrderConfirm({ data: { goodsId: orderInfo.value?.id, channelId: useUserStore().userInfo.channelId } })
   points.value = res.data.points
   price.value = res.data.price
 }
+async function getGoodsDetaile() {
+  const res = await Apis.djk.goodsInfo({ data: { goodsId: goodsId.value } })
+  orderInfo.value = res.data
+  getCore()
+}
 async function handlePay() {
   if (!orderInfo.value) {
     useGlobalToast().show({ msg: '网络异常!请联系客服' })

+ 1 - 1
src/subPack-djk/goodsinfo/index.vue

@@ -50,7 +50,7 @@ function handlePhone() {
 }
 async function handlePay() {
   await useUserStore().checkLogin()
-  router.push({ name: 'djk-confirmOrder', params: { order: JSON.stringify(goodsInfo.value) } })
+  router.push({ name: 'djk-confirmOrder', params: { order: goodsId.value } })
 }
 </script>
 

+ 2 - 2
src/subPack-djk/orderDetaile/index.vue

@@ -84,7 +84,7 @@ function handlePhone() {
     v-if="orderInfo" class="page-xsb"
   >
     <wd-navbar
-      title="订单详情" :bordered="false" :z-index="99" safe-area-inset-top placeholder left-arrow fixed
+      title="订单详情" :bordered="false" :z-index="99" safe-area-inset-top left-arrow placeholder fixed
       @click-left="router.back()"
     />
     <view class="relative z-90 box-border bg-[#f6f6f6] px-24rpx">
@@ -250,7 +250,7 @@ function handlePhone() {
           退款规则
         </view>
         <view class="mt20rpx text-24rpx">
-          支付成功后,服务有效期为30
+          支付成功后,服务有效期为{{ orderInfo.djkOrderAttachInfo?.effectiveTime }}
         </view>
         <view class="mt20rpx text-24rpx">
           有效期内可自主申请退款

+ 1 - 1
src/subPack-smqjh/components/djk-order/index.vue

@@ -95,7 +95,7 @@ async function handleAfterSale(item: Api.xsbOrderList) {
               订单号:{{ order.djkOrderAttachInfo?.orderNumber }}
             </view>
             <view class="mt5rpx">
-              ¥{{ order.djkOrderAttachInfo?.price }} 有效期30
+              ¥{{ order.djkOrderAttachInfo?.price }} 有效期{{ order.djkOrderAttachInfo?.effectiveTime }}
             </view>
             <view class="mt5rpx">
               {{ phoneFormat(String(order.consigneeMobile)) }}