diff --git a/src/app.ts b/src/app.ts index ff9903d..c5467b2 100644 --- a/src/app.ts +++ b/src/app.ts @@ -170,7 +170,7 @@ App({ checkLoginType(type, backPath = '') { const { loginType, isLogin, isNewReg } = this.globalData if (backPath) { - app.globalData.backPath = backPath + this.globalData.backPath = backPath } if (type === 'any') { @@ -235,6 +235,16 @@ App({ }, mpBehavior(data: { PageName: string }) { console.log(data) + let url = '?r=zd/mp-behavior/add' + wx.ajax({ + method: 'POST', + url, + data, + loading: false, + showMsg: false, + }).then((res) => { + console.log('res: ', res) + }) }, oldMpBehavior(data) { wx.ajax({ @@ -428,67 +438,25 @@ App({ return true }, zdPermissionVerification(grade = 1, registChannel = 0, backPage = null, regBusinessId = '') { - // 1-空白用户,2-注册用户,3-疾病患者,4-用药患者 - const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo + const { isLogin, isNewReg } = this.globalData const that = this this.globalData.registChannel = registChannel this.globalData.regBusinessId = regBusinessId let isReject = false return new Promise((resolve, reject) => { - if (grade == 2 && Number(UserType) < 2) { - wx.reLaunch({ - url: '/patient/pages/login/index', - }) - isReject = true - } - if (grade == 3 && Number(UserType) < 3) { - if (UserType == 1) { + if (grade > 1) { + if (!isLogin) { wx.reLaunch({ url: '/patient/pages/login/index', }) isReject = true - } - if (UserType == 2) { - let urlKey = '' - if (!PatientId) { - urlKey = 'enterInfo' - } else if (AuditStatus == 0) { - urlKey = 'noCert' - } else if (AuditStatus == 1) { - if (backPage && (backPage as string).includes('liveResult')) { - urlKey = 'liveResult' - } else { - urlKey = isFollow ? 'nopending' : 'pending' - } - } else if (AuditStatus == 2) { - urlKey = 'reject' - } - let navUrl = { - enterInfo: '/patient/pages/enterInfo/index', - noCert: '/patient/pages/enterInfo/index', - reject: '/patient/pages/enterInfo/index', - pending: '/patient/pages/enterInfo/index', - nopending: '/patient/pages/enterInfo/index', - liveResult: backPage, - }[urlKey] - if (urlKey == 'liveResult') { - wx.navigateTo({ - url: navUrl as string, - }) - } else { - wx.reLaunch({ - url: navUrl as string, - }) - } + } else if (!isNewReg) { + wx.reLaunch({ + url: '/patient/pages/enterInfo/index', + }) isReject = true } } - if (grade == 4 && Number(UserType) < 4) { - wx.reLaunch({ - url: '/patient/pages/vipLogin/index', - }) - isReject = true - } if (isReject) { that.globalData.backPage = backPage reject(null) diff --git a/src/pages/login/index.ts b/src/pages/login/index.ts index 5cdac32..e540d99 100644 --- a/src/pages/login/index.ts +++ b/src/pages/login/index.ts @@ -79,7 +79,6 @@ Page({ }) }, handleDocRule() { - app.mpBehavior({ PageName: 'BTN_DoctorLogin' }) const { check1 } = this.data return new Promise((resolve) => { if (check1) { @@ -92,6 +91,7 @@ Page({ }) }, async handleSubmit() { + app.mpBehavior({ PageName: 'BTN_DoctorLogin' }) await this.handleDocRule() const { mobile, code } = this.data if (!mobile) { @@ -131,6 +131,10 @@ Page({ } }) }, + handleNoDoc() { + app.mpBehavior({ PageName: 'BTN_DoctorQuickLogin' }) + this.handleDocRule() + }, handleWxSubmit(e: WechatMiniprogram.CustomEvent) { app.mpBehavior({ PageName: 'BTN_DoctorQuickLogin' }) const { iv, encryptedData } = e.detail diff --git a/src/pages/login/index.wxml b/src/pages/login/index.wxml index 804f019..5927e63 100644 --- a/src/pages/login/index.wxml +++ b/src/pages/login/index.wxml @@ -21,7 +21,7 @@ - + 或者 diff --git a/src/patient/pages/index/index.ts b/src/patient/pages/index/index.ts index 49af034..0e30208 100644 --- a/src/patient/pages/index/index.ts +++ b/src/patient/pages/index/index.ts @@ -301,6 +301,9 @@ Page({ app.mpBehavior({ PageName: 'BTN_PatientHomeLiveCard' }) } if (code === 'activity2' && url.includes('/patient/pages/liveDetail/index')) { + app.mpBehavior({ PageName: 'BTN_PatientHomeLiveCard' }) + } + if (code === 'article' && url.includes('/patient/pages/repositoryDetail/index')) { app.mpBehavior({ PageName: 'BTN_PatientHomeContentCard' }) } @@ -312,10 +315,8 @@ Page({ if (url.includes('loginState')) { url = url + encodeURIComponent(app.globalData.loginState) - app.zdPermissionVerification(2, 11, `/patient/pages/repository/index`).then(() => { - wx.navigateTo({ - url, - }) + wx.navigateTo({ + url, }) return } diff --git a/src/patient/pages/live/index.scss b/src/patient/pages/live/index.scss index 73b7c19..645e488 100644 --- a/src/patient/pages/live/index.scss +++ b/src/patient/pages/live/index.scss @@ -336,7 +336,7 @@ page { } .title { font-size: 32rpx; - color: #211d2e; + color: #69686E; } } } diff --git a/src/patient/pages/mySave/index.scss b/src/patient/pages/mySave/index.scss index 2c19713..7b4c8b2 100644 --- a/src/patient/pages/mySave/index.scss +++ b/src/patient/pages/mySave/index.scss @@ -31,6 +31,7 @@ page { display: flex; padding-bottom: 24rpx; border-bottom: 1rpx dotted rgba(39, 58, 101, 0.2); + margin-bottom: 24rpx; &:last-of-type { border: none; }