Commit 434c76c72660d5da96fd96bd77ff581aa2704b71

Authored by 刘淇
1 parent d10c4cc1

天水一键补缴

build/webpack.prod.conf.js
... ... @@ -12,7 +12,7 @@ const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12 12 const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
13 13  
14 14 const env = require('../config/prod.env')
15   -
  15 +const Timestamp = new Date().getTime()
16 16 const webpackConfig = merge(baseWebpackConfig, {
17 17 module: {
18 18 rules: utils.styleLoaders({
... ... @@ -25,8 +25,8 @@ const webpackConfig = merge(baseWebpackConfig, {
25 25 output: {
26 26 publicPath: './',
27 27 path: config.build.assetsRoot,
28   - filename: utils.assetsPath('js/[name].[chunkhash].js'),
29   - chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
  28 + filename: utils.assetsPath('js/[name].[chunkhash].'+Timestamp+'js'),
  29 + chunkFilename: utils.assetsPath('js/[id].[chunkhash].'+Timestamp+'js')
30 30 },
31 31 plugins: [
32 32 // http://vuejs.github.io/vue-loader/en/workflow/production.html
... ...
config/index.js
... ... @@ -8,7 +8,7 @@ module.exports = {
8 8 dev: {
9 9  
10 10 // Paths
11   - assetsSubDirectory: 'static',
  11 + assetsSubDirectory: 'pro',
12 12 assetsPublicPath: '/',
13 13 proxyTable: {},
14 14 // proxyTable: {
... ... @@ -48,11 +48,11 @@ module.exports = {
48 48  
49 49 build: {
50 50 // Template for index.html
51   - index: path.resolve(__dirname, '../dist/index.html'),
  51 + index: path.resolve(__dirname, '../pro/index.html'),
52 52  
53 53 // Paths
54   - assetsRoot: path.resolve(__dirname, '../dist'),
55   - assetsSubDirectory: 'static',
  54 + assetsRoot: path.resolve(__dirname, '../pro'),
  55 + assetsSubDirectory: 'pro',
56 56 assetsPublicPath: './',
57 57  
58 58 /**
... ...
index.html
... ... @@ -4,6 +4,9 @@
4 4 <meta charset="utf-8">
5 5 <meta name="google" content="notranslate">
6 6 <meta name="viewport" content="width=device-width,initial-scale=1.0">
  7 + <meta http-equiv="Pragma" content="no-cache">
  8 + <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
  9 +
7 10 <title>小票码扫码支付</title>
8 11 </head>
9 12 <body>
... ...
src/components/orderPay.vue
... ... @@ -77,7 +77,28 @@ export default {
77 77 this.arrearageActFee = this.$route.query.arrearageActFee // 实收
78 78 this.clientBrowser = this.$utils.clientBrowser() //支付方式
79 79 this.paySrcType = this.$route.query.paySrcType // 实收
80   - this.orderId = this.$route.query.ordeID
  80 + // this.orderId = this.$route.query.ordeID
  81 +
  82 + // console.log(this.orderId)
  83 +
  84 + let me = this
  85 + let _order = []
  86 +
  87 +
  88 + if (this.paySrcType == 103) {
  89 + this.orderId = JSON.parse(sessionStorage.getItem('pageIds'))
  90 + // this.orderId = JSON.parse(this.orderId)
  91 + console.log(this.orderId)
  92 + this.orderId.forEach(item => {
  93 + _order.push({
  94 + orderId: item
  95 + })
  96 + })
  97 + this.orderId = []
  98 + this.orderId = _order
  99 + }else{
  100 + this.orderId = sessionStorage.getItem('pageIds')
  101 + }
81 102 console.log(this.orderId)
82 103 this.appOrderTimeout = this.$route.query.appOrderTimeout
83 104 if (this.clientBrowser == "微信") {
... ... @@ -109,19 +130,7 @@ export default {
109 130 },
110 131 toPay() {
111 132 let me = this
112   - let _order = []
113 133  
114   - console.log(this.orderId)
115   - if (this.paySrcType == 103) {
116   - this.orderId = JSON.parse(this.orderId)
117   - this.orderId.forEach(item => {
118   - _order.push({
119   - orderId: item
120   - })
121   - })
122   - this.orderId = []
123   - this.orderId = _order
124   - }
125 134 if(this.tollNumber){
126 135 this.backDeveloperCode = this.tollNumber
127 136 }else{
... ... @@ -139,7 +148,7 @@ export default {
139 148 aliParams.orgId = sessionStorage.getItem('orgId')
140 149 aliParams.backType = 2
141 150 aliParams.backDeveloperCode = this.backDeveloperCode
142   - aliParams.recordArreaInfos = JSON.stringify(this.orderId);
  151 + aliParams.recordArreaInfos = this.orderId;
143 152 console.log(aliParams)
144 153 aliPay(aliParams).then(response => {
145 154 console.log(response)
... ... @@ -172,9 +181,9 @@ export default {
172 181  
173 182  
174 183 if (this.clientBrowser == '微信') { // 微信支付
175   - let _openId = sessionStorage.getItem('openIdData')
  184 + let _openId = sessionStorage.getItem('openIdDataNew')
176 185 if(_openId){
177   - me.vxPay(_openId, this.orderId)
  186 + me.vxPay(_openId,this.orderId)
178 187 }else {
179 188 //第一步获取openid
180 189 var codeParams = {
... ... @@ -184,7 +193,7 @@ export default {
184 193 getOpenId(codeParams).then(res => {
185 194 if (res.code == 0) {
186 195 me.vxPay(res.data, this.orderId)
187   - sessionStorage.setItem('openIdData', res.data)
  196 + sessionStorage.setItem('openIdDataNew', res.data)
188 197 } else if (res.code == 40163) { //code been used, hints[重复code问题]
189 198 alert('请重新扫码重复code问题')
190 199 console.log(res.message);
... ... @@ -206,7 +215,7 @@ export default {
206 215 wxParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付
207 216 wxParams.carNumber = this.carNumber;
208 217 wxParams.paySrcType = this.paySrcType;//101停车支付
209   - wxParams.recordArreaInfos = JSON.stringify(orderIdData);
  218 + wxParams.recordArreaInfos = orderIdData;
210 219 wxParams.openId = openIdData;
211 220 wxParams.backDeveloperCode = this.backDeveloperCode
212 221 wxParams.appId = this.$utils.myVxAppId;
... ...
src/components/parkRecord.vue
... ... @@ -311,7 +311,8 @@ export default {
311 311 let res = result.data
312 312 let _dis = res.discountFee
313 313 let discountFee = _dis.slice(1, _dis.length - 1)
314   -
  314 + console.log(i.orderId)
  315 + sessionStorage.setItem('pageIds',i.orderId)
315 316 this.$router.push(
316 317 {
317 318 path: 'orderPay',
... ... @@ -322,7 +323,7 @@ export default {
322 323 arrearageActFee: res.orderFee,// 实收
323 324 carNumber: this.carNumber, // 车牌
324 325 paySrcType: 101, //支付的类型 101 是本次 103是历史欠费
325   - ordeID: i.orderId, //支付的订单号
  326 + // ordeID: i.orderId, //支付的订单号
326 327 appOrderTimeout: res.appOrderTimeout, // 超时描述
327 328 }
328 329 }
... ... @@ -368,6 +369,7 @@ export default {
368 369 console.log(res)
369 370  
370 371 this.orderIds = JSON.stringify(this.orderIds)
  372 + sessionStorage.setItem('pageIds',this.orderIds)
371 373 console.log(this.orderIds)
372 374 this.$router.push(
373 375 {
... ... @@ -379,7 +381,7 @@ export default {
379 381 arrearageActFee: res.arrearageActFee,// 实收
380 382 carNumber: this.carNumber, // 车牌
381 383 paySrcType: 103, //支付的类型 101 是本次 103是历史欠费
382   - ordeID: this.orderIds, //支付的订单号
  384 + // ordeID: this.orderIds, //支付的订单号
383 385 appOrderTimeout: '',
384 386 backDeveloperCode: response.data.inChargerCode
385 387 }
... ...