Commit 7cd87a54 authored by Your Name's avatar Your Name

回退

parent 543c98a6
<template>
<div class="my-tabbar">
<van-tabbar v-model="activeIndex" active-color="#EE0A24" route>
<van-tabbar-item @click="changeHandle(item.title, userInfo.roleList[0])" v-for="item in iconList" :to=" +userInfo.roleList[0] == 2 && item.title == '观影互动' || +userInfo.roleList[0] == 17 && item.title == '学习项目' ? '' : item.url" :key="item.title">
<van-tabbar-item @click="changeHandle(item.title, userInfo.roleList[0])" v-for="item in iconList" :to="+userInfo.roleList[0] == 17 && item.title == '学习项目' ? '' : item.url" :key="item.title">
<span>{{item.title}}</span>
<template #icon="props">
<img :src="props.active ? item.icon.active : item.icon.inactive" />
......@@ -80,7 +80,7 @@ export default {
methods: {
changeHandle(index1,index2) {
// console.log(index1,index2)
if(index1 == '观影互动' && index2 == 2 || index1 == '学习项目' && index2 == 17) {
if(index1 == '学习项目' && index2 == 17) {
this.$toast('暂无该权限!')
}
}
......
......@@ -69,10 +69,8 @@ export default {
sessionStorage.setItem("token", data.token);
sessionStorage.setItem("userInfo", JSON.stringify(data.user));
// let redirectPath = decodeURIComponent(this.$route.fullPath).split('redirect=')[1]
if (isOpt == 17) {
if (isOpt == 17 || isOpt == 2) {
this.$router.push("/commit");
}else if (isOpt == 2) {
this.$router.push("/learn");
}else if (isOpt1 == 4) {
this.$router.push("/opt");
}else{
......
......@@ -2,8 +2,8 @@
<div class="home">
<Header title="观影互动" />
<div class="commit-container">
<van-tabs type="card" v-model="activeTab">
<van-tab title="观影互动">
<van-tabs type="card" v-model="activeTab" @disabled="onClickDisabled">
<van-tab title="观影互动" disabled>
<div class="commit-page">
<commit-tab />
</div>
......@@ -31,11 +31,21 @@ export default {
},
data() {
return {
userInfo: JSON.parse(sessionStorage.getItem('userInfo')),
activeTab: 1,
};
},
created() {
console.log(this.userInfo.roleList[0])
},
mounted() {},
methods: {},
methods: {
onClickDisabled() {
if(+this.userInfo.roleList[0] === 2){
this.$toast('暂无该权限!');
}
}
},
};
</script>
......
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