修改个人主页的url规则

This commit is contained in:
daihh
2022-10-14 18:29:06 +08:00
parent 56584d7823
commit 164225f67e
13 changed files with 57 additions and 40 deletions

View File

@@ -104,7 +104,7 @@
}
},
mounted() {
this.pageId = this.$route.query.id;
this.pageId = this.$xpage.getHomeId(this.$route);
this.sex = this.userInfo.sex;
// 判断路由是进入的学员默认页面就重置setCurIdentity
if(this.$route.path == '/uc/study/task' || this.$route.path == '/study/index'){

View File

@@ -60,7 +60,7 @@
methods:{
toHome() {
// ,query:{id:item.objId || item.id}
this.$router.push({path:'/home/index?id='+this.aid})
this.$router.push({path:this.$xpage.getHomePath(this.aid)})
}
},
watch:{

View File

@@ -74,7 +74,7 @@
toHome() {
// ,query:{id:item.objId || item.id}
if(this.aid){
this.$router.push({path:'/home/index?id='+this.aid})
this.$router.push({path:this.$xpage.getHomePath(this.aid)})
}else{
this.$message.error("参数错误");
}

View File

@@ -108,7 +108,7 @@
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="setCurIdentity(1)"><a :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`">个人中心</a></el-dropdown-item>
<el-dropdown-item><router-link :to="'/home/index?id='+userInfo.aid">个人主页</router-link></el-dropdown-item>
<el-dropdown-item><router-link :to="'/home/index/'+userInfo.aid">个人主页</router-link></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>