Commit 6fcc5f70fdf5d7099d2abcd50e0b79eba70cc536

Authored by 刘淇
1 parent 2f5542f4

扬民扫码

config/index.js
... ... @@ -59,7 +59,7 @@ module.exports = {
59 59 * Source Maps
60 60 */
61 61  
62   - productionSourceMap: true,
  62 + productionSourceMap: false,
63 63 // https://webpack.js.org/configuration/devtool/#production
64 64 devtool: '#source-map',
65 65  
... ...
src/components/pay.vue
... ... @@ -92,21 +92,25 @@ export default {
92 92 }
93 93 },
94 94 created() {
  95 + let req = sessionStorage.getItem('req')
  96 +
  97 + let par = JSON.parse(req)
  98 + console.log(par)
95 99 // this.carWrapBG = this.$route.query.carColor //车牌颜色
96   - this.carNumber = this.$route.query.plateno
97   - this.parkName = this.$route.query.parkName
98   - this.inparktime = this.$route.query.inparktime
99   - this.outtime = this.$route.query.outtime
100   - this.staytime = this.$route.query.staytime
101   - this.orderFee = this.$route.query.orderFee
102   - this.due = this.$route.query.due
103   - this.discountFee = this.$route.query.discountFee
  100 + this.carNumber = par.plateno
  101 + this.parkName = par.parkName
  102 + this.inparktime = par.inparktime
  103 + this.outtime = par.outtime
  104 + this.staytime = par.staytime
  105 + this.orderFee = par.orderFee
  106 + this.due = par.due
  107 + this.discountFee = par.discountFee
104 108 // this.arrearageTotalFee = this.$route.query.arrearageTotalFee // 应收
105 109 // this.arrearageDiscFee = this.$route.query.arrearageDiscFee // 优惠
106 110 // this.arrearageActFee = this.$route.query.arrearageActFee // 实收
107 111 this.clientBrowser = this.$utils.clientBrowser() //支付方式
108 112 // this.paySrcType = this.$route.query.codeType // 实收
109   - this.orderId = this.$route.query.orderId
  113 + this.orderId = par.orderId
110 114 // console.log(this.orderId)
111 115 // this.appOrderTimeout = this.$route.query.appOrderTimeout
112 116 if (this.clientBrowser == "微信") {
... ... @@ -119,9 +123,10 @@ export default {
119 123 var appID = this.$utils.myVxAppId;
120 124 // alert(appID)
121 125 var code = this.getUrlParam('code');
  126 + console.log(code)
122 127 var local = window.location.href;
123 128 if (code == null || code === '') {
124   - window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appID + '&redirect_uri=' + encodeURIComponent(local) + '&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect'
  129 + window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appID + '&redirect_uri=' + encodeURIComponent(local) + '&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
125 130 } else {
126 131 return code;
127 132 }
... ... @@ -239,7 +244,7 @@ export default {
239 244 if (res.code == 0) {
240 245 me.vxPay(res.data, this.orderId)
241 246 } else if (res.code == 40163) { //code been used, hints[重复code问题]
242   - me.$msgbox('提示', '请重新扫码')
  247 + me.$msgbox('提示', '微信code重复了,请重新扫码')
243 248 console.log(res.message);
244 249 } else {
245 250 me.$msgbox('提示', '请重新扫码')
... ... @@ -310,7 +315,7 @@ export default {
310 315 } else {
311 316 console.log('失败')
312 317 me.$msgbox('提示', '支付失败')
313   - me.$router.go(-2);
  318 + // me.$router.go(-2);
314 319 }
315 320 }
316 321 )
... ...
src/components/plateNumber.vue
... ... @@ -315,16 +315,16 @@ export default {
315 315  
316 316 console.log(window.location)
317 317 console.log(this.$route.query)
318   - if (this.$utils.clientBrowser() == "微信") {
319   - var appID = this.$utils.myVxAppId;
320   - var code = this.getUrlParam('code');
321   - var local = window.location.href;
322   - if (code == null || code === '') {
323   - window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appID+'&redirect_uri='+encodeURIComponent(local)+'&response_type=code&scope=snsapi_userinfo&state=1,0#wechat_redirect'
324   - } else {
325   - return code;
326   - }
327   - }
  318 + // if (this.$utils.clientBrowser() == "微信") {
  319 + // var appID = this.$utils.myVxAppId;
  320 + // var code = this.getUrlParam('code');
  321 + // var local = window.location.href;
  322 + // if (code == null || code === '') {
  323 + // window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appID+'&redirect_uri='+encodeURIComponent(local)+'&response_type=code&scope=snsapi_userinfo&state=1,0#wechat_redirect'
  324 + // } else {
  325 + // return code;
  326 + // }
  327 + // }
328 328  
329 329  
330 330 let params = this.$route.query
... ... @@ -381,12 +381,13 @@ export default {
381 381 console.log(tmpObj)
382 382 //判断是否需要支付
383 383 if (tmpObj.needPay) {
  384 + sessionStorage.setItem('req',JSON.stringify(tmpObj))
384 385 var queryParams = this.$utils.parseParams(tmpObj);
385 386 console.log(queryParams)
386 387 // //
387 388 this.$router.push({
388 389 path: 'pay',
389   - query: tmpObj
  390 + // query: tmpObj
390 391 })
391 392 // window.location.href = "../pay.html?" + queryParams;
392 393 } else {
... ...
src/utils/request.js
... ... @@ -8,12 +8,10 @@ const service = axios.create({
8 8 // https://pay.renniting.cn/ 赤峰正式环境
9 9 // http://pay.service.huangshiparking.com/ 黄石
10 10  
11   - // 'http://39.98.58.92:8090'; 赤峰测试环境
12   -
13 11  
14 12 // https://dev.renniting.cn/pay/ 赤峰农行测试环境
15 13  
16   - baseURL: 'https://pay.renniting.cn/', // url = base url + request url
  14 + baseURL: 'http://pay.service.renniting.cn/', // url = base url + request url
17 15 // withCredentials: true, // send cookies when cross-domain requests
18 16 timeout: 6000 // request timeout
19 17 })
... ...