lex-xin 3 rokov pred
rodič
commit
89ac78d750

+ 1 - 0
src/student/practice-class/index.tsx

@@ -271,6 +271,7 @@ export default defineComponent({
           actions={actions}
           cancelText="取消"
           onSelect={this.onSheetSelect}
+          closeOnClickAction
           onCancel={() => (this.show = false)}
         />
 

+ 1 - 1
src/views/order-detail/order-live/index.module.less

@@ -8,7 +8,7 @@
     line-height: 16px;
     background: #e0f7f3;
     border-radius: 4px;
-    vertical-align: text-bottom;
+    vertical-align: middle;
   }
   .title {
     font-size: 16px;

+ 1 - 1
src/views/order-detail/order-practice/index.module.less

@@ -8,7 +8,7 @@
     line-height: 16px;
     background: #ffece6;
     border-radius: 4px;
-    vertical-align: text-bottom;
+    vertical-align: middle;
   }
   .title {
     font-size: 16px;

+ 1 - 1
src/views/order-detail/order-video/index.module.less

@@ -8,7 +8,7 @@
     line-height: 16px;
     background: #fff0d9;
     border-radius: 4px;
-    vertical-align: text-bottom;
+    vertical-align: middle;
   }
   .title {
     font-size: 16px;

+ 19 - 3
src/views/order-detail/payment/index.tsx

@@ -22,6 +22,16 @@ interface IOrderInfo {
   orderNo: string | number
   actualPrice: string | number
 }
+const urlType = {
+  goodsPay: {
+    cancelUrl: '/api-mall-portal/order/cancelUserOrder',
+    payUrl: '/api-mall-portal/payment/orderPay'
+  },
+  orderPay: {
+    cancelUrl: '/api-student/userOrder/orderCancel',
+    payUrl: '/api-student/userOrder/orderPay'
+  }
+}
 
 export default defineComponent({
   name: 'payment',
@@ -40,6 +50,10 @@ export default defineComponent({
     onBackOut: {
       type: Function,
       default: () => {}
+    },
+    paymentType: {
+      type: String,
+      default: 'orderPay' as 'orderPay' | 'goodsPay'
     }
   },
   data() {
@@ -65,7 +79,7 @@ export default defineComponent({
     },
     async onCancel(noBack?: boolean) {
       try {
-        await request.post('/api-student/userOrder/orderCancel', {
+        await request.post(urlType[this.paymentType].cancelUrl, {
           data: {
             orderNo: this.orderInfo.orderNo
           }
@@ -79,7 +93,7 @@ export default defineComponent({
     async onSubmit() {
       // 支付...
       try {
-        let res = await request.post('/api-student/userOrder/orderPay', {
+        let res = await request.post(urlType[this.paymentType].payUrl, {
           data: {
             orderNo: this.orderInfo.orderNo,
             payChannel: this.payType
@@ -104,7 +118,9 @@ export default defineComponent({
         listenerMessage('paymentOperation', (result: any) =>
           this.paymentOperation(result)
         )
-      } catch {}
+      } catch (e: any) {
+        console.log(e)
+      }
     },
     paymentOperation(res: any) {
       if (res.status === 'success') {