feat: 7月迭代
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m11s

This commit is contained in:
luo
2026-07-27 18:13:19 +08:00
parent 6a794d88af
commit 4f281da778
27 changed files with 1176 additions and 167 deletions

View File

@@ -245,14 +245,27 @@
const doLogin = async () => {
loading.value = true;
// 丢弃上一轮未完成授权留下的临时凭证,避免校验失败时继续复用。
if (typeof sessionStorage !== 'undefined') {
sessionStorage.removeItem('assetToken');
}
try {
const verifyData = await authApi.verifyAsset(identifier.value);
if (!verifyData?.asset_token) {
throw { msg: '资产校验未返回有效登录凭证' };
}
userStore.setAssetToken(verifyData.asset_token);
userStore.setIdentifier(identifier.value);
await redirectToWxAuth(verifyData.asset_token);
} catch (e) {
console.error('登录失败', e);
uni.showToast({
title: e?.msg || e?.message || '资产校验失败,请稍后重试',
icon: 'none',
duration: 2500
});
loading.value = false;
}
};