Commit d42b99adce3456ef4b2533c94310770205255b80
1 parent
ba482822
宣化聚合 通道码支付
Showing
6 changed files
with
81 additions
and
18 deletions
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: 'td', |
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, '../td/td.html'), |
52 | 52 | ||
53 | // Paths | 53 | // Paths |
54 | - assetsRoot: path.resolve(__dirname, '../dist'), | ||
55 | - assetsSubDirectory: 'static', | 54 | + assetsRoot: path.resolve(__dirname, '../td'), |
55 | + assetsSubDirectory: 'td', | ||
56 | assetsPublicPath: './', | 56 | assetsPublicPath: './', |
57 | 57 | ||
58 | /** | 58 | /** |
src/api/orderPay/orderPay.js
@@ -35,6 +35,14 @@ export function bankH5Pay(params) { // 农行 | @@ -35,6 +35,14 @@ export function bankH5Pay(params) { // 农行 | ||
35 | } | 35 | } |
36 | 36 | ||
37 | 37 | ||
38 | +export function doPay(params) { // 支付信息获取 | ||
39 | + return request({ | ||
40 | + url: 'allInPay/doPay', | ||
41 | + method: 'post', | ||
42 | + data: params | ||
43 | + }) | ||
44 | +} | ||
45 | + | ||
38 | 46 | ||
39 | 47 | ||
40 | 48 |
src/components/dynCodePay.vue
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | 34 | ||
35 | </ul> | 35 | </ul> |
36 | <div style="padding: 20px 18px"> | 36 | <div style="padding: 20px 18px"> |
37 | - <div class="toPay" @click="toPay">{{clientBrowser}}支付</div> | 37 | + <div class="toPay" @click="doPay">{{clientBrowser}}支付</div> |
38 | </div> | 38 | </div> |
39 | 39 | ||
40 | <div v-if="appOrderTimeout.length>0"> | 40 | <div v-if="appOrderTimeout.length>0"> |
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | <script> | 53 | <script> |
54 | 54 | ||
55 | // let Base64 = require('js-base64').Base64 | 55 | // let Base64 = require('js-base64').Base64 |
56 | -import { aliPay, getOpenId, vxPayQuery, bankH5Pay } from "@/api/orderPay/orderPay"; | 56 | +import { aliPay, getOpenId, vxPayQuery, bankH5Pay, doPay } from "@/api/orderPay/orderPay"; |
57 | export default { | 57 | export default { |
58 | name: "dynCodePay", | 58 | name: "dynCodePay", |
59 | data() { | 59 | data() { |
@@ -93,9 +93,9 @@ export default { | @@ -93,9 +93,9 @@ export default { | ||
93 | // console.log(this.orderId) | 93 | // console.log(this.orderId) |
94 | // this.appOrderTimeout = this.$route.query.appOrderTimeout | 94 | // this.appOrderTimeout = this.$route.query.appOrderTimeout |
95 | this.urlAppid = this.$route.query.appId; | 95 | this.urlAppid = this.$route.query.appId; |
96 | - if (this.clientBrowser == "微信") { | ||
97 | - this.webAppCode = this.getCode(); | ||
98 | - } | 96 | + // if (this.clientBrowser == "微信") { |
97 | + // this.webAppCode = this.getCode(); | ||
98 | + // } | ||
99 | }, | 99 | }, |
100 | methods: { | 100 | methods: { |
101 | getCode() { | 101 | getCode() { |
@@ -114,6 +114,32 @@ export default { | @@ -114,6 +114,32 @@ export default { | ||
114 | if (r != null) return unescape(r[2]); | 114 | if (r != null) return unescape(r[2]); |
115 | return null; | 115 | return null; |
116 | }, | 116 | }, |
117 | + doPay(){ | ||
118 | + console.log(this.$utils.clientBrowser()) | ||
119 | + let me = this | ||
120 | + var jsondata = { | ||
121 | + appId:me.$utils.xuanhuaAppid, | ||
122 | + carNumber: me.carNumber, | ||
123 | + orderActFee: me.arrearageActFee, // 应收 | ||
124 | + orderBigType: '100', // 订单大类型 100:停车订单 200:充值订单 300:会员卡订单 | ||
125 | + orderTotalFee: me.orderFee, // 实收 | ||
126 | + payOrderType: this.paySrcType, // 支付单来源 101:停车付款单 102:停车预付单 103:停车补缴单 104 共享车位 201 余额充值单 202 押金充值单 301 会员卡购买单 302 会员卡续费 | ||
127 | + paySource: '3', | ||
128 | + //支付单来源 101:停车付款单 102:停车预付单 103:停车补缴单 104 共享车位 201 余额充值单 202 押金充值单 301 会员卡购买单 302 会员卡续费 | ||
129 | + paySrcType: this.paySrcType, | ||
130 | + payType: this.$utils.clientBrowser()=='支付宝'?'37':'36', // 36微信 37支付宝 | ||
131 | + rltOrderId: this.orderId, | ||
132 | + sourceType: '3', | ||
133 | + orgId: this.$utils.myOrgId, | ||
134 | + terminalSource: this.$utils.commonTerminalSource, | ||
135 | + }; | ||
136 | + jsondata.sign = this.$utils.signObject(jsondata) | ||
137 | + | ||
138 | + doPay(jsondata).then(response => { | ||
139 | + console.log(response.data.payinfo) | ||
140 | + window.location.href = response.data.payinfo | ||
141 | + }) | ||
142 | + }, | ||
117 | toPay() { | 143 | toPay() { |
118 | let me = this; | 144 | let me = this; |
119 | let _order = []; | 145 | let _order = []; |
src/components/pay.vue
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | 44 | ||
45 | </ul> | 45 | </ul> |
46 | <div style="padding: 20px 18px"> | 46 | <div style="padding: 20px 18px"> |
47 | - <div class="toPay" @click="toPay">{{clientBrowser}}支付</div> | 47 | + <div class="toPay" @click="doPay">{{clientBrowser}}支付</div> |
48 | </div> | 48 | </div> |
49 | 49 | ||
50 | <div v-if="appOrderTimeout.length>0"> | 50 | <div v-if="appOrderTimeout.length>0"> |
@@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
63 | <script> | 63 | <script> |
64 | 64 | ||
65 | let Base64 = require("js-base64").Base64; | 65 | let Base64 = require("js-base64").Base64; |
66 | -import { aliPay, getOpenId, vxPayQuery, bankH5Pay } from "@/api/orderPay/orderPay"; | 66 | +import { aliPay, getOpenId, vxPayQuery, bankH5Pay, doPay } from "@/api/orderPay/orderPay"; |
67 | export default { | 67 | export default { |
68 | name: "dynCodePay", | 68 | name: "dynCodePay", |
69 | data() { | 69 | data() { |
@@ -105,11 +105,37 @@ export default { | @@ -105,11 +105,37 @@ export default { | ||
105 | this.orderId = this.$route.query.orderId; | 105 | this.orderId = this.$route.query.orderId; |
106 | // console.log(this.orderId) | 106 | // console.log(this.orderId) |
107 | // this.appOrderTimeout = this.$route.query.appOrderTimeout | 107 | // this.appOrderTimeout = this.$route.query.appOrderTimeout |
108 | - if (this.clientBrowser == "微信") { | ||
109 | - this.webAppCode = this.getCode(); | ||
110 | - } | 108 | + // if (this.clientBrowser == "微信") { |
109 | + // this.webAppCode = this.getCode(); | ||
110 | + // } | ||
111 | }, | 111 | }, |
112 | methods: { | 112 | methods: { |
113 | + doPay(){ | ||
114 | + console.log(this.$utils.clientBrowser()) | ||
115 | + let me = this | ||
116 | + var jsondata = { | ||
117 | + appId:me.$utils.xuanhuaAppid, | ||
118 | + carNumber: me.carNumber, | ||
119 | + orderActFee:this.$route.query.orderTotalFee, // 应收 | ||
120 | + orderBigType: '100', // 订单大类型 100:停车订单 200:充值订单 300:会员卡订单 | ||
121 | + orderTotalFee:this.$route.query.orderFee, // 实收 | ||
122 | + payOrderType: this.paySrcType, // 支付单来源 101:停车付款单 102:停车预付单 103:停车补缴单 104 共享车位 201 余额充值单 202 押金充值单 301 会员卡购买单 302 会员卡续费 | ||
123 | + paySource: '3', | ||
124 | + //支付单来源 101:停车付款单 102:停车预付单 103:停车补缴单 104 共享车位 201 余额充值单 202 押金充值单 301 会员卡购买单 302 会员卡续费 | ||
125 | + paySrcType: this.paySrcType, | ||
126 | + payType: this.$utils.clientBrowser()=='支付宝'?'37':'36', // 36微信 37支付宝 | ||
127 | + rltOrderId: this.orderId, | ||
128 | + sourceType: '3', | ||
129 | + orgId: this.$utils.myOrgId, | ||
130 | + terminalSource: this.$utils.commonTerminalSource, | ||
131 | + }; | ||
132 | + jsondata.sign = this.$utils.signObject(jsondata) | ||
133 | + | ||
134 | + doPay(jsondata).then(response => { | ||
135 | + console.log(response.data.payinfo) | ||
136 | + window.location.href = response.data.payinfo | ||
137 | + }) | ||
138 | + }, | ||
113 | getCode() { | 139 | getCode() { |
114 | var appID = this.$utils.myVxAppId; | 140 | var appID = this.$utils.myVxAppId; |
115 | // alert(appID) | 141 | // alert(appID) |
src/utils/request.js
@@ -10,7 +10,7 @@ const service = axios.create({ | @@ -10,7 +10,7 @@ const service = axios.create({ | ||
10 | 10 | ||
11 | // https://dev.renniting.cn/pay/ 赤峰农行测试环境 | 11 | // https://dev.renniting.cn/pay/ 赤峰农行测试环境 |
12 | 12 | ||
13 | - baseURL: 'https://pay.ccccitd.cc', // url = base url + request url | 13 | + baseURL: 'http://7pz385.natappfree.cc', // url = base url + request url |
14 | // withCredentials: true, // send cookies when cross-domain requests | 14 | // withCredentials: true, // send cookies when cross-domain requests |
15 | timeout: 6000 // request timeout | 15 | timeout: 6000 // request timeout |
16 | }) | 16 | }) |
src/utils/utils.js
@@ -173,7 +173,7 @@ export default { | @@ -173,7 +173,7 @@ export default { | ||
173 | 173 | ||
174 | 174 | ||
175 | 175 | ||
176 | - myVarAppid:'0eca8f5373ca4866aec2f8e9d9367104',// 公共请求Appid | 176 | + myVarAppid:'lrpo55tmveqe07w3gpovzgx34pdez7eh',// 公共请求Appid |
177 | 177 | ||
178 | myDeviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E', // 公共请求设备信息 | 178 | myDeviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E', // 公共请求设备信息 |
179 | 179 | ||
@@ -181,6 +181,9 @@ export default { | @@ -181,6 +181,9 @@ export default { | ||
181 | 181 | ||
182 | myOrgId: '10120', | 182 | myOrgId: '10120', |
183 | 183 | ||
184 | + xuanhuaAppid:'00276515', | ||
185 | + commonTerminalSource:'7', | ||
186 | + | ||
184 | myGetSign: function (objb) { // 获取签名 | 187 | myGetSign: function (objb) { // 获取签名 |
185 | var compare = function (obj1, obj2) { | 188 | var compare = function (obj1, obj2) { |
186 | var val1 = obj1.keyname; | 189 | var val1 = obj1.keyname; |
@@ -194,13 +197,13 @@ export default { | @@ -194,13 +197,13 @@ export default { | ||
194 | } | 197 | } |
195 | } | 198 | } |
196 | objb.sort(compare); | 199 | objb.sort(compare); |
197 | - var strmd5 = '14318527b13840c2a4af63fef52c2d6e'; | 200 | + var strmd5 = 'gz8wfwd0gn1etamjjhzey1ggcz78pfvd'; |
198 | for(var i=0;i<objb.length;i++){ | 201 | for(var i=0;i<objb.length;i++){ |
199 | if(objb[i].value != null&&objb[i].value != ''){ | 202 | if(objb[i].value != null&&objb[i].value != ''){ |
200 | strmd5 += objb[i].keyname+objb[i].value; | 203 | strmd5 += objb[i].keyname+objb[i].value; |
201 | } | 204 | } |
202 | } | 205 | } |
203 | - strmd5 += '14318527b13840c2a4af63fef52c2d6e'; | 206 | + strmd5 += 'gz8wfwd0gn1etamjjhzey1ggcz78pfvd'; |
204 | // console.log('strmd5-------->'+strmd5); | 207 | // console.log('strmd5-------->'+strmd5); |
205 | strmd5 = md5(strmd5); | 208 | strmd5 = md5(strmd5); |
206 | strmd5=strmd5.toUpperCase(); | 209 | strmd5=strmd5.toUpperCase(); |