Commit e66dfe1233fd3523761911a45808d09da2f4ec24

Authored by liuqimichale
1 parent 2947f4d1

动态码 动态appid

Showing 1 changed file with 9 additions and 7 deletions
src/components/dynCodePay.vue
@@ -69,7 +69,7 @@ export default { @@ -69,7 +69,7 @@ export default {
69 outtime: '', // 出场时间 69 outtime: '', // 出场时间
70 staytime: '', // 停车时长 70 staytime: '', // 停车时长
71 orderFee: '', // 需要支付的费用 71 orderFee: '', // 需要支付的费用
72 - 72 + urlAppid:'',
73 arrearageActFee: 0, 73 arrearageActFee: 0,
74 arrearageDiscFee: 0, 74 arrearageDiscFee: 0,
75 arrearageActFee: 0, 75 arrearageActFee: 0,
@@ -100,10 +100,12 @@ export default { @@ -100,10 +100,12 @@ export default {
100 this.webAppCode = this.getCode(); 100 this.webAppCode = this.getCode();
101 } 101 }
102 102
  103 + this.urlAppid = this.$route.query.appId
103 }, 104 },
104 methods: { 105 methods: {
105 getCode() { 106 getCode() {
106 - var appID = this.$utils.myVxAppId; 107 +
  108 + var appID = this.urlAppid;
107 // alert(appID) 109 // alert(appID)
108 var code = this.getUrlParam('code'); 110 var code = this.getUrlParam('code');
109 var local = window.location.href; 111 var local = window.location.href;
@@ -165,8 +167,8 @@ export default { @@ -165,8 +167,8 @@ export default {
165 bankabcParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付 167 bankabcParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付
166 bankabcParams.paySrcType = this.paySrcType;//101停车支付 168 bankabcParams.paySrcType = this.paySrcType;//101停车支付
167 bankabcParams.orgId = this.$utils.myOrgId, 169 bankabcParams.orgId = this.$utils.myOrgId,
168 - bankabcParams.backType = 2,  
169 - bankabcParams.PaymentLinkType = 1 170 + bankabcParams.backType = 2,
  171 + bankabcParams.PaymentLinkType = 1
170 bankabcParams.recordArreaInfos = JSON.stringify(this.orderId); 172 bankabcParams.recordArreaInfos = JSON.stringify(this.orderId);
171 console.log(bankabcParams) 173 console.log(bankabcParams)
172 174
@@ -221,7 +223,7 @@ export default { @@ -221,7 +223,7 @@ export default {
221 //第一步获取openid 223 //第一步获取openid
222 var codeParams = { 224 var codeParams = {
223 code: this.webAppCode, 225 code: this.webAppCode,
224 - appId: this.$utils.myVxAppId 226 + appId: this.urlAppid
225 }; 227 };
226 getOpenId(codeParams).then(res => { 228 getOpenId(codeParams).then(res => {
227 if (res.code == 0) { 229 if (res.code == 0) {
@@ -243,13 +245,13 @@ export default { @@ -243,13 +245,13 @@ export default {
243 wxParams.orderId = orderIdData; 245 wxParams.orderId = orderIdData;
244 // wxParams.backType = 2, 246 // wxParams.backType = 2,
245 // wxParams.orgId = this.$utils.myOrgId, 247 // wxParams.orgId = this.$utils.myOrgId,
246 - wxParams.payType = 4;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号 248 + wxParams.payType = 4;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号
247 wxParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付 249 wxParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付
248 // wxParams.carNumber = this.carNumber; 250 // wxParams.carNumber = this.carNumber;
249 // wxParams.paySrcType = this.paySrcType;//101停车支付 251 // wxParams.paySrcType = this.paySrcType;//101停车支付
250 // wxParams.recordArreaInfos = JSON.stringify(orderIdData); 252 // wxParams.recordArreaInfos = JSON.stringify(orderIdData);
251 wxParams.openId = openIdData; 253 wxParams.openId = openIdData;
252 - wxParams.appId = this.$utils.myVxAppId; 254 + wxParams.appId = this.urlAppid
253 vxPayQuery(wxParams).then(res => { 255 vxPayQuery(wxParams).then(res => {
254 if (res.code == 0) { // 256 if (res.code == 0) { //
255 if (res.data) { 257 if (res.data) {