Browse Source

登录优化

master
陈裕财 4 years ago
parent
commit
71782f3509
  1. 8
      config/index.js
  2. 19
      src/views/login/components/login.vue
  3. 2
      src/views/login/index.vue

8
config/index.js

@ -17,9 +17,9 @@ module.exports = {
'^/api/m1/xm': '/xm'
}
},
/**
'/api/m1/sys': {
target: 'http://192.168.0.103:7015',
target: 'http://localhost:7015',
changeOrigin: true,
pathRewrite: {
'^/api/m1/sys': '/sys'
@ -27,13 +27,13 @@ module.exports = {
},
'/api/m1/pay': {
target: 'http://192.168.0.103:7125',
target: 'http://localhost:7125',
changeOrigin: true,
pathRewrite: {
'^/api/m1/pay': '/pay'
}
},
**/
/**
'/api/m1/workflow': {
target: 'http://localhost:7080',

19
src/views/login/components/login.vue

@ -269,29 +269,10 @@ export default {
if(res.data.tips.isOk==true){
this.loading = true;
this.$store.dispatch('GetUserInfo').then((res2)=>{
//this.userDeptid=res2.data.userInfo.deptid
this.loading = false
if(res2.data.tips.isOk==true){
if(this.$store.state.user.myBranchs==null ||this.$store.state.user.myBranchs.length==0||this.$store.state.user.myDepts==null || this.$store.state.user.myDepts.length<=0){
//if(1==1){
//this.$message.error("\n ");
this.addBranchFormVisible=true;
}else if(this.$store.state.user.myDepts.length>1 ){
//this.$message.info("");
if( !this.userDeptid ){
this.userDeptid=res2.data.userInfo.deptid
this.deptSelectVisible=true;
}else{
this.rolesChecked();
}
//this.$router.push({ path: 'mdp/sys/branch/BranchAdd' })
}else if(this.$store.state.user.myDepts.length==1){
//
this.userDeptid=res2.data.userInfo.deptid
this.rolesChecked();
}else{
this.rolesChecked();
}
}else{
this.$message.error(res2.data.tips.msg);
}

2
src/views/login/index.vue

@ -270,11 +270,13 @@ export default {
}
this.$store.dispatch("LoginByUserloginid",loginParams).then(res => {
this.loading = false
debugger;
if(res.data.tips.isOk==true){
console.log(this.$store);
this.loading = true;
this.$store.dispatch('GetUserInfo').then((res2)=>{
//this.userDeptid=res2.data.userInfo.deptid
debugger;
this.loading = false
if(res2.data.tips.isOk==true){
if(this.$store.state.user.myDepts.length>1 ){

Loading…
Cancel
Save