公众号登录完成
This commit is contained in:
@@ -205,6 +205,7 @@ let timer = {}
|
||||
const oauth2Weixin = params => {
|
||||
const redirect = qs.parseUrl(location.href)
|
||||
delete redirect.query.code
|
||||
delete redirect.query.state
|
||||
return qs.stringifyUrl({
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize",
|
||||
query: {
|
||||
|
||||
@@ -18,6 +18,7 @@ export default {
|
||||
appName: "投票详情",
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
wxCode: v => v.$route.query.code
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -42,12 +43,15 @@ export default {
|
||||
}
|
||||
})
|
||||
} else {//已登录,直接投票
|
||||
|
||||
console.log("投票")
|
||||
}
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.getDetail()
|
||||
if (!!this.wxCode) {
|
||||
this.getWechatToken({module: "AppVote", code: this.wxCode}).then(this.handleVote)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user