fix: 优化体验
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m37s

This commit is contained in:
sexygoat
2026-05-09 16:14:06 +08:00
parent c798cdba7f
commit 3f997063f4
27 changed files with 1191 additions and 62 deletions

View File

@@ -70,13 +70,24 @@
import { useUserStore } from '@/store/index.js';
import { initWxConfig, wxScan, isInWechat } from '@/utils/wxsdk.js';
const POST_BIND_RELOGIN_NOTICE_KEY = 'postBindReloginNotice';
const userStore = useUserStore();
const identifier = ref(uni.getStorageSync('identifier') || '');
const loading = ref(false);
const agreed = ref(true);
const inputFocus = ref(false);
const showError = ref(false);
const wechatAppId = ref('');
onMounted(async () => {
const token = uni.getStorageSync('token');
if (token) {
uni.reLaunch({ url: '/pages/index/index' });
return;
}
showPostBindReloginNotice();
handleWechatCallback();
getPathDeviceId();
@@ -93,12 +104,18 @@
// #endif
});
const identifier = ref('');
const loading = ref(false);
const agreed = ref(true);
const inputFocus = ref(false);
const showError = ref(false);
const wechatAppId = ref('');
const showPostBindReloginNotice = () => {
if (uni.getStorageSync(POST_BIND_RELOGIN_NOTICE_KEY) !== '1') {
return;
}
uni.removeStorageSync(POST_BIND_RELOGIN_NOTICE_KEY);
uni.showToast({
title: '绑定手机号成功,请重新登录',
icon: 'none',
duration: 2500
});
};
const getCode = () => {
const params = new URLSearchParams(window.location.search);
@@ -152,7 +169,7 @@
doLogin();
};
const handleScanLogin = async () => {
const handleScanLogin = async () => {
// #ifdef H5
try {
// 检查是否在微信环境
@@ -218,7 +235,6 @@ const handleScanLogin = async () => {
};
const handleWechatCallback = async () => {
const code = getCode();
const assetToken = sessionStorage.getItem('assetToken');