From 71782f35090664455de46380e84e13d3e12a863e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sat, 30 Apr 2022 18:11:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 8 ++++---- src/views/login/components/login.vue | 27 ++++----------------------- src/views/login/index.vue | 2 ++ 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/config/index.js b/config/index.js index 029c2cfb..371874da 100644 --- a/config/index.js +++ b/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', diff --git a/src/views/login/components/login.vue b/src/views/login/components/login.vue index d60ce41d..cb8019ca 100644 --- a/src/views/login/components/login.vue +++ b/src/views/login/components/login.vue @@ -265,33 +265,14 @@ export default { loginParams.branchId=params.branchId } this.$store.dispatch("LoginByUserloginid",loginParams).then(res => { - this.loading = false + this.loading = false if(res.data.tips.isOk==true){ this.loading = true; - this.$store.dispatch('GetUserInfo').then((res2)=>{ - //this.userDeptid=res2.data.userInfo.deptid + this.$store.dispatch('GetUserInfo').then((res2)=>{ 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){ - //进行角色身份验证 + if(res2.data.tips.isOk==true){ this.userDeptid=res2.data.userInfo.deptid - this.rolesChecked(); - }else{ - this.rolesChecked(); - } + this.rolesChecked(); }else{ this.$message.error(res2.data.tips.msg); } diff --git a/src/views/login/index.vue b/src/views/login/index.vue index bb6c0bb9..88f74b67 100644 --- a/src/views/login/index.vue +++ b/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 ){