diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 7f100a2..28e60d4 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -12,7 +12,7 @@ const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') const UglifyJsPlugin = require('uglifyjs-webpack-plugin') const env = require('../config/prod.env') - +const Timestamp = new Date().getTime() const webpackConfig = merge(baseWebpackConfig, { module: { rules: utils.styleLoaders({ @@ -25,8 +25,8 @@ const webpackConfig = merge(baseWebpackConfig, { output: { publicPath: './', path: config.build.assetsRoot, - filename: utils.assetsPath('js/[name].[chunkhash].js'), - chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') + filename: utils.assetsPath('js/[name].[chunkhash].'+Timestamp+'js'), + chunkFilename: utils.assetsPath('js/[id].[chunkhash].'+Timestamp+'js') }, plugins: [ // http://vuejs.github.io/vue-loader/en/workflow/production.html diff --git a/config/index.js b/config/index.js index b912637..850ee74 100644 --- a/config/index.js +++ b/config/index.js @@ -8,7 +8,7 @@ module.exports = { dev: { // Paths - assetsSubDirectory: 'static', + assetsSubDirectory: 'pro', assetsPublicPath: '/', proxyTable: {}, // proxyTable: { @@ -48,11 +48,11 @@ module.exports = { build: { // Template for index.html - index: path.resolve(__dirname, '../dist/index.html'), + index: path.resolve(__dirname, '../pro/index.html'), // Paths - assetsRoot: path.resolve(__dirname, '../dist'), - assetsSubDirectory: 'static', + assetsRoot: path.resolve(__dirname, '../pro'), + assetsSubDirectory: 'pro', assetsPublicPath: './', /** diff --git a/index.html b/index.html index e0f2bef..c9eb394 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,9 @@ + + + 小票码扫码支付 diff --git a/src/components/orderPay.vue b/src/components/orderPay.vue index 1a5bf6e..d67a88d 100644 --- a/src/components/orderPay.vue +++ b/src/components/orderPay.vue @@ -77,7 +77,28 @@ export default { this.arrearageActFee = this.$route.query.arrearageActFee // 实收 this.clientBrowser = this.$utils.clientBrowser() //支付方式 this.paySrcType = this.$route.query.paySrcType // 实收 - this.orderId = this.$route.query.ordeID + // this.orderId = this.$route.query.ordeID + + // console.log(this.orderId) + + let me = this + let _order = [] + + + if (this.paySrcType == 103) { + this.orderId = JSON.parse(sessionStorage.getItem('pageIds')) + // this.orderId = JSON.parse(this.orderId) + console.log(this.orderId) + this.orderId.forEach(item => { + _order.push({ + orderId: item + }) + }) + this.orderId = [] + this.orderId = _order + }else{ + this.orderId = sessionStorage.getItem('pageIds') + } console.log(this.orderId) this.appOrderTimeout = this.$route.query.appOrderTimeout if (this.clientBrowser == "微信") { @@ -109,19 +130,7 @@ export default { }, toPay() { let me = this - let _order = [] - console.log(this.orderId) - if (this.paySrcType == 103) { - this.orderId = JSON.parse(this.orderId) - this.orderId.forEach(item => { - _order.push({ - orderId: item - }) - }) - this.orderId = [] - this.orderId = _order - } if(this.tollNumber){ this.backDeveloperCode = this.tollNumber }else{ @@ -139,7 +148,7 @@ export default { aliParams.orgId = sessionStorage.getItem('orgId') aliParams.backType = 2 aliParams.backDeveloperCode = this.backDeveloperCode - aliParams.recordArreaInfos = JSON.stringify(this.orderId); + aliParams.recordArreaInfos = this.orderId; console.log(aliParams) aliPay(aliParams).then(response => { console.log(response) @@ -172,9 +181,9 @@ export default { if (this.clientBrowser == '微信') { // 微信支付 - let _openId = sessionStorage.getItem('openIdData') + let _openId = sessionStorage.getItem('openIdDataNew') if(_openId){ - me.vxPay(_openId, this.orderId) + me.vxPay(_openId,this.orderId) }else { //第一步获取openid var codeParams = { @@ -184,7 +193,7 @@ export default { getOpenId(codeParams).then(res => { if (res.code == 0) { me.vxPay(res.data, this.orderId) - sessionStorage.setItem('openIdData', res.data) + sessionStorage.setItem('openIdDataNew', res.data) } else if (res.code == 40163) { //code been used, hints[重复code问题] alert('请重新扫码重复code问题') console.log(res.message); @@ -206,7 +215,7 @@ export default { wxParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付 wxParams.carNumber = this.carNumber; wxParams.paySrcType = this.paySrcType;//101停车支付 - wxParams.recordArreaInfos = JSON.stringify(orderIdData); + wxParams.recordArreaInfos = orderIdData; wxParams.openId = openIdData; wxParams.backDeveloperCode = this.backDeveloperCode wxParams.appId = this.$utils.myVxAppId; diff --git a/src/components/parkRecord.vue b/src/components/parkRecord.vue index 9c74a00..a17a6ba 100644 --- a/src/components/parkRecord.vue +++ b/src/components/parkRecord.vue @@ -311,7 +311,8 @@ export default { let res = result.data let _dis = res.discountFee let discountFee = _dis.slice(1, _dis.length - 1) - + console.log(i.orderId) + sessionStorage.setItem('pageIds',i.orderId) this.$router.push( { path: 'orderPay', @@ -322,7 +323,7 @@ export default { arrearageActFee: res.orderFee,// 实收 carNumber: this.carNumber, // 车牌 paySrcType: 101, //支付的类型 101 是本次 103是历史欠费 - ordeID: i.orderId, //支付的订单号 + // ordeID: i.orderId, //支付的订单号 appOrderTimeout: res.appOrderTimeout, // 超时描述 } } @@ -368,6 +369,7 @@ export default { console.log(res) this.orderIds = JSON.stringify(this.orderIds) + sessionStorage.setItem('pageIds',this.orderIds) console.log(this.orderIds) this.$router.push( { @@ -379,7 +381,7 @@ export default { arrearageActFee: res.arrearageActFee,// 实收 carNumber: this.carNumber, // 车牌 paySrcType: 103, //支付的类型 101 是本次 103是历史欠费 - ordeID: this.orderIds, //支付的订单号 + // ordeID: this.orderIds, //支付的订单号 appOrderTimeout: '', backDeveloperCode: response.data.inChargerCode }