提交 46cb1156 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 7c42cda5
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
}) })
}, },
// 登录成功 // 登录成功
loginSuccess(response) { loginSuccess(response, delta = 2) {
if (response.code === 0) { if (response.code === 0) {
Cookies.remove('wechat_login_error', { domain: '.ezijing.com' }) Cookies.remove('wechat_login_error', { domain: '.ezijing.com' })
Cookies.remove('wechat_login_no_phone_error', { Cookies.remove('wechat_login_no_phone_error', {
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
this.$store.commit('setToken', response.data.TGC) this.$store.commit('setToken', response.data.TGC)
if (this.isWeapp) { if (this.isWeapp) {
wx.miniProgram.postMessage({ data: { token: response.data.TGC } }) wx.miniProgram.postMessage({ data: { token: response.data.TGC } })
wx.miniProgram.navigateBack({ delta: 2 }) wx.miniProgram.navigateBack({ delta })
return return
} }
if (this.redirectURI) { if (this.redirectURI) {
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
beforeMount() { beforeMount() {
this.$store.dispatch('checkLogin').then(isLogin => { this.$store.dispatch('checkLogin').then(isLogin => {
if (isLogin) { if (isLogin) {
this.loginSuccess({ code: 0, data: { TGC: Cookies.get('TGC') } }) this.loginSuccess({ code: 0, data: { TGC: Cookies.get('TGC') } }, 1)
} else { } else {
if (this.isWechat && !this.checkWechatLogin()) { if (this.isWechat && !this.checkWechatLogin()) {
this.wechatLogin() this.wechatLogin()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论