提交 beceead6 编写于 作者: guangjun.yang's avatar guangjun.yang

分享页面token获取问题

上级 9a7fa664
......@@ -355,11 +355,11 @@ export default {
}
localStorage.setItem('returnUrl', this.shareUrl);
const { token, info } = this.$store.state.user;
this.token = getCookie("couponToken") || token;
this.token = token || getCookie("couponToken");
// 如果有token,但没有用户信息,则获取用户信息
if (this.token && !info.id) {
this.$store.dispatch("setToken", this.token);
// this.$store.dispatch('getUserInfo');
// this.$store.dispatch("setToken", this.token);
this.$store.dispatch('getUserInfo');
}
this.queryByUuid(this.uuid);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册