Commit cfc645f5d8ec2e72968ca12897510e6cb4f5fb0e
1 parent
2a6ff46a
app 扫码识别
Showing
3 changed files
with
27 additions
and
8 deletions
src/components/parkEnter.vue
| ... | ... | @@ -21,7 +21,13 @@ export default { |
| 21 | 21 | }, |
| 22 | 22 | created() { |
| 23 | 23 | this.query = this.$utils.getQueryString(window.location) |
| 24 | - console.log(this.query) | |
| 24 | + // console.log(this.query) | |
| 25 | + console.log(this.$route.query.plNo) | |
| 26 | + // alert(this.$utils.IsWeixinOrAlipay()) | |
| 27 | + if(this.$utils.IsWeixinOrAlipay() == 5){ | |
| 28 | + window.location.href = 'https://park.ijiangyin.com?plNo='+this.$route.query.plNo+'&parkingId='+this.$route.query.parkingId+'&channelId='+this.$route.query.channelId+'&direction='+this.$route.query.direction+'&codeType='+this.$route.query.codeType | |
| 29 | + } | |
| 30 | + | |
| 25 | 31 | }, |
| 26 | 32 | methods: { |
| 27 | 33 | onHandle: function () { | ... | ... |
src/components/plateNumber.vue
| ... | ... | @@ -312,9 +312,11 @@ export default { |
| 312 | 312 | } |
| 313 | 313 | }, |
| 314 | 314 | mounted() { |
| 315 | + console.log(this.$utils.IsWeixinOrAlipay()) | |
| 316 | + // alert(this.$utils.IsWeixinOrAlipay()) | |
| 315 | 317 | |
| 316 | 318 | console.log(window.location) |
| 317 | - console.log(this.$route.query) | |
| 319 | + console.log(this.$route.query.plNo) | |
| 318 | 320 | // if (this.$utils.clientBrowser() == "微信") { |
| 319 | 321 | // var appID = this.$utils.myVxAppId; |
| 320 | 322 | // var code = this.getUrlParam('code'); |
| ... | ... | @@ -326,13 +328,17 @@ export default { |
| 326 | 328 | // } |
| 327 | 329 | // } |
| 328 | 330 | |
| 331 | + if(this.$utils.IsWeixinOrAlipay() == 5){ | |
| 332 | + window.location.href = 'https://park.ijiangyin.com?plNo='+this.$route.query.plNo+'&parkingId='+this.$route.query.parkingId+'&channelId='+this.$route.query.channelId+'&direction='+this.$route.query.direction+'&codeType='+this.$route.query.codeType | |
| 333 | + }else{ | |
| 334 | + let params = this.$route.query | |
| 335 | + if (Object.keys(params).length == 0) { | |
| 329 | 336 | |
| 330 | - let params = this.$route.query | |
| 331 | - if (Object.keys(params).length == 0) { | |
| 332 | - | |
| 333 | - } else { | |
| 334 | - this.noCarQRcodeInOutPark() | |
| 337 | + } else { | |
| 338 | + this.noCarQRcodeInOutPark() | |
| 339 | + } | |
| 335 | 340 | } |
| 341 | + | |
| 336 | 342 | }, |
| 337 | 343 | methods: { |
| 338 | 344 | getUrlParam(name) { | ... | ... |
src/utils/utils.js
| ... | ... | @@ -45,6 +45,7 @@ export default { |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | IsWeixinOrAlipay: function () { |
| 48 | + // alert('当前环境'+window.navigator.userAgent) | |
| 48 | 49 | if (/MicroMessenger/.test(window.navigator.userAgent)) { |
| 49 | 50 | console.log("微信客户端"); |
| 50 | 51 | //this.switchShow("wxPay"); |
| ... | ... | @@ -59,7 +60,13 @@ export default { |
| 59 | 60 | } else if (/BankabcAndroid/.test(window.navigator.userAgent)) { |
| 60 | 61 | console.log("农行客户端"); |
| 61 | 62 | return '34' |
| 62 | - } else { | |
| 63 | + } else if (/ByAndroid/.test(window.navigator.userAgent)) { | |
| 64 | + console.log("最江阴"); | |
| 65 | + return '5' | |
| 66 | + } else if (/ByIphone/.test(window.navigator.userAgent)) { | |
| 67 | + console.log("最江阴"); | |
| 68 | + return '5' | |
| 69 | + }else { | |
| 63 | 70 | console.log("其他浏览器"); |
| 64 | 71 | return 1 |
| 65 | 72 | } | ... | ... |