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

bug fixes

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