diff --git a/build/utils.js b/build/utils.js index e534fb0..4b117ed 100644 --- a/build/utils.js +++ b/build/utils.js @@ -47,6 +47,7 @@ exports.cssLoaders = function (options) { if (options.extract) { return ExtractTextPlugin.extract({ use: loaders, + publicPath: '../../', fallback: 'vue-style-loader' }) } else { diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index d9f99f6..7f100a2 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -23,6 +23,7 @@ const webpackConfig = merge(baseWebpackConfig, { }, devtool: config.build.productionSourceMap ? config.build.devtool : false, output: { + publicPath: './', path: config.build.assetsRoot, filename: utils.assetsPath('js/[name].[chunkhash].js'), chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') @@ -46,7 +47,7 @@ const webpackConfig = merge(baseWebpackConfig, { filename: utils.assetsPath('css/[name].[contenthash].css'), // Setting the following option to `false` will not extract CSS from codesplit chunks. // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. - // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, + // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 allChunks: true, }), diff --git a/config/index.js b/config/index.js index 9a4e658..f030a2a 100644 --- a/config/index.js +++ b/config/index.js @@ -10,15 +10,15 @@ module.exports = { // Paths assetsSubDirectory: 'static', assetsPublicPath: '/', - proxyTable: { - '/api':{ - target:"http://39.98.58.92:8090/",//这里设置你要访问的域名(或IP+端口) - changeOrigin:true, - pathRewrite:{ - '^/api':''//base_api是自定义用来代替http://www.baidu.com/的 - } - } - }, + // proxyTable: { + // '/api':{ + // target:"http://39.98.58.92:8090/",//这里设置你要访问的域名(或IP+端口) + // changeOrigin:true, + // pathRewrite:{ + // '^/api':''//base_api是自定义用来代替http://pay.service.huangshiparking.com/的 + // } + // } + // }, // Various Dev Server settings @@ -52,7 +52,7 @@ module.exports = { // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: '/', + assetsPublicPath: './', /** * Source Maps diff --git a/src/api/orderPay/orderPay.js b/src/api/orderPay/orderPay.js index 92964e0..37ceebd 100644 --- a/src/api/orderPay/orderPay.js +++ b/src/api/orderPay/orderPay.js @@ -2,7 +2,7 @@ import request from '@/utils/request' export function aliPay(params) { // 支付宝 return request({ - url: '/api/alipay/aliH5Pay', + url: 'alipay/aliH5Pay', method: 'post', data: params }) @@ -11,7 +11,7 @@ export function aliPay(params) { // 支付宝 export function getOpenId(params) { // 获取OpenId return request({ - url: '/api//weixinPublicPay/getOpenIdByCode', + url: 'weixinPublicPay/getOpenIdByCode', method: 'post', data: params }) @@ -19,7 +19,7 @@ export function getOpenId(params) { // 获取OpenId export function vxPayQuery(params) { // 微信 return request({ - url: '/api//weixinpay/publicUnifiedOrder', + url: 'weixinpay/publicUnifiedOrder', method: 'post', data: params }) diff --git a/src/api/parkRecord/parkRecord.js b/src/api/parkRecord/parkRecord.js index 1516d8e..c3baac8 100644 --- a/src/api/parkRecord/parkRecord.js +++ b/src/api/parkRecord/parkRecord.js @@ -2,7 +2,7 @@ import request from '@/utils/request' export function parkRecordList(params) { return request({ - url: '/api/queryParkOrder/queryParkingRecordPageByCarNumbers', + url: 'queryParkOrder/queryParkingRecordPageByCarNumbers', method: 'post', data: params }) @@ -10,7 +10,7 @@ export function parkRecordList(params) { export function historyQuery(params) { return request({ - url: '/api/queryParkOrder/queryArrearageStaForWXPublc', + url: 'queryParkOrder/queryArrearageStaForWXPublc', method: 'post', data: params }) @@ -18,7 +18,7 @@ export function historyQuery(params) { export function parkingQuery(params) { return request({ - url: '/api/queryParkOrder/billQuery', + url: 'queryParkOrder/billQuery', method: 'post', data: params }) diff --git a/src/components/orderPay.vue b/src/components/orderPay.vue index 7e03bbf..c925bbd 100644 --- a/src/components/orderPay.vue +++ b/src/components/orderPay.vue @@ -100,14 +100,16 @@ export default { if (this.clientBrowser == '支付宝') { // 支付宝支付 var aliParams = {}; + console.log(this.orderId) + console.log(typeof this.orderId) aliParams.orderId = this.orderId; aliParams.carNumber = this.carNumber; aliParams.payType = 1;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号 aliParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付 aliParams.paySrcType = this.paySrcType;//101停车支付 aliParams.orgId = this.$utils.myOrgId, - aliParams.backType = 2, - aliParams.recordArreaInfos = JSON.stringify(this.orderId); + aliParams.backType = 2, + aliParams.recordArreaInfos = JSON.stringify(this.orderId); aliPay(aliParams).then(response => { console.log(response) diff --git a/src/components/parkRecord.vue b/src/components/parkRecord.vue index a6849a7..9b61144 100644 --- a/src/components/parkRecord.vue +++ b/src/components/parkRecord.vue @@ -48,7 +48,7 @@
-
+

总欠费金额: ¥{{(allMoney/100).toFixed(2)}} diff --git a/src/utils/request.js b/src/utils/request.js index c10479b..3e422b6 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -7,8 +7,8 @@ const service = axios.create({ // baseURL: 'http://39.98.54.240:8090', // url = base url + request url //baseURL: _url, // url = base url + request url - // baseURL: 'http://39.98.54.240:8090', // url = base url + request url - withCredentials: true, // send cookies when cross-domain requests + baseURL: 'http://pay.service.huangshiparking.com/', // url = base url + request url + // withCredentials: true, // send cookies when cross-domain requests timeout: 6000 // request timeout }) diff --git a/src/utils/utils.js b/src/utils/utils.js index f164ea3..22b05db 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -25,13 +25,13 @@ export default { } } objb.sort(compare); - var strmd5 = 'ny1u72b6k374sg379z0kqjgfxe2ycnpw'; + var strmd5 = '14318527b13840c2a4af63fef52c2d6e'; for(var i=0;i'+strmd5); strmd5 = md5(strmd5); strmd5=strmd5.toUpperCase(); @@ -111,11 +111,17 @@ export default { }, // 0eca8f5373ca4866aec2f8e9d9367104 老的id // 14318527b13840c2a4af63fef52c2d6e 老的签名 - myVarAppid:'ud8yq5tv0inxupc05xfeau39jywlqoj2',// 公共请求Appid + + + // ud8yq5tv0inxupc05xfeau39jywlqoj2 新的id + // ny1u72b6k374sg379z0kqjgfxe2ycnpw 新的签名 + + + myVarAppid:'0eca8f5373ca4866aec2f8e9d9367104',// 公共请求Appid myDeviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E', // 公共请求设备信息 - myVxAppId: 'wx2af2bab90d433c86' , // 微信赤峰 appid + myVxAppId: 'wxa1a66cc7d263afe6' , // 微信赤峰 appid //黄石 appid wxa1a66cc7d263afe6 myOrgId: '10003' // 归属地 赤峰id