From 79991f7b99131e1065fc3f7f8fbaa6514a9d6aa5 Mon Sep 17 00:00:00 2001 From: corala <18339694416@163.com> Date: Wed, 30 Nov 2022 17:49:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=8A=A0=E6=8E=A5=E5=BE=85?= =?UTF-8?q?=E6=8F=90=E9=86=92=E7=9A=84=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 +++- pages/index/index.vue | 17 ++++++++++------- pages/mine/selectBuilding.vue | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/App.vue b/App.vue index 54b2337..fb83c8c 100644 --- a/App.vue +++ b/App.vue @@ -157,9 +157,11 @@ }, onShow(options) { if (uni.getStorageSync('buildingID').id) { + // 登录次数记录 this.$u.post('/user/addLoginCount', { houseId: uni.getStorageSync('buildingID').id - }).then(res=>{}).catch(e=>{}) + }).then(res=>{ + }).catch(e=>{}) } const token = uni.getStorageSync("weapp_session_login_data") if (typeof token.token != "string") { diff --git a/pages/index/index.vue b/pages/index/index.vue index 13543ce..11b2dce 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -328,6 +328,7 @@ }) } this.initPopup() + }, @@ -335,9 +336,8 @@ this.upDateBulidIngObj() this.LOADING = true this.getMenu() - + this.userInfo = uni.getStorageSync('weapp_session_userInfo_data'); - if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) { this.methodsisshow = false; } else { @@ -516,13 +516,16 @@ //获取权限 getMenu() { this.$u.get("/user/getMenu").then(data => { - console.log(data) uni.setStorageSync("weapp_session_Menu_data", data) this.Menulist = uni.getStorageSync('weapp_session_Menu_data'); - if (this.Menulist.findIndex(item => item.name == '今日接待弹框') != -1) { - this.modalShow = true - } else { - this.modalShow = false + let remind = uni.getStorageSync("remind"); + uni.setStorageSync("remind",1); + if(this.Menulist.length){ + if (this.Menulist.findIndex(item => item.name == '今日接待弹框') != -1) { + this.modalShow = remind==0?true:false + } else { + this.modalShow = false + } } }) }, diff --git a/pages/mine/selectBuilding.vue b/pages/mine/selectBuilding.vue index 3d83595..72a8b91 100644 --- a/pages/mine/selectBuilding.vue +++ b/pages/mine/selectBuilding.vue @@ -44,6 +44,7 @@ ...data } uni.setStorageSync("buildingID", lopan); + uni.setStorageSync("remind", 0); this.$u.post('/user/addLoginCount', { houseId: data.id}).then(res=> { uni.navigateBack({ delta: -1