diff --git a/public/js/config.js b/public/js/config.js index 9210af6b..93f5448a 100644 --- a/public/js/config.js +++ b/public/js/config.js @@ -18,7 +18,7 @@ var PROJECT = { } -var PROJECT_TYPE = PROJECT.local_test +var PROJECT_TYPE = PROJECT.online_zjsj var headerShow = true; // 是否显示头部 var tabsShow = true; // 是否显示tabs diff --git a/src/assets/js/http.js b/src/assets/js/http.js index f5cf25e4..672b7333 100644 --- a/src/assets/js/http.js +++ b/src/assets/js/http.js @@ -41,10 +41,10 @@ if (process.env.NODE_ENV == 'development') { // tag: 本地 // axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地 // axios.defaults.baseURL = 'http://192.168.34.116:6023/' // 邱平毅本地 - axios.defaults.baseURL = 'http://192.168.34.117:6023/' // 杨杰本地 + // axios.defaults.baseURL = 'http://192.168.34.117:6023/' // 杨杰本地 // axios.defaults.baseURL = 'http://ue6a4s.natappfree.cc' // 邱平毅vpn本地 // axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋 - // axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上 + axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上 // axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1 // axios.defaults.baseURL ='http://47.97.202.104:6023/' //金林湾线上 // axios.defaults.baseURL = 'http://192.168.34.231:6023/'; //杨思瑞本地 diff --git a/src/pages/index/index.js b/src/pages/index/index.js index fc8717e1..4a8f7820 100644 --- a/src/pages/index/index.js +++ b/src/pages/index/index.js @@ -159,15 +159,35 @@ function handler(data, sn) { break case 5: case 6: - if (data.styleType == 1 || !data.styleType) { - router.push('/projectIndex') - } else if (data.styleType == 2) { - router.push('/projectV2/taskList') - } else { - router.push('/projectV3/taskList') + if(PROJECT_TYPE != "zjsj"){ + //看看项目看板内有没有菜单 + let arr = data.menuAuthority.moduleList + let arr2=[] + arr.forEach(element => { + if(element.moduleType==4){ + arr2.push(element) + return + } + }); + console.log('arr2',arr2) + // 如果数组为空表示该用户没有权限访问 + if (!arr2.length) { + this.$router.push("/projectIndex"); + }else{ + this.$router.push(arr2[0].modulePath); + } + }else{ + if (data.styleType == 1 || !data.styleType) { + router.push('/projectIndex') + } else if (data.styleType == 2) { + router.push('/projectV2/taskList') + } else { + router.push('/projectV3/taskList') + } + store.commit('setProjectSn', data.sn) + break } - store.commit('setProjectSn', data.sn) - break + } // this.selectMp3FileList() } @@ -252,8 +272,7 @@ router.beforeEach((to, form, next) => { } else if (LOGINTYPE == 3) { projectLoginApi(account).then(tentative) } - - } else { + }else { if (COMPANY == 'xingxuan') return next() if (store.state.userInfo) { next(); diff --git a/src/views/home/login_v1.vue b/src/views/home/login_v1.vue index 9fe25bd2..0b2eb085 100644 --- a/src/views/home/login_v1.vue +++ b/src/views/home/login_v1.vue @@ -462,7 +462,7 @@ export default { if (valid) { if (LOGINTYPE == 1) { loginApi(this.form).then((res) => { - console.log("--------------------10"); + console.log("--------------------么么儿们10"); console.log(res.result); this.parseLoginData(res.result); }); @@ -472,7 +472,9 @@ export default { companyLoginApi(this.form).then((res) => { this.parseLoginData(res.result); }); - } else if (LOGINTYPE == 3) { + } else if(LOGINTYPE == 5){ + console.log('中建四局项目账号') + }else if (LOGINTYPE == 3) { console.log(333333333); projectLoginApi(this.form).then((res) => { @@ -513,7 +515,7 @@ export default { }); } }); - } else { + }else { this.$refs["form2"].validate((valid) => { if (valid) { loginPhoneApi(this.form2).then((res) => { @@ -614,26 +616,38 @@ export default { this.$router.push(companyModule[0].modulePath); break; case 5: - // styleType == 3 衢州版 - if (data.styleType == 1 || !data.styleType) { - this.$router.push("/projectIndex"); - } else if (data.styleType == 2) { - this.$router.push("/projectV2/taskList"); - } else { - this.$router.push("/projectV3/taskList"); - } - this.$store.commit("setProjectSn", data.sn); - break; case 6: - if (data.styleType == 1 || !data.styleType) { - this.$router.push("/projectIndex"); - } else if (data.styleType == 2) { - this.$router.push("/projectV2/taskList"); - } else { - this.$router.push("/projectV3/taskList"); + // 中建四局 + if (this.projectType == "zjsj"){ + console.log('是这里吗') + //看看项目看板内有没有菜单 + let arr = data.menuAuthority.moduleList + let arr2=[] + arr.forEach(element => { + if(element.moduleType==4){ + arr2.push(element) + return + } + }); + console.log('arr2',arr2) + // 如果数组为空表示该用户没有权限访问 + if (!arr2.length) { + this.$router.push("/projectIndex"); + }else{ + this.$router.push(arr2[0].modulePath); + } + }else{ + // styleType == 3 衢州版 + if (data.styleType == 1 || !data.styleType ) { + this.$router.push("/projectIndex"); + } else if (data.styleType == 2) { + this.$router.push("/projectV2/taskList"); + }else { + this.$router.push("/projectV3/taskList"); + } + this.$store.commit("setProjectSn", data.sn); + break; } - this.$store.commit("setProjectSn", data.sn); - break; } this.selectMp3FileList(); },