提交 99c3764f authored 作者: lihuihui's avatar lihuihui

updata

上级 b1a9a46a
...@@ -95,8 +95,10 @@ export default { ...@@ -95,8 +95,10 @@ export default {
api api
.bindWechat(params) .bindWechat(params)
.then(response => { .then(response => {
this.bindVisitor(() => {
this.loginSuccess(response) this.loginSuccess(response)
}) })
})
.catch(error => { .catch(error => {
error.response && this.$toast(error.response.data.message) error.response && this.$toast(error.response.data.message)
}) })
...@@ -123,6 +125,11 @@ export default { ...@@ -123,6 +125,11 @@ export default {
this.$toast(response.msg) this.$toast(response.msg)
} }
}, },
bindVisitor(call) {
return api.bindVisitor({ user_id: window.localStorage.userId }).then(res => {
call()
})
},
wechatLogin() { wechatLogin() {
const appId = 'wxc6044475caf2805a' const appId = 'wxc6044475caf2805a'
const wechatRedirectURL = const wechatRedirectURL =
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论