diff --git a/src/components/parkEnter.vue b/src/components/parkEnter.vue index d06c338..094534c 100644 --- a/src/components/parkEnter.vue +++ b/src/components/parkEnter.vue @@ -21,7 +21,13 @@ export default { }, created() { this.query = this.$utils.getQueryString(window.location) - console.log(this.query) + // console.log(this.query) + console.log(this.$route.query.plNo) + // alert(this.$utils.IsWeixinOrAlipay()) + if(this.$utils.IsWeixinOrAlipay() == 5){ + 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 + } + }, methods: { onHandle: function () { diff --git a/src/components/plateNumber.vue b/src/components/plateNumber.vue index c2ce1da..ff0929b 100644 --- a/src/components/plateNumber.vue +++ b/src/components/plateNumber.vue @@ -312,9 +312,11 @@ export default { } }, mounted() { + console.log(this.$utils.IsWeixinOrAlipay()) + // alert(this.$utils.IsWeixinOrAlipay()) console.log(window.location) - console.log(this.$route.query) + console.log(this.$route.query.plNo) // if (this.$utils.clientBrowser() == "微信") { // var appID = this.$utils.myVxAppId; // var code = this.getUrlParam('code'); @@ -326,13 +328,17 @@ export default { // } // } + if(this.$utils.IsWeixinOrAlipay() == 5){ + 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 + }else{ + let params = this.$route.query + if (Object.keys(params).length == 0) { - let params = this.$route.query - if (Object.keys(params).length == 0) { - - } else { - this.noCarQRcodeInOutPark() + } else { + this.noCarQRcodeInOutPark() + } } + }, methods: { getUrlParam(name) { diff --git a/src/utils/utils.js b/src/utils/utils.js index b1c7885..e8a7bc9 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -45,6 +45,7 @@ export default { IsWeixinOrAlipay: function () { + // alert('当前环境'+window.navigator.userAgent) if (/MicroMessenger/.test(window.navigator.userAgent)) { console.log("微信客户端"); //this.switchShow("wxPay"); @@ -59,7 +60,13 @@ export default { } else if (/BankabcAndroid/.test(window.navigator.userAgent)) { console.log("农行客户端"); return '34' - } else { + } else if (/ByAndroid/.test(window.navigator.userAgent)) { + console.log("最江阴"); + return '5' + } else if (/ByIphone/.test(window.navigator.userAgent)) { + console.log("最江阴"); + return '5' + }else { console.log("其他浏览器"); return 1 }