diff --git a/src/custom-tab-bar/index.ts b/src/custom-tab-bar/index.ts index b11ab36..c90507e 100644 --- a/src/custom-tab-bar/index.ts +++ b/src/custom-tab-bar/index.ts @@ -50,7 +50,21 @@ Component({ ], userInfo: {}, }, - + observers: { + userInfo(val) { + if (val.IsSuper === 0) { + this.getCaseTip(); + } + }, + }, + lifetimes: { + attached() { + this.setData({ + showEntryCase: false, + notice: false, + }); + }, + }, /** * 组件的方法列表 */ @@ -59,6 +73,7 @@ Component({ const { index } = e.currentTarget.dataset; const tab = this.data.tabbar[index]; if (tab.custom) { + this.handleClsoeCaseTip(); wx.navigateTo({ url: tab.path, }); @@ -68,5 +83,28 @@ Component({ }); } }, + getCaseTip() { + wx.ajax({ + method: "GET", + url: "?r=takeda/case/get-case-tip", + data: {}, + }).then((res) => { + this.setData({ + showEntryCase: res.tipStatus === 2, + }); + }); + }, + handleClsoeCaseTip() { + this.setData({ + showEntryCase: false, + }); + wx.ajax({ + method: "POST", + url: "?r=takeda/case/visit-case-tip", + data: {}, + }); + }, }, }); + +export {}; diff --git a/src/custom-tab-bar/index.wxml b/src/custom-tab-bar/index.wxml index b570491..b4010c0 100644 --- a/src/custom-tab-bar/index.wxml +++ b/src/custom-tab-bar/index.wxml @@ -11,7 +11,7 @@ 邀约合作医生一起讨论哦 - 跳过 + 跳过 去录入 diff --git a/src/images/icon-clsoe-green.png b/src/images/icon-clsoe-green.png deleted file mode 100644 index 3ab0111..0000000 Binary files a/src/images/icon-clsoe-green.png and /dev/null differ diff --git a/src/module1/pages/setInfo/index.ts b/src/module1/pages/setInfo/index.ts index d0a6625..65679d4 100644 --- a/src/module1/pages/setInfo/index.ts +++ b/src/module1/pages/setInfo/index.ts @@ -291,6 +291,7 @@ Page({ title: "确认退出登录?", success(res) { if (res.confirm) { + app.globalData.isLogin = 0 wx.ajax({ method: "POST", url: "?r=takeda/account/reg-logout", diff --git a/src/module1/pages/setInfoResult/index.ts b/src/module1/pages/setInfoResult/index.ts index cf6e296..314ccec 100644 --- a/src/module1/pages/setInfoResult/index.ts +++ b/src/module1/pages/setInfoResult/index.ts @@ -45,6 +45,7 @@ Page({ title: "确认退出登录?", success(res) { if (res.confirm) { + app.globalData.isLogin = 0 wx.ajax({ method: "POST", url: "?r=takeda/account/reg-logout", diff --git a/src/module1/pages/userInfo/index.ts b/src/module1/pages/userInfo/index.ts index 9467eaf..481786a 100644 --- a/src/module1/pages/userInfo/index.ts +++ b/src/module1/pages/userInfo/index.ts @@ -166,6 +166,7 @@ Page({ title: "确认退出登录?", success(res) { if (res.confirm) { + app.globalData.isLogin = 0 wx.ajax({ method: "POST", url: "?r=takeda/account/reg-logout", diff --git a/src/pages/home/index.ts b/src/pages/home/index.ts index 60f3350..a78bf70 100644 --- a/src/pages/home/index.ts +++ b/src/pages/home/index.ts @@ -30,7 +30,6 @@ Page({ app.getUserInfo(this, (userInfo) => { this.setData({ level: userInfo.IsSuper === 1 ? 4 : userInfo.DoctorLevel, - // level: 3, }); this.getTabBar().setData({ userInfo,