From 7042cec438fcbc211fd457089524e4e69a516ae0 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Mon, 16 Oct 2023 18:09:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=B9=E6=8D=AE=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E7=B1=BB=E5=9E=8B=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=98=BE=E7=A4=BAAI=E5=A4=A7=E5=B1=8F=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/gather/gather.vue | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index 23dca90..dccfad7 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -226,10 +226,10 @@ }, created() {}, onLoad() { - this.Area() + this.showControllerAllLet(); + this.Area(); this.initMenu(); }, - onShow() { if (this.isLogin) { this.emptyText = '暂无可用应用' @@ -323,6 +323,24 @@ }, + // 根据类型来判断是否显示 + showControllerAllLet(){ + let user; + if(typeof this.$store.state.app.userInfo == 'string'){ + user = JSON.parse(this.$store.state.app.userInfo) + }else user = JSON.parse(JSON.stringify(this.$store.state.app.userInfo)) + if(user.show_controller_applet){ + this.AllMenuList.push({ + name: '大屏控制', + icon: '/static/applet/dp.png', + data: { + id: '__UNI__83ABA97', + url: 'https://ceshi-worker-task.lihaink.cn/uploads/files/20231016/20231016112144fac6d9128.wgt', + }, + type: 4, + }) + } + }, // 初始化菜单 initMenu() { let now = uni.getStorageSync('gatherNowMenuList');