This commit is contained in:
@@ -305,8 +305,9 @@
|
||||
};
|
||||
|
||||
const loadAssetInfo = async () => {
|
||||
const identifier = userStore.state.identifier;
|
||||
const identifier = String(userStore.state.identifier || uni.getStorageSync('identifier') || '').trim();
|
||||
if (!identifier) return;
|
||||
if (userStore.state.identifier !== identifier) userStore.setIdentifier(identifier);
|
||||
const context = getSessionContext();
|
||||
|
||||
loading.value = true;
|
||||
@@ -401,11 +402,18 @@
|
||||
};
|
||||
|
||||
const handleIndexEntry = async () => {
|
||||
if (userStore.state.loginPending) return;
|
||||
const token = uni.getStorageSync('token');
|
||||
if (!token) {
|
||||
const identifier = String(userStore.state.identifier || uni.getStorageSync('identifier') || '').trim();
|
||||
if (!token || !identifier) {
|
||||
if (token && !identifier) {
|
||||
userStore.clearUser();
|
||||
uni.showToast({ title: '缺少资产标识,请重新输入或扫码登录', icon: 'none' });
|
||||
}
|
||||
uni.reLaunch({ url: '/pages/login/login' });
|
||||
return;
|
||||
}
|
||||
if (userStore.state.identifier !== identifier) userStore.setIdentifier(identifier);
|
||||
|
||||
if (indexEntryChecking.value) return;
|
||||
indexEntryChecking.value = true;
|
||||
@@ -1001,7 +1009,11 @@
|
||||
awaitingHomeReminders.value = true;
|
||||
notificationFallbackPending = false;
|
||||
notificationQueued = false;
|
||||
if (!getSessionContext().token) {
|
||||
if (userStore.state.loginPending) {
|
||||
awaitingHomeReminders.value = false;
|
||||
return;
|
||||
}
|
||||
if (!getSessionContext().token || !String(userStore.state.identifier || uni.getStorageSync('identifier') || '').trim()) {
|
||||
awaitingHomeReminders.value = false;
|
||||
handleIndexEntry();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user