feat: 登录逻辑调整
This commit is contained in:
@@ -52,7 +52,7 @@ import CheckBox from "@/components/CheckBox/index.vue";
|
||||
import AgreePopup from "./components/AgreePopup/index.vue";
|
||||
import { zniconsMap } from "@/static/fonts/znicons";
|
||||
import { getCurrentConfig } from "@/constant/base";
|
||||
import { getStorageSyncToken } from "@/constant/token";
|
||||
import { getAccessToken } from "@/constant/token";
|
||||
|
||||
const needWxLogin = ref(false);
|
||||
const isAgree = ref(false);
|
||||
@@ -126,15 +126,9 @@ getPrivacyAgreementData();
|
||||
|
||||
// 页面显示时刷新token
|
||||
onShow(async () => {
|
||||
const token = getStorageSyncToken();
|
||||
const res = await refreshToken();
|
||||
|
||||
if (token) {
|
||||
const res = await checkUserPhone();
|
||||
|
||||
needWxLogin.value = res.data;
|
||||
} else {
|
||||
needWxLogin.value = true;
|
||||
}
|
||||
needWxLogin.value = res;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user