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