Browse Source

首页加接待提醒的弹窗

branch0222
corala 1 year ago
parent
commit
79991f7b99
3 changed files with 14 additions and 8 deletions
  1. +3
    -1
      App.vue
  2. +10
    -7
      pages/index/index.vue
  3. +1
    -0
      pages/mine/selectBuilding.vue

+ 3
- 1
App.vue View File

@@ -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") {


+ 10
- 7
pages/index/index.vue View File

@@ -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
}
}
})
},


+ 1
- 0
pages/mine/selectBuilding.vue View File

@@ -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


Loading…
Cancel
Save