فهرست منبع

Merge branch 'iteration-20250331-tenant'

lex-xin 2 ماه پیش
والد
کامیت
c7b1fe2c1a
2فایلهای تغییر یافته به همراه11 افزوده شده و 11 حذف شده
  1. 3 2
      src/tenant/music/coursewarePlay/index.tsx
  2. 8 9
      src/views/order-detail/index.tsx

+ 3 - 2
src/tenant/music/coursewarePlay/index.tsx

@@ -402,6 +402,7 @@ export default defineComponent({
 
     /** 从搜索页面来的 */
     const getSearchDetail = async (params: { type?: string, id?: any, search?: string }) => {
+      data.searchLoading = true
       try {
         const res = await request.get(
           state.platformApi +
@@ -553,6 +554,8 @@ export default defineComponent({
         return true
       } catch (error) {
         console.log(error);
+      } finally {
+        data.searchLoading = false
       }
     }
 
@@ -1367,7 +1370,6 @@ export default defineComponent({
                   toggleMaterial(res.itemActive);
                 }}
                 onHandleSearch={async (val: any) => {
-                  data.searchLoading = true
                   detailTempSearchList.value = []
                   if(data.source === 'search') {
                     await getSearchDetail({
@@ -1382,7 +1384,6 @@ export default defineComponent({
                     })
                   }
                   data.searchTemp = val.search;
-                  data.searchLoading = false
                 }} /> :
                 <Points
                 data={data.knowledgePointList}

+ 8 - 9
src/views/order-detail/index.tsx

@@ -190,7 +190,7 @@ export default defineComponent({
     // if (this.orderPrice === 0 && orderStatus.orderObject.orderType) {
     //   this.loading = true
     //   this.onSubmit()
-    // } 
+    // }
     this.dataLoading = false
 
     this.$nextTick(() => {
@@ -401,7 +401,7 @@ export default defineComponent({
           } else {
             this.paymentStatus = true
           }
-          
+
         }
         return
       }
@@ -496,7 +496,7 @@ export default defineComponent({
           orderStatus.orderObject.orderNo = result?.orderNo
           this.orderInfo = result
           this.orderNo = result.orderNo
-          
+
         }
         // console.log(orderStatus.orderObject, orderStatus.orderObject.paymentConfig, '111')
         this.paymentStatus = true
@@ -562,7 +562,7 @@ export default defineComponent({
       for(let i in tempPrice) {
         tempAllAmount += tempPrice[i]
       }
-      // 判断 通用券的金额是否大于订单的金额 
+      // 判断 通用券的金额是否大于订单的金额
       if(universalCount >= tempAllAmount) {
         universalCount = tempAllAmount
       }
@@ -594,7 +594,7 @@ export default defineComponent({
         orderNo: config.merOrderNo,
         userId: config.userId
       })
-      
+
       orderStatus.orderObject.paymentConfig.paymentConfig.paymentChannel = val.pay_channel
 
       console.log(params, 'params ---', config)
@@ -602,7 +602,7 @@ export default defineComponent({
         window.location.href =
           getHttpOrigin() + state.payBackPath + '#/payResult?' + params
       } else {
-        
+
         this.qrCodeUrl =
           getHttpOrigin() + state.payBackPath + '#/payDefine?' + params
         this.showQrcode = true
@@ -915,9 +915,8 @@ export default defineComponent({
             ) : (
               ''
             )}
-
-            {/* 优惠券使用 */}
-            {!this.dataLoading && (
+            {/* 优惠券使用 如果有订单号且使用了优惠券 ,没有使用则不显示 */}
+            {(!this.dataLoading && (orderStatus.orderObject.orderNo && orderStatus.orderObject.discountPrice > 0 || !orderStatus.orderObject.orderNo)) && (
               <UseCoupon
                 ref="useCouponRef"
                 couponId={orderStatus.orderObject.couponId}