Commit 8676f3af3ed4b732a33aa0b523bae30acc35adc9
1 parent
7728e2e9
payType 34
Showing
3 changed files
with
25 additions
and
8 deletions
src/components/orderPay.vue
... | ... | @@ -40,8 +40,8 @@ |
40 | 40 | </template> |
41 | 41 | |
42 | 42 | <script> |
43 | -import CryptoJS from '../utils/AES.js' | |
44 | -let Base64 = require('js-base64').Base64 | |
43 | +// import CryptoJS from '../utils/AES.js' | |
44 | +// let Base64 = require('js-base64').Base64 | |
45 | 45 | |
46 | 46 | import { aliPay, getOpenId, vxPayQuery, bankH5Pay } from '@/api/orderPay/orderPay' |
47 | 47 | |
... | ... | @@ -80,7 +80,6 @@ export default { |
80 | 80 | methods: { |
81 | 81 | getCode() { |
82 | 82 | var appID = this.$utils.myVxAppId; |
83 | - alert(appID) | |
84 | 83 | var code = this.getUrlParam('code'); |
85 | 84 | var local = window.location.href; |
86 | 85 | if (code == null || code === '') { | ... | ... |
src/components/parkRecord.vue
... | ... | @@ -258,9 +258,7 @@ export default { |
258 | 258 | } |
259 | 259 | }, |
260 | 260 | toPayCurrent(i, num) { // 缴纳本次在停费用 |
261 | - | |
262 | 261 | var salt = this.$utils.myCommonSalt(32); |
263 | - | |
264 | 262 | var params = { |
265 | 263 | app_id: this.$utils.myVarAppid, |
266 | 264 | deviceInfo: this.$utils.myDeviceInfo, |
... | ... | @@ -269,7 +267,6 @@ export default { |
269 | 267 | orderId: i.orderId, |
270 | 268 | payOrderType: '101', |
271 | 269 | terminalSource: '3', |
272 | - | |
273 | 270 | } |
274 | 271 | params.sign = this.$utils.signObject(params) |
275 | 272 | appApplyParkOut(params).then(response => { |
... | ... | @@ -282,7 +279,7 @@ export default { |
282 | 279 | deviceInfo: this.$utils.myDeviceInfo, |
283 | 280 | salt: salt, |
284 | 281 | sign_type: "md5", |
285 | - payType: 4, | |
282 | + payType: this.$utils.clientBrowsePayType(), | |
286 | 283 | appId: this.$utils.myVxAppId, |
287 | 284 | orderId: i.orderId, |
288 | 285 | terminalSource: '7', |
... | ... | @@ -339,7 +336,7 @@ export default { |
339 | 336 | appId: this.$utils.myVxAppId, |
340 | 337 | orderIds: list, |
341 | 338 | terminalSource: '7', |
342 | - payType: 4, | |
339 | + payType: this.$utils.clientBrowsePayType(), | |
343 | 340 | orgId: this.$utils.myOrgId, |
344 | 341 | } |
345 | 342 | jsondata.sign = this.$utils.signObject(jsondata) | ... | ... |
src/utils/utils.js
... | ... | @@ -91,6 +91,27 @@ export default { |
91 | 91 | return '支付宝' |
92 | 92 | } |
93 | 93 | }, |
94 | + | |
95 | + // 1:支付宝 2:微信 3:银联 10:H5 4微信公众号 34 农行 | |
96 | + clientBrowsePayType: function () { // 判断客户端 | |
97 | + if (/MicroMessenger/.test(window.navigator.userAgent)) { | |
98 | + console.log("微信客户端"); | |
99 | + return '4' | |
100 | + } else if (/AlipayClient/.test(window.navigator.userAgent)) { | |
101 | + console.log("支付宝客户端"); | |
102 | + return '1' | |
103 | + } else if (/BankabciPhone/.test(window.navigator.userAgent)) { | |
104 | + console.log("农行客户端"); | |
105 | + return '34' | |
106 | + }else if (/BankabcAndroid/.test(window.navigator.userAgent)) { | |
107 | + console.log("农行客户端"); | |
108 | + return '34' | |
109 | + }else { | |
110 | + console.log("其他浏览器"); | |
111 | + return '1' | |
112 | + } | |
113 | + }, | |
114 | + | |
94 | 115 | // 0eca8f5373ca4866aec2f8e9d9367104 老的id |
95 | 116 | // 14318527b13840c2a4af63fef52c2d6e 老的签名 |
96 | 117 | ... | ... |