添加页面
This commit is contained in:
@@ -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');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user