lex 1 year ago
parent
commit
bfaf34e031
2 changed files with 11 additions and 9 deletions
  1. 6 5
      src/views/adapay/pay-define/index.tsx
  2. 5 4
      src/views/adapay/pay-result/index.tsx

+ 6 - 5
src/views/adapay/pay-define/index.tsx

@@ -36,12 +36,13 @@ export default defineComponent({
         const payMap: any = {
           merOrderNo: state.orderNo,
           paymentChannel: state.pay_channel, // 支付渠道
-          userId: state.userId
+          userId: state.userId,
+          code: state.code
         };
-        //     // 判断是否是微信公众号支付
-        if (state.pay_channel == 'wx_pub') {
-          payMap.code = state.code;
-        }
+        // 判断是否是微信公众号支付
+        // if (state.pay_channel == 'wx_pub') {
+        //   payMap.code = state.code;
+        // }
         const { data } = await request.post(
           '/edu-app/open/userOrder/executePayment',
           {

+ 5 - 4
src/views/adapay/pay-result/index.tsx

@@ -80,12 +80,13 @@ export default defineComponent({
         const payMap: any = {
           merOrderNo: state.orderNo,
           paymentChannel: state.pay_channel, // 支付渠道
-          userId: state.userId
+          userId: state.userId,
+          code: state.code
         };
         //     // 判断是否是微信公众号支付
-        if (state.pay_channel == 'wx_pub') {
-          payMap.code = state.code;
-        }
+        // if (state.pay_channel == 'wx_pub') {
+        // payMap.code = state.code;
+        // }
 
         const { data } = await request.post(
           '/edu-app/open/userOrder/executePayment',