添加页面

This commit is contained in:
2025-11-05 17:07:17 +08:00
parent 328721e6e9
commit 886b27218c
29 changed files with 1691 additions and 829 deletions

View File

@@ -1001,16 +1001,32 @@ function dataToImg(data) {
}
// import { loginRc } from '@/apiRc/login/login.js';
// import storeRc from '@/utilsRc/store/index.js';
import storeRc from '@/utilsRc/store/index.js';
import { getToken } from '@/utilsRc/auth.js';
// 跳转到高校毕业页面
function goRc(){
if (checkLogin()) {
// let userInfo = uni.getStorageSync('userInfo')
// console.log(uni.getStorageSync('userInfo'), "uni.getStorageSync('userInfo')");
// storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
// console.log(res, "'res");
navTo('/packageRc/pages/index/index');
// });
let token = getToken();
if( token != null ){
if(storeRc.state.user.type == 'person'){
navTo('/packageRc/pages/index/index');
}else{
navTo('/packageRc/pages/daiban/daiban');
}
console.log(storeRc.state.user.roles, storeRc.state.user.type, 'state')
}else{
let userInfo = uni.getStorageSync('userInfo')
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
// console.log(res, "'res");
storeRc.dispatch('GetInfo').then(res => {
if(res.data.user.userType == 'person'){
navTo('/packageRc/pages/index/index');
}else{
navTo('/packageRc/pages/daiban/daiban');
}
});
});
}
}
}