This commit is contained in:
xvv 2024-08-05 15:21:00 +08:00
parent 63ea54e1ed
commit d046987ec3
4 changed files with 12 additions and 1 deletions

View File

@ -54,6 +54,10 @@ const user = {
const uuid = userInfo.uuid const uuid = userInfo.uuid
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login(username, password, captchaCode, uuid).then(res => { login(username, password, captchaCode, uuid).then(res => {
if(res.data.token == null ){
this.$router.push({ path: '/login' });
return
}
console.log("user_58",res.data) console.log("user_58",res.data)
// dutyRoleCode // dutyRoleCode

View File

@ -209,6 +209,7 @@ export default {
}, },
methods: { methods: {
hasOneShowingChild(children = [], parent) { hasOneShowingChild(children = [], parent) {
console.log('212')
if (!children) { if (!children) {
children = []; children = [];
} }
@ -236,6 +237,7 @@ export default {
return false return false
}, },
resolvePath(routePath, routeQuery) { resolvePath(routePath, routeQuery) {
console.log('240')
if (isExternal(routePath)) { if (isExternal(routePath)) {
return routePath return routePath
} }

View File

@ -54,11 +54,15 @@ const user = {
const uuid = userInfo.uuid const uuid = userInfo.uuid
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login(username, password, captchaCode, uuid).then(res => { login(username, password, captchaCode, uuid).then(res => {
if(res.data.token == null ){
this.$router.push({ path: '/login' });
return
}
console.log("user_58",res.data) console.log("user_58",res.data)
if (res.data.ownerId !== "3") { if (res.data.ownerId !== "3") {
setToken(res.data.token) setToken(res.data.token)
commit('SET_TOKEN', res.data.token) commit('SET_TOKEN', res.data.token)
// Cookies.remove('IS_BK_LOGIN'); // Cookies.remove('IS_BK_LOGIN');
sessionStorage.removeItem('IS_BK_LOGIN'); sessionStorage.removeItem('IS_BK_LOGIN');

View File

@ -286,6 +286,7 @@ export default {
console.log("dataJSON",data) console.log("dataJSON",data)
location.replace(this.bkUrl+"resource_oilstore?token="+data.token); location.replace(this.bkUrl+"resource_oilstore?token="+data.token);
}else { }else {
app.$router.push({ path: "/Service/index" }).catch(()=>{}); app.$router.push({ path: "/Service/index" }).catch(()=>{});
} }