瀏覽代碼

feat(attractions): 优化订单详情及支付流程功能

- 修正api类型定义,将取消退款记录由数组改为单个对象
- 修改订单列表显示价格字段,从actualTotal改为total
- 新增重新预订功能,支持订单详情页点击重新预订按钮跳转
- 在订单详情状态组件中添加重新预订按钮,状态为60时显示
- 修复订单详情退款申请信息显示,完善取消记录字段绑定
- 调整支付失败异常处理中的页面路径到正确子包路径
- 更新配置文件内开发和体验环境接口地址注释状态
- 修正manifest.json末尾多余括号问题
zouzexu 2 天之前
父節點
當前提交
e9e1848b8e

+ 1 - 1
src/api/api.type.d.ts

@@ -3709,7 +3709,7 @@ namespace Api {
     /**
      * 取消退款记录列表
      */
-    cancelRecords?: OmsScenicOrderCancel[]
+    cancelRecords?: OmsScenicOrderCancel
     /**
      * 取消时间
      */

+ 5 - 5
src/config/index.ts

@@ -2,26 +2,26 @@ const mapEnvVersion = {
   /**
    * 开发版
    */
-  develop: 'http://192.168.1.166:8080', // 张
+  // develop: 'http://192.168.1.166:8080', // 张
   // develop: 'http://192.168.1.101:8080',
   // develop: 'http://192.168.0.157:8080',
   // develop: 'http://192.168.1.253:8080',
   // develop: 'http://192.168.0.19:8080', // 邓
   // develop: 'http://192.168.0.217:8080', // 黄
   // develop: 'http://192.168.0.11:8080', // 王
-  // develop: 'http://192.168.1.89:8080', // 田
+  develop: 'http://192.168.1.89:8080', // 田
   // develop: 'http://74949mkfh190.vicp.fun', // 付
   // develop: 'http://47.109.84.152:8081',
   // develop: 'https://5ed0f7cc.r9.vip.cpolar.cn',
-  develop: 'https://smqjh.api.zswlgz.com',
+  // develop: 'https://smqjh.api.zswlgz.com',
   /**
    * 体验版
    */
   // trial: "http://192.168.1.166:8080/jeecg-boot",
   // trial: 'http://192.168.0.157:8080',
-  // trial: 'http://47.109.84.152:8081',
+  trial: 'http://47.109.84.152:8081',
   // trial: 'http://192.168.1.166:8080,
-  trial: 'https://smqjh.api.zswlgz.com',
+  // trial: 'https://smqjh.api.zswlgz.com',
   /**
    * 正式版
    */

+ 16 - 7
src/subPack-attractions/attractionsOrderDetail/attractionsOrderDetail.vue

@@ -73,6 +73,15 @@ function handleGoPay() {
   })
 }
 
+function handleRebook() {
+  router.push({
+    name: 'attractions-detail',
+    params: {
+      productNo: String(orderInfo.value?.scenicOrder?.productNo),
+    },
+  })
+}
+
 const isCancel = computed(() => statusValue.value === 0)
 
 /** 取消订单 / 申请退款 */
@@ -153,7 +162,7 @@ function orderDetailBack() {
     <view :style="{ height: `${(Number(statusBarHeight) || 44) + MenuButtonHeight + 30}px` }" />
     <view v-if="orderInfo" class="px-24rpx">
       <view class="rounded-16rpx bg-#FFF p-24rpx">
-        <OrderDetailStatus v-if="!hasVoucher" :status="statusValue" @pay="handleGoPay" />
+        <OrderDetailStatus v-if="!hasVoucher" :status="statusValue" @pay="handleGoPay" @rebook="handleRebook" />
         <view class="flex items-center justify-between gap-50rpx text-32rpx font-bold">
           <view>{{ orderInfo.scenicOrder?.productName }}</view>
           <view class="w-100rpx text-24rpx text-#9ED605" @click="router.push({ name: 'attractions-detail', params: { productNo: String(orderInfo.scenicOrder?.productNo) } })">
@@ -305,7 +314,7 @@ function orderDetailBack() {
           </view>
         </view>
       </view>
-      <view v-if="orderInfo.cancelTime" class="mt-20rpx rounded-16rpx bg-#FFF p-24rpx">
+      <view v-if="orderInfo.cancelRecords?.cancelId" class="mt-20rpx rounded-16rpx bg-#FFF p-24rpx">
         <view class="text-28rpx font-bold">
           退款申请
         </view>
@@ -314,7 +323,7 @@ function orderDetailBack() {
             申请时间
           </view>
           <view class="text-28rpx font-bold">
-            {{ orderInfo.cancelTime }}
+            {{ orderInfo.cancelRecords?.createTime }}
           </view>
         </view>
         <view class="mt-28rpx flex items-center justify-between">
@@ -322,7 +331,7 @@ function orderDetailBack() {
             申请说明
           </view>
           <view class="text-28rpx font-bold">
-            {{ orderInfo.cancelReason || '--' }}
+            {{ orderInfo.cancelRecords?.cancelReason || '--' }}
           </view>
         </view>
         <view class="mt-28rpx flex items-center justify-between">
@@ -330,13 +339,13 @@ function orderDetailBack() {
             处理状态
           </view>
           <view v-if="orderInfo.cancelRecords" class="text-28rpx font-bold">
-            <text v-if="orderInfo.cancelRecords[0]?.cancelState === 0">
+            <text v-if="orderInfo.cancelRecords?.cancelState === 0">
               申请中
             </text>
-            <text v-if="orderInfo.cancelRecords[0]?.cancelState === 1">
+            <text v-if="orderInfo.cancelRecords?.cancelState === 1">
               通过
             </text>
-            <text v-if="orderInfo.cancelRecords[0]?.cancelState === 2">
+            <text v-if="orderInfo.cancelRecords?.cancelState === 2">
               拒绝
             </text>
           </view>

+ 1 - 1
src/subPack-attractions/attractionsOrderPay/attractionsOrderPay.vue

@@ -36,7 +36,7 @@ async function submitPay() {
       router.replace({ name: 'attractions-order-detail', params: { orderNo: String(payPreviewInfo.value?.orderNumber), ispay: 'true' } })
     }
     catch {
-      await useUserStore().payError('xsb-order', 'subPack-xsb/commonTab/index')
+      await useUserStore().payError('xsb-order', 'subPack-attractions/commonTab/index')
     }
   }
   else {

+ 6 - 0
src/subPack-attractions/components/orderDetailStatus.vue

@@ -8,6 +8,7 @@ const props = defineProps<{
 
 const emit = defineEmits<{
   (e: 'pay'): void
+  (e: 'rebook'): void
 }>()
 
 const currentStatus = computed(() => {
@@ -31,6 +32,11 @@ const currentStatus = computed(() => {
         去支付
       </wd-button>
     </view>
+    <view v-if="props.status === 60" class="mt-20rpx">
+      <wd-button class="w-456rpx" type="primary" @click="emit('rebook')">
+        重新预订
+      </wd-button>
+    </view>
     <view class="mt-24rpx flex items-center justify-center gap-10rpx" @click="router.push({ name: 'attractions-tabbar', params: { tabbar: '1' } })">
       <text class="text-28rpx">
         查看订单列表

+ 1 - 1
src/subPack-smqjh/components/attractions-orderList/attractions-orderList.vue

@@ -63,7 +63,7 @@ const statusInfo = computed(() => {
         </text>
         <text class="text-bold text-32rpx text-#FF4A39">
-          {{ order?.actualTotal }}
+          {{ order?.total }}
         </text>
       </view>
     </view>