Browse Source

临时修改原生支付逻辑

!!!
lex-xin 6 days ago
parent
commit
7a40aab844
1 changed files with 27 additions and 10 deletions
  1. 27 10
      src/views/order-detail/index.tsx

+ 27 - 10
src/views/order-detail/index.tsx

@@ -380,23 +380,40 @@ export default defineComponent({
           this.orderInfo = orderStatus.orderObject.paymentConfig || {}
           this.orderInfo = orderStatus.orderObject.paymentConfig || {}
           this.orderNo = orderStatus.orderObject.orderNo
           this.orderNo = orderStatus.orderObject.orderNo
           const paymentChannel = this.orderInfo.paymentConfig.paymentChannel
           const paymentChannel = this.orderInfo.paymentConfig.paymentChannel
-          if (paymentChannel) {
-            // 判断是否为原生支付
-            if (
-              this.orderInfo.paymentVendor?.indexOf('wxpay') > -1 ||
-              this.orderInfo.paymentVendor?.indexOf('alipay') > -1
-            ) {
-              this.submitNativePay()
-            } else {
+          // 判断是否为原生支付
+          if (
+            this.orderInfo.paymentVendor?.indexOf('wxpay') > -1 ||
+            this.orderInfo.paymentVendor?.indexOf('alipay') > -1
+          ) {
+            this.paymentStatus = true
+          } else {
+            if (paymentChannel) {
               const payCode = beforeSubmit(paymentChannel)
               const payCode = beforeSubmit(paymentChannel)
               this.onConfirm({
               this.onConfirm({
                 payCode,
                 payCode,
                 pay_channel: paymentChannel
                 pay_channel: paymentChannel
               })
               })
+            } else {
+              this.paymentStatus = true
             }
             }
-          } else {
-            this.paymentStatus = true
           }
           }
+          // if (paymentChannel) {
+          //   // 判断是否为原生支付
+          //   if (
+          //     this.orderInfo.paymentVendor?.indexOf('wxpay') > -1 ||
+          //     this.orderInfo.paymentVendor?.indexOf('alipay') > -1
+          //   ) {
+          //     this.submitNativePay()
+          //   } else {
+          //     const payCode = beforeSubmit(paymentChannel)
+          //     this.onConfirm({
+          //       payCode,
+          //       pay_channel: paymentChannel
+          //     })
+          //   }
+          // } else {
+          //   this.paymentStatus = true
+          // }
           
           
         }
         }
         return
         return