功能:增加店长员工审核与登录提醒
This commit is contained in:
+13
-3
@@ -9,7 +9,9 @@ App({
|
||||
shopName: BRAND_CONFIG.defaultShopName,
|
||||
userInfo: null,
|
||||
planningNeedRefresh: false,
|
||||
wechatLoginState: null
|
||||
wechatLoginState: null,
|
||||
reviewNoticeShown: false,
|
||||
openEmployeeReview: false
|
||||
},
|
||||
|
||||
onLaunch() {
|
||||
@@ -55,7 +57,7 @@ App({
|
||||
})
|
||||
this.publishWechatLoginState(result)
|
||||
if (result.status === 'SUCCESS' && result.accessToken) {
|
||||
this.setSession(result)
|
||||
this.setSession(result, true)
|
||||
wx.reLaunch({ url: '/pages/planning/index' })
|
||||
return
|
||||
}
|
||||
@@ -96,7 +98,11 @@ App({
|
||||
}
|
||||
},
|
||||
|
||||
setSession(session) {
|
||||
setSession(session, newLoginSession = false) {
|
||||
if (newLoginSession) {
|
||||
this.globalData.reviewNoticeShown = false
|
||||
this.globalData.openEmployeeReview = false
|
||||
}
|
||||
auth.setSession(session)
|
||||
this.bootstrapSession()
|
||||
},
|
||||
@@ -105,6 +111,8 @@ App({
|
||||
auth.clearSession()
|
||||
profileCache.invalidate()
|
||||
this.globalData.userInfo = null
|
||||
this.globalData.reviewNoticeShown = false
|
||||
this.globalData.openEmployeeReview = false
|
||||
},
|
||||
|
||||
logoutDevice() {
|
||||
@@ -112,5 +120,7 @@ App({
|
||||
profileCache.invalidate()
|
||||
this.globalData.userInfo = null
|
||||
this.globalData.wechatLoginState = null
|
||||
this.globalData.reviewNoticeShown = false
|
||||
this.globalData.openEmployeeReview = false
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user