This commit is contained in:
@fawn-nine
2024-07-30 16:25:09 +08:00
parent c8b306343a
commit fe2ab47b63
10 changed files with 1073 additions and 136 deletions

View File

@@ -327,6 +327,8 @@ export default {
signShow: false,
signContent: "是否要退出登录?",
playData: {},
directorShow:false, // 主任是否显示班级入口
monitorShow:false, // 其他管理是否显示班级入口
isAndorid: true,
platform: null, // 设备系统
pageList: [
@@ -353,11 +355,6 @@ export default {
url: "/pages/component/commonComponents/address/index?type=mine",
type: "pageJump",
},
{
name: "主任教学",
url: "/pages/miniClass/miniClassMan?type=mine",
type: "pageJump",
},
// {
// name: "分享APP",
// type: "share",
@@ -377,12 +374,13 @@ export default {
//第一次加载
onLoad(e) {
// 隐藏原生的tabbar
// uni.hideTabBar();
uni.hideTabBar();
// #ifdef APP-PLUS
this.getOS();
this.platform = uni.getSystemInfoSync().platform;
// console.log('操纵系统',this.platform)
// #endif
this.getData();
},
computed: {
...mapState(["userInfo"]),
@@ -391,12 +389,8 @@ export default {
onShow() {
console.log(this.userInfo, "11111111111111");
// 隐藏原生的tabbar
// uni.hideTabBar();
this.getData();
},
async onTabItemTap() {
this.getData();
},
// uni.hideTabBar();
},
components: {
musicPlay,
},
@@ -500,16 +494,39 @@ export default {
if (this.userInfo.id != undefined) {
this.$http.post("common/user/getUserInfo").then((res) => {
this.userMes = res.result;
if (this.userMes.userVip) {
// console.log(
// "this.userMes.vipValidtime at line 510:",
// this.userMes.vipValidtime
// );
// this.userMes.vipValidtime = this.userMes.vipValidtime.substring(
// 0,
// this.userMes.vipValidtime.indexOf(" ")
// );
}
if(res.isDirector){
var n = this.pageList.find(item => {
return item.name == '主任教学'
})
console.log('主任找到了么',n);
// this.directorShow = true : this.directorShow = false
var item = {
// { // 主任之外的人显示班级管理
name: "主任教学",
url: "/pages/miniClass/miniClassMan?type=mine",
type: "pageJump",
// },
}
this.pageList.splice(3, 0, item);
}
if(res.isMonitor){
var n = this.pageList.find(item => {
return item.name == '班级管理'
})
console.log('班长n找到了么',n);
// this.directorShow = true : this.directorShow = false
var item = {
// 主任之外的人显示班级管理
name: "班级管理",
url: "/pages/miniClass/miniClassMan?type=mine",
type: "pageJump",
}
this.pageList.splice(3, 0, item);
}
// ?
// res.isMonitor ? this.monitorShow = true : this.monitorShow = false
});
}
},