|
@@ -98,6 +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 { getLogoInfo } from "@/api/system/publicConfig";
|
|
import { getLogoInfo } from "@/api/system/publicConfig";
|
|
export default {
|
|
export default {
|
|
name: "login",
|
|
name: "login",
|
|
@@ -290,35 +291,45 @@
|
|
this.getCodeOne();
|
|
this.getCodeOne();
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if(res.data.reset_password){
|
|
|
|
- this.$confirm('账号当前登录密码为默认密码,是否现在修改?', "提示", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(function() {
|
|
|
|
- let routeData = JSON.parse(localStorage.getItem("routeData"))
|
|
|
|
- for(let i=0;i<routeData.length;i++){
|
|
|
|
- if(!routeData[i].hidden&&routeData[i].name != 'Https://www.sxitdlc.com'){
|
|
|
|
- store.dispatch('settings/setPageName', routeData[i].meta.title)
|
|
|
|
- self.$store.commit("SET_SIDEBAR_ROUTERS", routeData[i].children);
|
|
|
|
- // self.$router.push({ path: '/mine' });
|
|
|
|
- self.$router.push({ path: '/comprehensive/system/mine' });
|
|
|
|
- // self.$router.push({ path: '/user/profile' });
|
|
|
|
- break
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }).then(() => {
|
|
|
|
- }).catch(() => {
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
if(res.data.type){
|
|
if(res.data.type){
|
|
localStorage.setItem('userType',res.data.type)
|
|
localStorage.setItem('userType',res.data.type)
|
|
localStorage.setItem('userId',res.data.user_id)
|
|
localStorage.setItem('userId',res.data.user_id)
|
|
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();
|
|
- this.$router.push({ path: this.redirect || "/home" }).catch(()=>{});
|
|
|
|
|
|
+ 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
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ } else {
|
|
|
|
+ this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
|
|
|
|
+ }
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
if (this.captchaOnOff) {
|
|
if (this.captchaOnOff) {
|
|
@@ -349,25 +360,6 @@
|
|
this.loading = false;
|
|
this.loading = false;
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- // if(res.data.reset_password){
|
|
|
|
- // this.$confirm('账号当前登录密码为默认密码,是否现在修改?', "提示", {
|
|
|
|
- // confirmButtonText: "确定",
|
|
|
|
- // cancelButtonText: "取消",
|
|
|
|
- // type: "warning"
|
|
|
|
- // }).then(function() {
|
|
|
|
- // let routeData = JSON.parse(localStorage.getItem("routeData"))
|
|
|
|
- // for(let i=0;i<routeData.length;i++){
|
|
|
|
- // if(!routeData[i].hidden&&routeData[i].name != 'Https://www.sxitdlc.com'){
|
|
|
|
- // store.dispatch('settings/setPageName', routeData[i].meta.title)
|
|
|
|
- // self.$store.commit("SET_SIDEBAR_ROUTERS", routeData[i].children);
|
|
|
|
- // self.$router.push({ path: '/comprehensive/system/mine' });
|
|
|
|
- // break
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }).then(() => {
|
|
|
|
- // }).catch(() => {
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
if(res.data.type){
|
|
if(res.data.type){
|
|
localStorage.setItem('userType',res.data.type)
|
|
localStorage.setItem('userType',res.data.type)
|
|
localStorage.setItem('userId',res.data.user_id)
|
|
localStorage.setItem('userId',res.data.user_id)
|
|
@@ -379,12 +371,7 @@
|
|
this.$router.push({ path: this.redirect || "/comprehensive/system/mine" }).catch(()=>{});
|
|
this.$router.push({ path: this.redirect || "/comprehensive/system/mine" }).catch(()=>{});
|
|
// let routeData = JSON.parse(localStorage.getItem("routeData"))
|
|
// let routeData = JSON.parse(localStorage.getItem("routeData"))
|
|
// for(let i=0;i<routeData.length;i++){
|
|
// for(let i=0;i<routeData.length;i++){
|
|
- // if(!routeData[i].alwaysShow&&!routeData[i].hidden){
|
|
|
|
- // let urlText = routeData[i].path;
|
|
|
|
- // this.$router.push({ path: urlText });
|
|
|
|
- // console.log("urlText1",urlText)
|
|
|
|
- // return
|
|
|
|
- // }else if (routeData[i].children){
|
|
|
|
|
|
+ // if (routeData[i].children&&!routeData[i].hidden&&routeData[i].alwaysShow){
|
|
// for(let o=0;o<routeData[i].children.length;o++){
|
|
// for(let o=0;o<routeData[i].children.length;o++){
|
|
// if(!routeData[i].children[o].alwaysShow&&!routeData[i].children[o].hidden){
|
|
// if(!routeData[i].children[o].alwaysShow&&!routeData[i].children[o].hidden){
|
|
// let urlText = routeData[i].path + '/' + routeData[i].children[o].path;
|
|
// let urlText = routeData[i].path + '/' + routeData[i].children[o].path;
|