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,8 +40,8 @@ | ||
| 40 | </template> | 40 | </template> |
| 41 | 41 | ||
| 42 | <script> | 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 | import { aliPay, getOpenId, vxPayQuery, bankH5Pay } from '@/api/orderPay/orderPay' | 46 | import { aliPay, getOpenId, vxPayQuery, bankH5Pay } from '@/api/orderPay/orderPay' |
| 47 | 47 | ||
| @@ -80,7 +80,6 @@ export default { | @@ -80,7 +80,6 @@ export default { | ||
| 80 | methods: { | 80 | methods: { |
| 81 | getCode() { | 81 | getCode() { |
| 82 | var appID = this.$utils.myVxAppId; | 82 | var appID = this.$utils.myVxAppId; |
| 83 | - alert(appID) | ||
| 84 | var code = this.getUrlParam('code'); | 83 | var code = this.getUrlParam('code'); |
| 85 | var local = window.location.href; | 84 | var local = window.location.href; |
| 86 | if (code == null || code === '') { | 85 | if (code == null || code === '') { |
src/components/parkRecord.vue
| @@ -258,9 +258,7 @@ export default { | @@ -258,9 +258,7 @@ export default { | ||
| 258 | } | 258 | } |
| 259 | }, | 259 | }, |
| 260 | toPayCurrent(i, num) { // 缴纳本次在停费用 | 260 | toPayCurrent(i, num) { // 缴纳本次在停费用 |
| 261 | - | ||
| 262 | var salt = this.$utils.myCommonSalt(32); | 261 | var salt = this.$utils.myCommonSalt(32); |
| 263 | - | ||
| 264 | var params = { | 262 | var params = { |
| 265 | app_id: this.$utils.myVarAppid, | 263 | app_id: this.$utils.myVarAppid, |
| 266 | deviceInfo: this.$utils.myDeviceInfo, | 264 | deviceInfo: this.$utils.myDeviceInfo, |
| @@ -269,7 +267,6 @@ export default { | @@ -269,7 +267,6 @@ export default { | ||
| 269 | orderId: i.orderId, | 267 | orderId: i.orderId, |
| 270 | payOrderType: '101', | 268 | payOrderType: '101', |
| 271 | terminalSource: '3', | 269 | terminalSource: '3', |
| 272 | - | ||
| 273 | } | 270 | } |
| 274 | params.sign = this.$utils.signObject(params) | 271 | params.sign = this.$utils.signObject(params) |
| 275 | appApplyParkOut(params).then(response => { | 272 | appApplyParkOut(params).then(response => { |
| @@ -282,7 +279,7 @@ export default { | @@ -282,7 +279,7 @@ export default { | ||
| 282 | deviceInfo: this.$utils.myDeviceInfo, | 279 | deviceInfo: this.$utils.myDeviceInfo, |
| 283 | salt: salt, | 280 | salt: salt, |
| 284 | sign_type: "md5", | 281 | sign_type: "md5", |
| 285 | - payType: 4, | 282 | + payType: this.$utils.clientBrowsePayType(), |
| 286 | appId: this.$utils.myVxAppId, | 283 | appId: this.$utils.myVxAppId, |
| 287 | orderId: i.orderId, | 284 | orderId: i.orderId, |
| 288 | terminalSource: '7', | 285 | terminalSource: '7', |
| @@ -339,7 +336,7 @@ export default { | @@ -339,7 +336,7 @@ export default { | ||
| 339 | appId: this.$utils.myVxAppId, | 336 | appId: this.$utils.myVxAppId, |
| 340 | orderIds: list, | 337 | orderIds: list, |
| 341 | terminalSource: '7', | 338 | terminalSource: '7', |
| 342 | - payType: 4, | 339 | + payType: this.$utils.clientBrowsePayType(), |
| 343 | orgId: this.$utils.myOrgId, | 340 | orgId: this.$utils.myOrgId, |
| 344 | } | 341 | } |
| 345 | jsondata.sign = this.$utils.signObject(jsondata) | 342 | jsondata.sign = this.$utils.signObject(jsondata) |
src/utils/utils.js
| @@ -91,6 +91,27 @@ export default { | @@ -91,6 +91,27 @@ export default { | ||
| 91 | return '支付宝' | 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 | // 0eca8f5373ca4866aec2f8e9d9367104 老的id | 115 | // 0eca8f5373ca4866aec2f8e9d9367104 老的id |
| 95 | // 14318527b13840c2a4af63fef52c2d6e 老的签名 | 116 | // 14318527b13840c2a4af63fef52c2d6e 老的签名 |
| 96 | 117 |