feat: 未登录状态调整
This commit is contained in:
@@ -5,6 +5,10 @@ export const goLogin = () => uni.reLaunch({ url: "/pages/login/index" });
|
||||
|
||||
// 登录逻辑
|
||||
export const onLogin = (e) => {
|
||||
const token = uni.getStorageSync("token");
|
||||
|
||||
if (token) return;
|
||||
|
||||
const { code } = e.detail;
|
||||
console.info("onLogin code: ", code);
|
||||
|
||||
@@ -18,6 +22,9 @@ export const onLogin = (e) => {
|
||||
|
||||
// 绑定手机号
|
||||
bindPhone(params);
|
||||
|
||||
// 通知刷新
|
||||
uni.$emit("TOKEN_CHANGE");
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user