Commit 451455470e23ce60e9fdb35868fad2428bfbe059
1 parent
9393381b
静态码 输入车牌页面 微信授权
Showing
2 changed files
with
11 additions
and
1 deletions
dist 4.zip
0 → 100644
No preview for this file type
src/components/plateNumber.vue
... | ... | @@ -322,9 +322,19 @@ export default { |
322 | 322 | mounted() { |
323 | 323 | console.log(window.location) |
324 | 324 | console.log(this.$route.query) |
325 | + | |
326 | + var appID = this.$utils.myVxAppId; | |
327 | + var code = this.getUrlParam('code'); | |
328 | + var local = window.location.href; | |
329 | + if (code == null || code === '') { | |
330 | + window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appID+'&redirect_uri='+encodeURIComponent(local)+'&response_type=code&scope=snsapi_userinfo&state=1,0#wechat_redirect' | |
331 | + } else { | |
332 | + return code; | |
333 | + } | |
334 | + | |
325 | 335 | let params = this.$route.query |
326 | 336 | if (Object.keys(params).length == 0) { |
327 | - alert('1') | |
337 | + | |
328 | 338 | } else { |
329 | 339 | this.noCarQRcodeInOutPark() |
330 | 340 | } | ... | ... |