mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-21 08:46:44 +08:00
修改个人主页的url规则
This commit is contained in:
@@ -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'){
|
||||
|
||||
@@ -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:{
|
||||
|
||||
@@ -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("参数错误");
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user