|
@@ -98,7 +98,7 @@
|
|
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
|
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
|
import store from '@/store'
|
|
import store from '@/store'
|
|
import { getCodeImg,initPage,sendCode,phoneLogin } from "@/api/login";
|
|
import { getCodeImg,initPage,sendCode,phoneLogin } from "@/api/login";
|
|
- // import { getRouters } from "@/api/menu";
|
|
|
|
|
|
+ import { getRouters } from "@/api/menu";
|
|
import { getLogoInfo } from "@/api/system/publicConfig";
|
|
import { getLogoInfo } from "@/api/system/publicConfig";
|
|
export default {
|
|
export default {
|
|
name: "login",
|
|
name: "login",
|
|
@@ -297,43 +297,43 @@
|
|
localStorage.setItem('identity',res.data.screen_token);
|
|
localStorage.setItem('identity',res.data.screen_token);
|
|
localStorage.setItem('identityType',res.data.screen_type);
|
|
localStorage.setItem('identityType',res.data.screen_type);
|
|
}
|
|
}
|
|
- // this.getRouters().then(response => {
|
|
|
|
- // console.log("responseresponseresponseresponse",response)
|
|
|
|
- // });
|
|
|
|
this.fullScreen();
|
|
this.fullScreen();
|
|
if(res.data.type == 22){
|
|
if(res.data.type == 22){
|
|
- this.$router.push({ path: this.redirect || "/comprehensive/system/mine" }).catch(()=>{});
|
|
|
|
- // let routeData = JSON.parse(localStorage.getItem("routeData"))
|
|
|
|
- // for(let i=0;i<routeData.length;i++){
|
|
|
|
- // if (routeData[i].children&&!routeData[i].hidden&&routeData[i].alwaysShow){
|
|
|
|
- // for(let o=0;o<routeData[i].children.length;o++){
|
|
|
|
- // if(!routeData[i].children[o].alwaysShow&&!routeData[i].children[o].hidden){
|
|
|
|
- // let urlText = routeData[i].path + '/' + routeData[i].children[o].path;
|
|
|
|
- // this.$router.push({ path: urlText });
|
|
|
|
- // console.log("urlText2",urlText)
|
|
|
|
- // return
|
|
|
|
- // }else{
|
|
|
|
- // if(routeData[i].children[o].children){
|
|
|
|
- // for(let x=0;x<routeData[i].children[o].children.length;x++){
|
|
|
|
- // if(!routeData[i].children[o].children[x].alwaysShow&&!routeData[i].children[o].children[x].hidden){
|
|
|
|
- // let urlText = routeData[i].path + '/' + routeData[i].children[o].path + '/' + routeData[i].children[o].children[x].path;
|
|
|
|
- // this.$router.push({ path: urlText });
|
|
|
|
- // console.log("urlText3",urlText)
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
|
|
+ getRouters().then(response => {
|
|
|
|
+ // let routeData = JSON.parse(localStorage.getItem("routeData"))
|
|
|
|
+ let routeData = response.data;
|
|
|
|
+ for(let i=0;i<routeData.length;i++){
|
|
|
|
+ if (routeData[i].children&&!routeData[i].hidden&&routeData[i].alwaysShow){
|
|
|
|
+ for(let o=0;o<routeData[i].children.length;o++){
|
|
|
|
+ if(!routeData[i].children[o].alwaysShow&&!routeData[i].children[o].hidden){
|
|
|
|
+ let urlText = routeData[i].path + '/' + routeData[i].children[o].path;
|
|
|
|
+ this.$router.push({ path: this.redirect || urlText }).catch(()=>{});
|
|
|
|
+ return
|
|
|
|
+ }else{
|
|
|
|
+ if(routeData[i].children[o].children){
|
|
|
|
+ for(let x=0;x<routeData[i].children[o].children.length;x++){
|
|
|
|
+ if(!routeData[i].children[o].children[x].alwaysShow&&!routeData[i].children[o].children[x].hidden){
|
|
|
|
+ let urlText = routeData[i].path + '/' + routeData[i].children[o].path + '/' + routeData[i].children[o].children[x].path;
|
|
|
|
+ this.$router.push({ path: this.redirect || urlText }).catch(()=>{});
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
|
|
+ console.log('1');
|
|
|
|
+ this.loading = false;
|
|
|
|
+ // this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
|
|
this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
|
|
this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
|
|
}
|
|
}
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
if (this.captchaOnOff) {
|
|
if (this.captchaOnOff) {
|
|
- this.getCode();
|
|
|
|
|
|
+ this.getCodeOne();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -368,31 +368,32 @@
|
|
}
|
|
}
|
|
this.fullScreen();
|
|
this.fullScreen();
|
|
if(res.data.type == 22){
|
|
if(res.data.type == 22){
|
|
- this.$router.push({ path: this.redirect || "/comprehensive/system/mine" }).catch(()=>{});
|
|
|
|
- // let routeData = JSON.parse(localStorage.getItem("routeData"))
|
|
|
|
- // for(let i=0;i<routeData.length;i++){
|
|
|
|
- // if (routeData[i].children&&!routeData[i].hidden&&routeData[i].alwaysShow){
|
|
|
|
- // for(let o=0;o<routeData[i].children.length;o++){
|
|
|
|
- // if(!routeData[i].children[o].alwaysShow&&!routeData[i].children[o].hidden){
|
|
|
|
- // let urlText = routeData[i].path + '/' + routeData[i].children[o].path;
|
|
|
|
- // this.$router.push({ path: urlText });
|
|
|
|
- // console.log("urlText2",urlText)
|
|
|
|
- // return
|
|
|
|
- // }else{
|
|
|
|
- // if(routeData[i].children[o].children){
|
|
|
|
- // for(let x=0;x<routeData[i].children[o].children.length;x++){
|
|
|
|
- // if(!routeData[i].children[o].children[x].alwaysShow&&!routeData[i].children[o].children[x].hidden){
|
|
|
|
- // let urlText = routeData[i].path + '/' + routeData[i].children[o].path + '/' + routeData[i].children[o].children[x].path;
|
|
|
|
- // this.$router.push({ path: urlText });
|
|
|
|
- // console.log("urlText3",urlText)
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
|
|
+ // this.$router.push({ path: this.redirect || "/comprehensive/system/mine" }).catch(()=>{});
|
|
|
|
+ getRouters().then(response => {
|
|
|
|
+ // let routeData = JSON.parse(localStorage.getItem("routeData"))
|
|
|
|
+ let routeData = response.data;
|
|
|
|
+ for(let i=0;i<routeData.length;i++){
|
|
|
|
+ if (routeData[i].children&&!routeData[i].hidden&&routeData[i].alwaysShow){
|
|
|
|
+ for(let o=0;o<routeData[i].children.length;o++){
|
|
|
|
+ if(!routeData[i].children[o].alwaysShow&&!routeData[i].children[o].hidden){
|
|
|
|
+ let urlText = routeData[i].path + '/' + routeData[i].children[o].path;
|
|
|
|
+ this.$router.push({ path: this.redirect || urlText }).catch(()=>{});
|
|
|
|
+ return
|
|
|
|
+ }else{
|
|
|
|
+ if(routeData[i].children[o].children){
|
|
|
|
+ for(let x=0;x<routeData[i].children[o].children.length;x++){
|
|
|
|
+ if(!routeData[i].children[o].children[x].alwaysShow&&!routeData[i].children[o].children[x].hidden){
|
|
|
|
+ let urlText = routeData[i].path + '/' + routeData[i].children[o].path + '/' + routeData[i].children[o].children[x].path;
|
|
|
|
+ this.$router.push({ path: this.redirect || urlText }).catch(()=>{});
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
|
|
this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
|
|
}
|
|
}
|