提交 9823d33a authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 329a51a3
......@@ -133,7 +133,10 @@ export default {
wechatLogin() {
const appId = 'wx451c01d40d090d7a'
// 回调地址
const redirectURI = `${process.env.VUE_APP_WECHAT_REDIRECT_URL}?needCheck=false&identity=friend&redirectUrl=${window.location.href}`
const redirectURI = `${
process.env.VUE_APP_WECHAT_REDIRECT_URL
}?needCheck=false&identity=friend&redirectUrl=${this.redirectURI ||
location.origin}`
// 微信的地址
const wechatUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURIComponent(
redirectURI
......@@ -149,15 +152,9 @@ export default {
}
},
created() {
this.$store.dispatch('checkLogin').then(isLogin => {
if (isLogin) {
this.loginSuccess({ code: 0 })
} else {
if (this.isWechat && !this.checkWechatLogin()) {
this.wechatLogin()
}
}
})
if (this.isWechat && !this.checkWechatLogin()) {
this.wechatLogin()
}
}
}
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论