mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
提交留言版点关注跳转问题
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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=>{
|
||||
|
||||
Reference in New Issue
Block a user