提交留言版点关注跳转问题

This commit is contained in:
daihh
2022-10-27 10:25:28 +08:00
parent 5968545bcb
commit 6b94ece116
2 changed files with 23 additions and 2 deletions

View File

@@ -78,6 +78,7 @@
},
created() {
this.pageId = this.$xpage.getHomeId(this.$route);
if(!this.pageId){
this.$router.push({path:'/404'})
}else{
@@ -99,7 +100,18 @@
},
jumpAttention(num) {// 点击事件跳转关注
// this.$store.dispatch("setAttention", true);
this.$bus.$emit('followIndex',num)
let path=this.$route.path;
//console.log(path,'this.$router.path');
let idx=path.lastIndexOf('leaving');
if(idx>0){
//console.log(path.substring(0,idx-1),'this.$router.path');
//this.$router.push(path.substring(0,idx-1)+'?gz=7'+num)
location.href=path.substring(0,idx-1)+'?gz=7'+num;
}else{
this.$bus.$emit('followIndex',num)
}
},
init(){
this.getMedal();

View File

@@ -97,6 +97,7 @@
},
data(){
return{
intTabIndex:-1,//初始化显示哪个tab,71我关注的人72关注我的人
page:{
pageIndex:1,
pageSize:10,
@@ -130,6 +131,7 @@
},
watch:{
'$route' (to, from) { //监听路由是否变化
if(to.params.id != from.params.id){
this.pageId = to.params.id;
let urlPre=window.location.protocol+'//'+window.location.host;
@@ -146,12 +148,19 @@
},
methods:{
init(){
this.getList();
if(this.pageId == this.userInfo.aid) {
this.personal = true;
}
this.loadMajorType();
this.loadOrgDomain();
//
this.intTabIndex=this.$route.query.gz;
if(this.intTabIndex){
this.activeName='7';
//是
}else{
this.getList();
}
},
dynamicHide(id){
apiStat.dynamicHide(id).then(res=>{