diff --git a/project.config.json b/project.config.json index 1d8faf4..625d498 100644 --- a/project.config.json +++ b/project.config.json @@ -71,5 +71,5 @@ } ] }, - "appid": "wx71ac9c27c3c3e3f4" + "appid": "wxf9ce8010f1ad24aa" } \ No newline at end of file diff --git a/src/app.ts b/src/app.ts index eb8052a..7526be7 100644 --- a/src/app.ts +++ b/src/app.ts @@ -17,15 +17,15 @@ App({ // 测试号 wx2b0bb13edf717c1d // dev // appid:wxf9ce8010f1ad24aa - // url: 'https://m.xd.hbraas.com', - // upFileUrl: 'https://m.xd.hbraas.com/', - // imageUrl: 'https://m.xd.hbraas.com/xd/', + url: 'https://m.xd.hbraas.com', + upFileUrl: 'https://m.xd.hbraas.com/', + imageUrl: 'https://m.xd.hbraas.com/xd/', // pro // appid:wx71ac9c27c3c3e3f4 - url: 'https://m.xd.hbsaas.com', - upFileUrl: 'https://m.xd.hbsaas.com/', - imageUrl: 'https://m.xd.hbsaas.com/api/xd/', + // url: 'https://m.xd.hbsaas.com', + // upFileUrl: 'https://m.xd.hbsaas.com/', + // imageUrl: 'https://m.xd.hbsaas.com/api/xd/', loginState: '', isLogin: 0, diff --git a/src/components/popup/index.scss b/src/components/popup/index.scss index c0125d1..dbf4649 100644 --- a/src/components/popup/index.scss +++ b/src/components/popup/index.scss @@ -231,12 +231,63 @@ height: 88rpx; line-height: 88rpx; font-size: 32rpx; - color: #FFFFFF; + color: #ffffff; background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); border-radius: 100rpx 100rpx 100rpx 100rpx; } } +.popup10, +.popup11 { + padding: 48rpx 50rpx 48rpx; + width: 650rpx; + box-sizing: border-box; + background-color: #fff; + border-radius: 24rpx; + .title { + margin-top: 24rpx; + font-size: 40rpx; + color: #211d2e; + font-weight: bold; + line-height: 56rpx; + text-align: center; + } + .content { + margin-top: 24rpx; + text-align: center; + .link { + font-size: 32rpx; + color: #b982ff; + } + } + .footer { + margin-top: 40rpx; + display: flex; + gap: 30rpx; + .sure, + .cancel { + flex: 1; + padding: 20rpx; + text-align: center; + font-size: 36rpx; + border-radius: 100rpx; + } + .cancel { + padding: 18rpx 0; + color: #b982ff; + border: 1px solid #b982ff; + } + .sure { + padding: 0; + background: linear-gradient(344deg, #ffbcf9 0%, #b982ff 100%); + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; + } + } +} + .close { margin: 48rpx auto 0; display: block; diff --git a/src/components/popup/index.ts b/src/components/popup/index.ts index d4d1fed..4f5a69d 100644 --- a/src/components/popup/index.ts +++ b/src/components/popup/index.ts @@ -36,6 +36,9 @@ Component({ handleCancel() { this.triggerEvent('cancel') }, + handlePhone(e) { + this.triggerEvent('phone', e.detail) + }, routerTo(e: any) { const { url } = e.currentTarget.dataset wx.navigateTo({ diff --git a/src/components/popup/index.wxml b/src/components/popup/index.wxml index 759016a..db8f18f 100644 --- a/src/components/popup/index.wxml +++ b/src/components/popup/index.wxml @@ -81,6 +81,30 @@ 知道了 + + 我已阅读并同意 + + 《用户协议》 + 《隐私政策》 + + 《个人信息共享知情同意书》 + + + 取消 + + + + + 我已阅读并同意 + + 《隐私协议保护政策》 + + + 取消 + 确定 + + + {{userInfo.welcome}},{{userInfo.Name}}医生 diff --git a/src/pages/login/index.ts b/src/pages/login/index.ts index ffb85b1..364fa9b 100644 --- a/src/pages/login/index.ts +++ b/src/pages/login/index.ts @@ -5,6 +5,7 @@ Page({ data: { popupShow: false, popupType: 'popup4', // 登录失败弹窗 + // popupType: 'popup11', // 隐私协议二级确认弹窗 popupParams: { close: true, } as any, @@ -28,7 +29,8 @@ Page({ }) }, getCode() { - if (timer) return + if (timer) + return const mobile = this.data.mobile if (!mobile) { wx.showToast({ @@ -78,21 +80,24 @@ Page({ check1: !this.data.check1, }) }, - handleDocRule() { + handleDocRule(customPhone = false) { const { check1 } = this.data return new Promise((resolve) => { if (check1) { return resolve(true) } - wx.showToast({ - title: '请同意相关协议', - icon: 'none', + this.setData({ + popupShow: true, + popupType: 'popup11', + popupParams: { + close: false, + customPhone, + }, }) }) }, async handleSubmit() { app.mpBehavior({ doctor: true, PageName: 'BTN_DoctorLogin' }) - await this.handleDocRule() const { mobile, code } = this.data if (!mobile) { wx.showToast({ @@ -108,6 +113,7 @@ Page({ }) return } + await this.handleDocRule(true) wx.ajax({ method: 'POST', url: '?r=xd/login/reg-login', @@ -123,7 +129,8 @@ Page({ .catch((err) => { if (err.data.code == 100) { this.handleShowPopup() - } else if (err.data.msg) { + } + else if (err.data.msg) { wx.showToast({ title: err.data.msg, icon: 'none', @@ -138,6 +145,7 @@ Page({ handleWxSubmit(e: WechatMiniprogram.CustomEvent) { app.mpBehavior({ doctor: true, PageName: 'BTN_DoctorQuickLogin' }) const { iv, encryptedData } = e.detail + this.handlePopupCancel() if (iv && encryptedData) { wx.ajax({ method: 'POST', @@ -154,7 +162,8 @@ Page({ .catch((err) => { if (err.data.code == 100) { this.handleShowPopup() - } else if (err.data.msg) { + } + else if (err.data.msg) { wx.showToast({ title: err.data.msg, icon: 'none', @@ -170,10 +179,12 @@ Page({ wx.reLaunch({ url: '/pages/home/index', }) - } else { + } + else { this.handleShowPopup() } - } else { + } + else { this.handleShowPopup() } }) @@ -210,6 +221,17 @@ Page({ url: '/doc/pages/doc1/index', }) }, + handlePopupOk() { + const { popupType } = this.data + if (popupType == 'popup11') { + this.setData({ + check1: true, + popupShow: false, + }) + this.handleSubmit() + this.handlePopupCancel() + } + }, handlePopupCancel() { this.setData({ popupShow: false, diff --git a/src/pages/login/index.wxml b/src/pages/login/index.wxml index 5927e63..66a7493 100644 --- a/src/pages/login/index.wxml +++ b/src/pages/login/index.wxml @@ -1,5 +1,5 @@ - + diff --git a/src/pages/my/index.wxml b/src/pages/my/index.wxml index 8c54cef..b7b804a 100644 --- a/src/pages/my/index.wxml +++ b/src/pages/my/index.wxml @@ -5,7 +5,7 @@ > {{userInfo.Name}} diff --git a/src/patient/pages/login/index.json b/src/patient/pages/login/index.json index fe2a552..73c1f75 100644 --- a/src/patient/pages/login/index.json +++ b/src/patient/pages/login/index.json @@ -2,6 +2,7 @@ "navigationStyle": "custom", "usingComponents": { "van-icon": "@vant/weapp/icon/index", - "van-divider": "@vant/weapp/divider/index" + "van-divider": "@vant/weapp/divider/index", + "popup": "/components/popup/index" } } diff --git a/src/patient/pages/login/index.ts b/src/patient/pages/login/index.ts index 5464b0c..42b680e 100644 --- a/src/patient/pages/login/index.ts +++ b/src/patient/pages/login/index.ts @@ -3,6 +3,12 @@ let timer = null as null | number Page({ data: { + popupShow: false, + popupType: 'popup10', // 隐私协议二级确认弹窗 + popupParams: { + close: true, + } as any, + mobile: '', code: '', @@ -21,7 +27,8 @@ Page({ }) }, getCode() { - if (timer) return + if (timer) + return const mobile = this.data.mobile if (!mobile) { wx.showToast({ @@ -83,9 +90,11 @@ Page({ }) }, handleWxSubmit(e: WechatMiniprogram.CustomEvent) { + console.log("DEBUGPRINT[171]: index.ts:92: e=", e) app.mpBehavior({ PageName: 'BTN_PatientQuickLogin' }) const { iv, encryptedData } = e.detail const { registrationSource, registChannel, regBusinessId } = app.globalData + this.handlePopupCancel() if (iv && encryptedData) { wx.ajax({ method: 'POST', @@ -104,16 +113,19 @@ Page({ }, handleWxCheck() { app.mpBehavior({ PageName: 'BTN_PatientQuickLogin' }) - wx.showToast({ - icon: 'none', - title: '请先同意隐私政策', + this.setData({ + popupShow: true, + popupType: 'popup10', + popupParams: { + close: false, + }, }) }, submitCallback() { app.globalData.loginType = 1 app.globalData.isLogin = 1 app.updateLoginInfo((res) => { - const { loginType, isNewReg, isLogin } = res + const { isNewReg } = res const backPage = app.globalData.backPage let url = backPage || '/patient/pages/index/index' if (isNewReg === 0) { @@ -152,6 +164,12 @@ Page({ [key]: !this.data[key], }) }, + handlePopupOk() {}, + handlePopupCancel() { + this.setData({ + popupShow: false, + }) + }, }) export {} diff --git a/src/patient/pages/login/index.wxml b/src/patient/pages/login/index.wxml index bb78f86..7e233c4 100644 --- a/src/patient/pages/login/index.wxml +++ b/src/patient/pages/login/index.wxml @@ -53,7 +53,9 @@ 我同意依照 《隐私政策》 - 《个人信息共享知情同意书》 + + 《个人信息共享知情同意书》 + 规定收集和共享我的个人敏感信息 @@ -73,3 +75,12 @@ + +