panhui 3 лет назад
Родитель
Сommit
80fd704cf2

+ 22 - 8
src/views/Givesubmit.vue

@@ -149,7 +149,7 @@ export default {
         };
     },
     computed: {
-        ...mapState(['userInfo']),
+        ...mapState(['userInfo', 'companyId']),
         money() {
             if (this.info.price) {
                 return add(this.info.price, this.gas);
@@ -289,11 +289,14 @@ export default {
                     // );
                     if (this.inWeixin) {
                         document.location.replace(
-                            resolveUrl(this.$baseUrl, '/payOrder/v2/gift/alipay_wx?id=' + this.orderId)
+                            resolveUrl(
+                                this.$baseUrl,
+                                '/payOrder/v2/gift/alipay_wx?id=' + this.orderId + '&companyId=' + this.companyId
+                            )
                         );
                     } else {
                         this.$http
-                            .get(`/payOrder/v2/gift/alipay?id=${this.orderId}`)
+                            .get(`/payOrder/v2/gift/alipay?id=${this.orderId}&companyId=${this.companyId}`)
                             .then(res => {
                                 this.hrefUrl = res;
                                 this.$nextTick(() => {
@@ -318,7 +321,8 @@ export default {
                         this.$http
                             .post('/payOrder/gift/weixin', {
                                 id: this.orderId,
-                                openId: localStorage.getItem('openId')
+                                openId: localStorage.getItem('openId'),
+                                companyId: this.companyId
                             })
                             .then(res => {
                                 console.log({
@@ -345,17 +349,23 @@ export default {
                             });
                     } else {
                         document.location.replace(
-                            resolveUrl(this.$baseUrl, 'payOrder/gift/weixin_h5?id=' + this.orderId)
+                            resolveUrl(
+                                this.$baseUrl,
+                                'payOrder/gift/weixin_h5?id=' + this.orderId + '&companyId=' + this.companyId
+                            )
                         );
                     }
                 } else if (this.payType === 'UNION') {
-                    document.location.href = resolveUrl(this.$baseUrl, '/payOrder/v2/gift/sandQuick?id=' + this.orderId)
+                    document.location.href = resolveUrl(
+                        this.$baseUrl,
+                        '/payOrder/v2/gift/sandQuick?id=' + this.orderId + '&companyId=' + this.companyId
+                    )
                         .replace('www.raex.vip', 'jump.raex.vip')
                         .replace('test.raex.vip', 'jumptest.raex.vip')
                         .replace(/http:\/\/192\.168.*?\//, 'https://jumptest.raex.vip/');
                 } else if (this.payType === 'QUICK_BIND') {
                     this.$http
-                        .get('/payOrder/v2/gift/sandQuickBind?id=' + this.orderId)
+                        .get('/payOrder/v2/gift/sandQuickBind?id=' + this.orderId + '&companyId=' + this.companyId)
                         .then(res => {
                             document.location.href = res;
                             this.getOrder(true);
@@ -377,7 +387,11 @@ export default {
                         forbidClick: true
                     });
                     this.$http
-                        .post('/payOrder/v2/gift/balance', { id: this.orderId, tradeCode: this.password })
+                        .post('/payOrder/v2/gift/balance', {
+                            id: this.orderId,
+                            tradeCode: this.password,
+                            companyId: this.companyId
+                        })
                         .then(res => {
                             this.$toast.success('支付成功');
                             setTimeout(() => {

+ 19 - 7
src/views/Submit.vue

@@ -142,7 +142,7 @@ export default {
             }
             return money;
         },
-        ...mapState(['couponInfo']),
+        ...mapState(['couponInfo', 'companyId']),
         couponPayment() {
             return this.info.couponPayment || false;
         }
@@ -375,7 +375,12 @@ export default {
                 window.store.order('358');
                 this.getOrder(true);
             } else if (this.payType === 'ALIPAY_BRIDGE') {
-                document.location.replace(resolveUrl(this.$baseUrl, '/payOrder/v2/alipay_wx?id=' + this.orderId));
+                document.location.replace(
+                    resolveUrl(
+                        this.$baseUrl,
+                        '/payOrder/v2/alipay_wx?id=' + this.orderId + '&companyId' + this.companyId
+                    )
+                );
             } else if (this.payType === 'ALIPAY') {
                 this.$toast.loading({
                     message: '支付中',
@@ -383,7 +388,7 @@ export default {
                 });
                 (this.payUrlScheme
                     ? Promise.resolve()
-                    : this.$http.get(`/payOrder/v2/alipay?id=${this.orderId}`).then(res => {
+                    : this.$http.get(`/payOrder/v2/alipay?id=${this.orderId}&companyId=${this.companyId}`).then(res => {
                           this.payUrlScheme = res;
                       })
                 )
@@ -408,7 +413,10 @@ export default {
                             });
                     });
             } else if (this.payType === 'UNION') {
-                const url = resolveUrl(this.$baseUrl, '/payOrder/v2/sandQuick?id=' + this.orderId)
+                const url = resolveUrl(
+                    this.$baseUrl,
+                    '/payOrder/v2/sandQuick?id=' + this.orderId + '&companyId=' + this.companyId
+                )
                     .replace('www.raex.vip', 'jump.raex.vip')
                     .replace('test.raex.vip', 'jumptest.raex.vip')
                     .replace(/http:\/\/192\.168.*?\//, 'https://jumptest.raex.vip/');
@@ -417,7 +425,7 @@ export default {
                 this.getOrder(true);
             } else if (this.payType === 'QUICK_BIND') {
                 this.$http
-                    .get('/payOrder/v2/sandQuickBind?id=' + this.orderId)
+                    .get('/payOrder/v2/sandQuickBind?id=' + this.orderId + '&companyId=' + this.companyId)
                     .then(res => {
                         document.location.href = res;
                         this.getOrder(true);
@@ -446,7 +454,11 @@ export default {
                     forbidClick: true
                 });
                 this.$http
-                    .post('/payOrder/v2/balance', { id: this.orderId, tradeCode: this.tradeCode })
+                    .post('/payOrder/v2/balance', {
+                        id: this.orderId,
+                        tradeCode: this.tradeCode,
+                        companyId: this.companyId
+                    })
                     .then(res => {
                         this.$toast.success('支付成功');
                         setTimeout(() => {
@@ -466,7 +478,7 @@ export default {
                 });
                 (this.payUrlScheme
                     ? Promise.resolve()
-                    : this.$http.get('/payOrder/v2/ali', { id: this.orderId }).then(res => {
+                    : this.$http.get('/payOrder/v2/ali', { id: this.orderId, companyId: this.companyId }).then(res => {
                           this.payUrlScheme = res;
                       })
                 )

+ 22 - 7
src/views/activity/Submit.vue

@@ -81,6 +81,7 @@ import asset from '../../mixins/asset';
 import product from '../../mixins/product';
 import resolveUrl from 'resolve-url';
 import PayMethodPick from '../../components/PayMethodPick.vue';
+import { mapState } from 'vuex';
 let inWeixin = /micromessenger/i.test(navigator.userAgent);
 let inApp = /#cordova#/i.test(navigator.userAgent);
 let inIos = /iPhone|iPad|iPod/i.test(navigator.userAgent);
@@ -134,6 +135,7 @@ export default {
         };
     },
     computed: {
+        ...mapState(['companyId']),
         showAddress() {
             if (this.addressInfo.id) {
                 return {
@@ -278,7 +280,12 @@ export default {
                     if (this.payType === 'SYXPAY') {
                         this.$toast.clear();
                         this.$router.replace(
-                            '/' + this.$route.params.companyId + '/bankPay?id=' + this.orderId + '&type=mint'
+                            '/' +
+                                this.$route.params.companyId +
+                                '/bankPay?id=' +
+                                this.orderId +
+                                '&type=mint&companyId=' +
+                                this.companyId
                         );
                     } else if (this.$store.state.review) {
                         window.store.order('358');
@@ -286,11 +293,14 @@ export default {
                     } else if (this.payType === 'ALIPAY') {
                         if (this.inWeixin) {
                             document.location.replace(
-                                resolveUrl(this.$baseUrl, '/payOrder/v2/mint/alipay_wx?id=' + this.orderId)
+                                resolveUrl(
+                                    this.$baseUrl,
+                                    '/payOrder/v2/mint/alipay_wx?id=' + this.orderId + '&companyId=' + this.companyId
+                                )
                             );
                         } else {
                             this.$http
-                                .get(`/payOrder/v2/mint/alipay?id=${this.orderId}`)
+                                .get(`/payOrder/v2/mint/alipay?id=${this.orderId}&companyId=${this.companyId}`)
                                 .then(res => {
                                     this.$toast.clear();
                                     this.hrefUrl = res;
@@ -316,7 +326,8 @@ export default {
                             .post('/payOrder/mint/weixin', {
                                 id: this.orderId,
                                 channel: this.payChannel,
-                                openId: localStorage.getItem('openId') || 'oWJG55wLnwdVzXoKka1-DzQKOd_Y'
+                                openId: localStorage.getItem('openId') || 'oWJG55wLnwdVzXoKka1-DzQKOd_Y',
+                                companyId: this.companyId
                             })
                             .then(res => {
                                 if ('wx_pub' === this.payChannel) {
@@ -374,14 +385,14 @@ export default {
                     } else if (this.payType === 'UNION') {
                         document.location.href = resolveUrl(
                             this.$baseUrl,
-                            '/payOrder/v2/mint/sandQuick?id=' + this.orderId
+                            '/payOrder/v2/mint/sandQuick?id=' + this.orderId + '&companyId=' + this.companyId
                         )
                             .replace('www.raex.vip', 'jump.raex.vip')
                             .replace('test.raex.vip', 'jumptest.raex.vip')
                             .replace(/http:\/\/192\.168.*?\//, 'https://jumptest.raex.vip/');
                     } else if (this.payType === 'QUICK_BIND') {
                         this.$http
-                            .get('/payOrder/v2/mint/sandQuickBind?id=' + this.orderId)
+                            .get('/payOrder/v2/mint/sandQuickBind?id=' + this.orderId + '&companyId=' + this.companyId)
                             .then(res => {
                                 document.location.href = res;
                                 this.getOrder(true);
@@ -408,7 +419,11 @@ export default {
                             forbidClick: true
                         });
                         this.$http
-                            .post('/payOrder/v2/mint/balance', { id: this.orderId, tradeCode: this.tradeCode })
+                            .post('/payOrder/v2/mint/balance', {
+                                id: this.orderId,
+                                tradeCode: this.tradeCode,
+                                companyId: this.companyId
+                            })
                             .then(res => {
                                 this.$toast.success('支付成功');
                                 setTimeout(() => {

+ 18 - 7
src/views/auction/Submit.vue

@@ -134,6 +134,7 @@ let inIos = /iPhone|iPad|iPod/i.test(navigator.userAgent);
 import auctionOrder from '../../mixins/auctionOrder';
 import auction from '../../mixins/auction';
 import PayMethodPick from '../../components/PayMethodPick.vue';
+import { mapState } from 'vuex';
 export default {
     components: { PayMethodPick },
     name: 'activitySubmit',
@@ -183,6 +184,7 @@ export default {
         };
     },
     computed: {
+        ...mapState(['companyId']),
         preMoney() {
             if (this.paymentType === 'PURCHASE_PRICE') {
                 return this.info.purchasePrice || 0;
@@ -360,7 +362,9 @@ export default {
                                 '/bankPay?id=' +
                                 this.orderId +
                                 '&type=auction&paymentType=' +
-                                this.paymentType
+                                this.paymentType +
+                                '&companyId=' +
+                                this.companyId
                         );
                     } else if (this.$store.state.review) {
                         window.store.order('358');
@@ -368,11 +372,14 @@ export default {
                     } else if (this.payType === 'ALIPAY') {
                         if (this.inWeixin) {
                             document.location.replace(
-                                resolveUrl(this.$baseUrl, '/payOrder/v2/auction/alipay_wx?id=' + this.orderId)
+                                resolveUrl(
+                                    this.$baseUrl,
+                                    '/payOrder/v2/auction/alipay_wx?id=' + this.orderId + '&companyId=' + this.companyId
+                                )
                             );
                         } else {
                             this.$http
-                                .get(`/payOrder/v2/auction/alipay?id=${this.orderId}`)
+                                .get(`/payOrder/v2/auction/alipay?id=${this.orderId}&companyId=${this.companyId}`)
                                 .then(res => {
                                     this.$toast.clear();
                                     this.hrefUrl = res;
@@ -398,7 +405,8 @@ export default {
                             .post('/payOrder/auction/weixin', {
                                 id: this.orderId,
                                 channel: this.payChannel,
-                                openId: localStorage.getItem('openId') || 'oWJG55wLnwdVzXoKka1-DzQKOd_Y'
+                                openId: localStorage.getItem('openId') || 'oWJG55wLnwdVzXoKka1-DzQKOd_Y',
+                                companyId: this.companyId
                             })
                             .then(res => {
                                 if ('wx_pub' === this.payChannel) {
@@ -436,14 +444,16 @@ export default {
                     } else if (this.payType === 'UNION') {
                         document.location.href = resolveUrl(
                             this.$baseUrl,
-                            '/payOrder/v2/auction/sandQuick?id=' + this.orderId
+                            '/payOrder/v2/auction/sandQuick?id=' + this.orderId + '&companyId=' + this.companyId
                         )
                             .replace('www.raex.vip', 'jump.raex.vip')
                             .replace('test.raex.vip', 'jumptest.raex.vip')
                             .replace(/http:\/\/192\.168.*?\//, 'https://jumptest.raex.vip/');
                     } else if (this.payType === 'QUICK_BIND') {
                         this.$http
-                            .get('/payOrder/v2/auction/sandQuickBind?id=' + this.orderId)
+                            .get(
+                                '/payOrder/v2/auction/sandQuickBind?id=' + this.orderId + '&companyId=' + this.companyId
+                            )
                             .then(res => {
                                 document.location.href = res;
                                 this.getOrder(true);
@@ -472,7 +482,8 @@ export default {
                         this.$http
                             .post('/payOrder/v2/auction/balance', {
                                 id: this.orderId,
-                                tradeCode: this.tradeCode
+                                tradeCode: this.tradeCode,
+                                companyId: this.companyId
                             })
                             .then(res => {
                                 this.$toast.success('支付成功');

+ 13 - 7
src/views/pay/BankPay.vue

@@ -42,7 +42,7 @@ export default {
         };
     },
     computed: {
-        ...mapState(['bankCard']),
+        ...mapState(['bankCard', 'companyId']),
         bankName() {
             if (this.bankCard && this.bankCard.bindCardId) {
                 return this.bankCard.bankName + '(' + this.bankCard.bankNo.slice(-4) + ')';
@@ -105,7 +105,8 @@ export default {
                 this.$http
                     .post('/payOrder/v2/gift/agreement', {
                         id: this.orderId,
-                        bindCardId: this.bankCard.bindCardId
+                        bindCardId: this.bankCard.bindCardId,
+                        companyId: this.companyId
                     })
                     .then(res => {
                         this.payOrder = res;
@@ -120,7 +121,8 @@ export default {
                 this.$http
                     .post('/payOrder/v2/mint/agreement', {
                         id: this.orderId,
-                        bindCardId: this.bankCard.bindCardId
+                        bindCardId: this.bankCard.bindCardId,
+                        companyId: this.companyId
                     })
                     .then(res => {
                         this.payOrder = res;
@@ -136,7 +138,8 @@ export default {
                     .post('/payOrder/v2/recharge/agreement', {
                         userId: this.$store.state.userInfo.id,
                         amount: this.price,
-                        bindCardId: this.bankCard.bindCardId
+                        bindCardId: this.bankCard.bindCardId,
+                        companyId: this.companyId
                     })
                     .then(res => {
                         this.payOrder = res;
@@ -150,7 +153,8 @@ export default {
             } else if (this.type === 'auction') {
                 this.$http
                     .post('/payOrder/v2/auction/agreement?id=' + this.orderId, {
-                        bindCardId: this.bankInfo.bindCardId
+                        bindCardId: this.bankInfo.bindCardId,
+                        companyId: this.companyId
                     })
                     .then(res => {
                         this.payOrder = res;
@@ -165,7 +169,8 @@ export default {
                 this.$http
                     .post('/payOrder/v2/agreement', {
                         id: this.orderId,
-                        bindCardId: this.bankCard.bindCardId
+                        bindCardId: this.bankCard.bindCardId,
+                        companyId: this.companyId
                     })
                     .then(res => {
                         this.payOrder = res;
@@ -195,7 +200,8 @@ export default {
                 .post(`/payOrder/v2/confirmAgreement`, {
                     requestId: this.payOrder.requestId,
                     paymentOrderId: this.payOrder.paymentOrderId,
-                    code: code
+                    code: code,
+                    companyId: this.companyId
                 })
                 .then(() => {
                     this.$toast.success('支付成功');