Commit 95c15d97 authored by zhangyanni's avatar zhangyanni

跳转

parent c83f3808
......@@ -161,12 +161,6 @@ router.beforeEach((to, from, next) => {
if (to.name == "loginByEmail") {
if (i18n.locale== "zh-CN") router.push({path:'/loginByPhone',query:to.query});
}
if (to.name == "mobileRegister") {
if(ismobile == 0){
if (i18n.locale == "zh-CN") router.push({path:'/mobileRegisterCmpt',query:to.query});
else router.push({path:'/emailRegisterCmpt',query:to.query});
}
}
if(!publicFun.getCookie("userInfo")){
if(to.name == 'dashboard'||to.name=='indexView'|| to.name == 'login' || to.name == 'mobileLoginCmpt'|| to.name == 'emailLoginCmpt'|| to.name == 'mobileRegisterCmpt'|| to.name == 'emailRegisterCmpt'||to.name=='completeInfoCmpt'|| to.name == 'successCmpt'||to.name=='findPasswordCmpt'||to.name=='modifyPasswordCmpt'||to.name=='passSuccessCmpt'||to.name=='indexView'||to.name=="mobileIndex"||to.name=="mobileLogin"||to.name=="loginByPhone"||to.name=="loginByEmail"||to.name=="mobileRegister"||to.name=="duijieshareRequire"||to.name=="duijieshareProject"||to.name=="knowledgeList"||to.name=="knowledgeDetail"||to.name=='vip'||to.name=='vipList'||to.name=='loadEmail'||to.name=='openEmail'||to.name=="viewRequire"||to.name=="duijiephoneBusinessList"||to.name=="duijiephoneBusinessDetail"||to.name=="duijiephoneRequireDetail"||to.name=="bigBusinessList"||to.name=="bigBusinessDetail"||to.name=="requireDetail"||to.name=="mixSearch"||to.name=="activitylist"||to.name=="activitydetail"||to.name=="activitySearchResult"||to.name=="activityapplyForProject"||to.name=='wechatLogin'||to.name=='newPage'||to.name=='bindAccount'||to.name=='subjectsecondStage'||to.name=='subjectsecondStageDetail'||to.name=='subjectmasterComment'||to.name=='subjectmasterList'||to.name=='subjectmasterDetail'||to.name=='subjectfirstStage'||to.name=='subjectcommentMore'||to.name=='subjectList'||to.name=="subjectresultpage"){
} else{
......
......@@ -31,7 +31,8 @@
name: "tabCmpt",
data(){
return {
selected:this.publicFun.getCookie("selected")?this.publicFun.getCookie("selected"):"index"
selected:this.publicFun.getCookie("selected")?this.publicFun.getCookie("selected"):"index",
contactIndex:this.$route.query.tabIndex?this.$route.query.tabIndex:1
}
},
watch: {
......@@ -42,7 +43,7 @@
this.$router.push("/index")
break;
case "contact":
this.$router.push("/tabconnect")
this.$router.push({path:"/tabconnect",query:{tabIndex:this.contactIndex}})
break;
case "voted":
this.$router.push("/subjectList")
......@@ -61,6 +62,14 @@
that.selected = data;
that.publicFun.setOtherCookie("selected",data)
})
globalMsg.$on("sendContactIndex",(data)=>{
that.contactIndex = data;
})
},
beforeDestroy(){
globalMsg.$off("sendSelected");
globalMsg.$off("sendContactIndex");
}
}
</script>
......
......@@ -41,7 +41,7 @@
if(vm.pathfrom == '/phoneBusinessDetail'){
vm.addprojecttype = 2;
}else{
vm.addprojecttype = 1;
if(vm.pathfrom !="/index") vm.addprojecttype = 1;
}
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment