ソースを参照

首页加接待提醒的弹窗

branch0222
corala 1年前
コミット
79991f7b99
3個のファイルの変更14行の追加8行の削除
  1. +3
    -1
      App.vue
  2. +10
    -7
      pages/index/index.vue
  3. +1
    -0
      pages/mine/selectBuilding.vue

+ 3
- 1
App.vue ファイルの表示

@@ -157,9 +157,11 @@
}, },
onShow(options) { onShow(options) {
if (uni.getStorageSync('buildingID').id) { if (uni.getStorageSync('buildingID').id) {
// 登录次数记录
this.$u.post('/user/addLoginCount', { this.$u.post('/user/addLoginCount', {
houseId: uni.getStorageSync('buildingID').id houseId: uni.getStorageSync('buildingID').id
}).then(res=>{}).catch(e=>{})
}).then(res=>{
}).catch(e=>{})
} }
const token = uni.getStorageSync("weapp_session_login_data") const token = uni.getStorageSync("weapp_session_login_data")
if (typeof token.token != "string") { if (typeof token.token != "string") {


+ 10
- 7
pages/index/index.vue ファイルの表示

@@ -328,6 +328,7 @@
}) })
} }
this.initPopup() this.initPopup()
}, },




@@ -335,9 +336,8 @@
this.upDateBulidIngObj() this.upDateBulidIngObj()
this.LOADING = true this.LOADING = true
this.getMenu() this.getMenu()
this.userInfo = uni.getStorageSync('weapp_session_userInfo_data'); this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');

if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) { if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
this.methodsisshow = false; this.methodsisshow = false;
} else { } else {
@@ -516,13 +516,16 @@
//获取权限 //获取权限
getMenu() { getMenu() {
this.$u.get("/user/getMenu").then(data => { this.$u.get("/user/getMenu").then(data => {
console.log(data)
uni.setStorageSync("weapp_session_Menu_data", data) uni.setStorageSync("weapp_session_Menu_data", data)
this.Menulist = uni.getStorageSync('weapp_session_Menu_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 ファイルの表示

@@ -44,6 +44,7 @@
...data ...data
} }
uni.setStorageSync("buildingID", lopan); uni.setStorageSync("buildingID", lopan);
uni.setStorageSync("remind", 0);
this.$u.post('/user/addLoginCount', { houseId: data.id}).then(res=> { this.$u.post('/user/addLoginCount', { houseId: data.id}).then(res=> {
uni.navigateBack({ uni.navigateBack({
delta: -1 delta: -1


読み込み中…
キャンセル
保存