一体机登录功能开发

This commit is contained in:
冯辉
2025-11-14 18:10:59 +08:00
parent 9cda4eacb3
commit c798f1bdf2
14 changed files with 1317 additions and 146 deletions

View File

@@ -425,6 +425,7 @@ const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction
import { onLoad, onShow } from '@dcloudio/uni-app';
import { storeToRefs } from 'pinia';
import useUserStore from '@/stores/useUserStore';
import { checkLoginAndNavigate, getPlatformType } from '@/utils/loginHelper';
const { userInfo, hasLogin, token } = storeToRefs(useUserStore());
// 计算是否显示求职者内容
@@ -685,8 +686,8 @@ watch([hasLogin, userInfo], () => {
const checkLogin = () => {
const tokenValue = uni.getStorageSync('token') || '';
if (!tokenValue || !hasLogin.value) {
// 未登录,打开授权弹窗
wxAuthLoginRef.value?.open();
// 未登录,根据平台类型跳转到对应登录页面
checkLoginAndNavigate();
return false;
}
return true;