diff --git a/src/components/pagination/index.scss b/src/components/pagination/index.scss index 08a9dea..ab6cac3 100644 --- a/src/components/pagination/index.scss +++ b/src/components/pagination/index.scss @@ -1,6 +1,9 @@ /* components/pagination/index.wxss */ -.none { - display: block; - margin: 30rpx auto; - width: 80%; +.pagination { + --divider-text-color: rgba(148, 163, 184, 1); + .none { + display: block; + margin: 30rpx auto; + width: 80%; + } } diff --git a/src/components/pagination/index.wxml b/src/components/pagination/index.wxml index 6bf20b8..a0a7b27 100644 --- a/src/components/pagination/index.wxml +++ b/src/components/pagination/index.wxml @@ -1,6 +1,8 @@ - - - - 加载中... - -没有更多了 + + + + + 加载中... + + 没有更多了 + diff --git a/src/components/popup/index.ts b/src/components/popup/index.ts index e676db3..fb575fd 100644 --- a/src/components/popup/index.ts +++ b/src/components/popup/index.ts @@ -22,7 +22,13 @@ Component({ show(val) { if (val) { if (this.data.type === 'popup1') { - this.getCodeImg() + this.getCodeImg('103') + } + if (this.data.type === 'popup2') { + this.getCodeImg('101') + } + if (this.data.type === 'popup3') { + this.getCodeImg('102') } } }, @@ -46,101 +52,17 @@ Component({ }, methods: { handleOk() { - const { type, inhibitorsId, inhibitorsName, inhibitorsContent } = this.data - if (type === 'argument' && !this.data.popup1Check1) { - wx.showToast({ - title: '请同意隐私政策', - icon: 'none', - }) - return - } - if (type === 'TCenter') { - if (!this.data.TCenterId) { - wx.showToast({ - title: '请选择治疗中心', - icon: 'none', - }) - return - } - this.triggerEvent('ok', { id: this.data.TCenterId }) - return - } - - if (type === 'inhibitors') { - if (!inhibitorsId) { - wx.showToast({ - title: '请选择抑制剂', - icon: 'none', - }) - return - } - if (inhibitorsName === '其他' && !inhibitorsContent) { - wx.showToast({ - title: '请填写其他抑制剂', - icon: 'none', - }) - return - } - - this.triggerEvent('ok', { id: inhibitorsId, name: inhibitorsName, content: inhibitorsContent }) - return - } - - if (type === 'selectDoctor') { - if (!this.data.selectDoctorId) { - wx.showToast({ - title: '请选择医生', - icon: 'none', - }) - return - } - this.triggerEvent('ok', { id: this.data.selectDoctorId }) - return - } this.triggerEvent('ok') }, handleCancel() { this.triggerEvent('cancel') }, - routerTo(e: any) { - const { url } = e.currentTarget.dataset - wx.navigateTo({ - url, - }) - }, - handlePopup1Check1() { - if (this.data.popup1Check1) { - } - }, - handleSelectStatus(e) { - const { status } = e.currentTarget.dataset - this.triggerEvent('ok', { type: 'selectStatusComplete', status }) - }, - handleSelectTCenter(e) { - const { id } = e.currentTarget.dataset - this.setData({ - TCenterId: id, - }) - }, - handleSelectDoctor(e) { - const { id } = e.currentTarget.dataset - this.setData({ - selectDoctorId: id, - }) - }, - handleSelectInhibitors(e) { - const { id, name } = e.currentTarget.dataset - this.setData({ - inhibitorsId: id, - inhibitorsName: name, - }) - }, - getCodeImg() { + getCodeImg(ChannelType = '') { wx.ajax({ method: 'GET', url: '?r=psvt/common/get-channel-wx-code', data: { - ChannelType: 2, + ChannelType, }, }).then((res) => { this.setData({ diff --git a/src/components/popup/index.wxml b/src/components/popup/index.wxml index 77cbcdb..710e793 100644 --- a/src/components/popup/index.wxml +++ b/src/components/popup/index.wxml @@ -17,7 +17,7 @@ > 关注“星动守护” 我们将在每周五下午7点提醒您记录 - + @@ -30,7 +30,7 @@ class="code-wrap" style="background: url('{{imageUrl}}bg14.png?t={{Timestamp}}') no-repeat top center/100%" > - + 关注“心动守护”公众号 @@ -50,7 +50,7 @@ class="code-wrap" style="background: url('{{imageUrl}}bg14.png?t={{Timestamp}}') no-repeat top center/100%" > - + 关注“心动守护”公众号 diff --git a/src/custom-tab-bar/index.ts b/src/custom-tab-bar/index.ts index ff06450..48108cd 100644 --- a/src/custom-tab-bar/index.ts +++ b/src/custom-tab-bar/index.ts @@ -29,14 +29,14 @@ Component({ { pagePath: '/pages/health/index', text: '健康管理', - icon: 'tabbar1-2', - iconActive: 'tabbar1-2-active', + icon: 'tabbar1-3', + iconActive: 'tabbar1-3-active', }, { pagePath: '/pages/my/index', text: '我的', - icon: 'tabbar1-3', - iconActive: 'tabbar1-3-active', + icon: 'tabbar1-4', + iconActive: 'tabbar1-4-active', }, ], }, diff --git a/src/images/bag/bag-decor.png b/src/images/bag/bag-decor.png deleted file mode 100644 index ff56af2..0000000 Binary files a/src/images/bag/bag-decor.png and /dev/null differ diff --git a/src/images/icon10.png b/src/images/icon10.png index 9873016..ce33d41 100644 Binary files a/src/images/icon10.png and b/src/images/icon10.png differ diff --git a/src/images/icon15.png b/src/images/icon15.png index 07a7ff9..bafa11a 100644 Binary files a/src/images/icon15.png and b/src/images/icon15.png differ diff --git a/src/images/icon8-1.png b/src/images/icon8-1.png index d0c48d0..761e759 100644 Binary files a/src/images/icon8-1.png and b/src/images/icon8-1.png differ diff --git a/src/images/icon8.png b/src/images/icon8.png index 3b94a3a..d221a8f 100644 Binary files a/src/images/icon8.png and b/src/images/icon8.png differ diff --git a/src/images/icon9-1.png b/src/images/icon9-1.png index d1c45f5..0fec2a6 100644 Binary files a/src/images/icon9-1.png and b/src/images/icon9-1.png differ diff --git a/src/images/icon9.png b/src/images/icon9.png index c1674d2..cd3c2fa 100644 Binary files a/src/images/icon9.png and b/src/images/icon9.png differ diff --git a/src/images/tabbar/tabbar1-4.png b/src/images/tabbar/tabbar1-4.png index d6fc59d..0b6b789 100644 Binary files a/src/images/tabbar/tabbar1-4.png and b/src/images/tabbar/tabbar1-4.png differ diff --git a/src/pages/articleDetail/index.scss b/src/pages/articleDetail/index.scss index 53bcf63..2dfa59a 100644 --- a/src/pages/articleDetail/index.scss +++ b/src/pages/articleDetail/index.scss @@ -9,13 +9,15 @@ page { gap: 20rpx; .tag { height: 48rpx; - padding: 4rpx 16rpx; + padding: 0 16rpx; font-size: 24rpx; color: rgba(47, 130, 169, 1); border-radius: 12rpx; background: rgba(47, 130, 169, 0.05); box-sizing: border-box; - line-height: 32rpx; + display: flex; + align-items: center; + justify-content: center; } } .title { @@ -231,6 +233,9 @@ page { box-sizing: border-box; font-size: 32rpx; color: rgba(47, 130, 169, 1); + .arrow { + font-weight: bold; + } } } } diff --git a/src/pages/articleDetail/index.wxml b/src/pages/articleDetail/index.wxml index 96427f4..ad346ed 100644 --- a/src/pages/articleDetail/index.wxml +++ b/src/pages/articleDetail/index.wxml @@ -81,7 +81,7 @@ 下一篇 - + diff --git a/src/pages/bag/index.scss b/src/pages/bag/index.scss index 8f1e9ef..65f816b 100644 --- a/src/pages/bag/index.scss +++ b/src/pages/bag/index.scss @@ -303,8 +303,9 @@ page { height: 32rpx; border-radius: 8rpx; &.wx-checkbox-input-checked { + border-color: #fff !important; background: linear-gradient(270deg, #439fc7 0%, #2f82a9 100%); - border-color: transparent; + background-clip: border-box; &::before { font-size: 28rpx; color: #fff; diff --git a/src/pages/changeTel/index.ts b/src/pages/changeTel/index.ts index d8b486a..3ce283b 100644 --- a/src/pages/changeTel/index.ts +++ b/src/pages/changeTel/index.ts @@ -62,16 +62,30 @@ Page({ }) }, handleSubmit() { + const { mobile, code } = this.data + if (!mobile) { + wx.showToast({ + title: '请输入手机号', + icon: 'none', + }) + return + } + if (!code) { + wx.showToast({ + icon: 'none', + title: '请输入验证码', + }) + return + } wx.showModal({ title: '确定修改此手机号?', confirmColor: '#F64A3A', success: (res) => { if (!res.confirm) return - const { mobile, code } = this.data const { registrationSource, registChannel, regBusinessId } = app.globalData wx.ajax({ method: 'POST', - url: '?r=psvt/account/update-telephone', + url: '?r=psvt/user/update-telephone', data: { mobile, code, diff --git a/src/pages/chat/index.scss b/src/pages/chat/index.scss index 6669a77..a4a9c9d 100644 --- a/src/pages/chat/index.scss +++ b/src/pages/chat/index.scss @@ -143,8 +143,9 @@ page { height: 32rpx; border-radius: 8rpx; &.wx-checkbox-input-checked { + border-color: #fff !important; background: linear-gradient(270deg, #439fc7 0%, #2f82a9 100%); - border-color: transparent; + background-clip: border-box; &::before { font-size: 28rpx; color: #fff; diff --git a/src/pages/confirmInfo/index.scss b/src/pages/confirmInfo/index.scss index f5ede81..01a4a96 100644 --- a/src/pages/confirmInfo/index.scss +++ b/src/pages/confirmInfo/index.scss @@ -22,11 +22,11 @@ page { height: 48rpx; text-align: center; font-size: 32rpx; - color: rgba(39, 66, 164, 1); + color: #fff; line-height: 48rpx; border-radius: 50%; - background-color: rgba(255, 255, 255, 1); - border: 8rpx solid rgba(255, 255, 255, 0.16); + background-color: rgba(255, 255, 255, 0.32); + border: 8rpx solid rgba(255, 255, 255, 0.32); background-clip: content-box; } .icon { @@ -39,10 +39,20 @@ page { color: rgba(255, 255, 255, 0.54); } &.active { + .order { + color: rgba(47, 130, 169, 1); + background-color: #fff; + } .name { + font-weight: bold; color: rgba(255, 255, 255, 1); } } + &.last { + .order { + background-color: #fff; + } + } } .line { margin: 30rpx -10rpx 0; @@ -81,6 +91,14 @@ page { background-color: #fff; border-radius: 32rpx; .row { + &:last-of-type { + .select1, + .select2, + .select3, + .select4 { + margin-bottom: 0; + } + } .row-title { font-size: 32rpx; color: rgba(30, 41, 59, 1); @@ -101,10 +119,11 @@ page { justify-content: center; font-size: 32rpx; color: rgba(71, 85, 105, 1); + box-sizing: border-box; &.active { color: #fff; background: linear-gradient(270deg, #439fc7 0%, #2f82a9 100%); - border-color: transparent; + border: none; } } } @@ -124,6 +143,7 @@ page { gap: 16rpx; font-size: 32rpx; color: rgba(71, 85, 105, 1); + box-sizing: border-box; .icon { width: 40rpx; height: 40rpx; diff --git a/src/pages/confirmInfo/index.ts b/src/pages/confirmInfo/index.ts index 58809e5..69b8e50 100644 --- a/src/pages/confirmInfo/index.ts +++ b/src/pages/confirmInfo/index.ts @@ -1,8 +1,11 @@ +import dayjs from 'dayjs' + const app = getApp() interface OptionItem { value: number label: string + subTitle?: string } Page({ @@ -10,6 +13,8 @@ Page({ menuTop: 0, step: 1, + today: dayjs().format('YYYY-MM-DD'), + // 基础数据列表 (from API 1.7) ageRangeList: [] as OptionItem[], genderList: [] as OptionItem[], @@ -29,15 +34,11 @@ Page({ diagnosisStatus: 0 as number, diagnosisTime: '', surgeryStatus: 0 as number, - currentMonth: '', }, onLoad() { const menuRes = wx.getMenuButtonBoundingClientRect() - const now = new Date() - const currentMonth = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}` this.setData({ menuTop: menuRes.top, - currentMonth, }) app.waitLogin({ type: 'any' }).then(() => { this.getBaseData() @@ -52,14 +53,21 @@ Page({ if (Array.isArray(list)) { return list.map((item) => { const key = Object.keys(item)[0] - return { value: Number(key), label: item[key] } + const val = item[key] + if (val && typeof val === 'object') { + return { value: Number(key), label: val.title, subTitle: val.subTitle } + } + return { value: Number(key), label: val } }) } if (list && typeof list === 'object') { - return Object.keys(list).map((key) => ({ - value: Number(key), - label: list[key], - })) + return Object.keys(list).map((key) => { + const val = list[key] + if (val && typeof val === 'object') { + return { value: Number(key), label: val.title, subTitle: val.subTitle } + } + return { value: Number(key), label: val } + }) } return [] } @@ -158,8 +166,11 @@ Page({ }).then(() => { app.globalData.initLoginInfo.isReg = 1 app.globalData.initLoginInfo.isLogin = 1 - const redirectUrl = app.globalData.loginRedirectUrl + let redirectUrl = app.globalData.loginRedirectUrl || '' app.globalData.loginRedirectUrl = '' + if (redirectUrl.includes('login') || redirectUrl.includes('confirmInfo') || redirectUrl.includes('start')) { + redirectUrl = '' + } wx.reLaunch({ url: redirectUrl ? `/${redirectUrl}` : '/pages/index/index', }) diff --git a/src/pages/confirmInfo/index.wxml b/src/pages/confirmInfo/index.wxml index 79090a4..70fd542 100644 --- a/src/pages/confirmInfo/index.wxml +++ b/src/pages/confirmInfo/index.wxml @@ -4,7 +4,7 @@ > - + 1 基础信息 @@ -32,7 +32,9 @@ bind:tap="handleSelect" data-key="ageRange" data-value="{{item.value}}" - >{{item.label}} + > + {{item.label}} + @@ -85,13 +87,14 @@ data-value="{{item.value}}" > {{item.label}} + {{item.subTitle}} 确诊时间 - + {{diagnosisTime || ''}} diff --git a/src/pages/followForm/index.scss b/src/pages/followForm/index.scss index f2cb638..6b4393d 100644 --- a/src/pages/followForm/index.scss +++ b/src/pages/followForm/index.scss @@ -75,10 +75,10 @@ page { } } .txa { - padding: 32rpx; + padding: 24rpx 32rpx; width: 100%; height: 240rpx; - font-size: 28rpx; + font-size: 32rpx; line-height: 48rpx; color: rgba(30, 41, 59, 1); box-sizing: border-box; diff --git a/src/pages/followForm/index.ts b/src/pages/followForm/index.ts index 3f7846f..06addef 100644 --- a/src/pages/followForm/index.ts +++ b/src/pages/followForm/index.ts @@ -23,15 +23,28 @@ Page({ isEdit: false, endDate: dayjs().format('YYYY-MM-DD'), + + userInfo: {} as any, }, onLoad(options: any) { if (options.id) { this.setData({ id: options.id, isEdit: true }) app.waitLogin({ type: 'any' }).then(() => { + app.getUserInfo().then((res) => { + this.setData({ + userInfo: res, + }) + }) this.getDetail(options.id) }) } else { - app.waitLogin({ type: 'any' }).then(() => {}) + app.waitLogin({ type: 'any' }).then(() => { + app.getUserInfo().then((res) => { + this.setData({ + userInfo: res, + }) + }) + }) } }, getDetail(id: string) { @@ -88,7 +101,7 @@ Page({ this.setData({ remark: e.detail.value }) }, handleSubmit() { - const { id, visitDate, fileList, isUpdatePrescription, isUpdateSurgery, remark, isEdit } = this.data + const { id, visitDate, fileList, isUpdatePrescription, isUpdateSurgery, remark, isEdit, userInfo } = this.data if (!visitDate) { wx.showToast({ title: '请选择复诊日期', icon: 'none' }) @@ -131,10 +144,21 @@ Page({ }) .then(() => { wx.hideLoading() - wx.showToast({ title: '保存成功', icon: 'success' }) - setTimeout(() => { - wx.navigateBack() - }, 1000) + if (userInfo.isFollow == 1) { + wx.showToast({ title: '保存成功', icon: 'success' }) + setTimeout(() => { + wx.navigateBack() + }, 1000) + } else { + this.setData({ + popupShow: true, + popupType: 'popup2', + popupParams: { + position: 'center', + close: true, + }, + }) + } }) .catch(() => { wx.hideLoading() @@ -143,60 +167,16 @@ Page({ }, handlePopupOk() { const { popupType } = this.data - if (popupType === 'argument') { - wx.ajax({ - method: 'POST', - url: '?r=wtx/user/agree-guest-privacy', - data: { - WorkerId: app.globalData.scene?.workerId || '', - }, - }).then(() => { - this.setData({ - popupShow: false, - popupType: '', - popupParams: {}, - }) - const waitBindDoctorId = app.globalData.waitBindDoctorId - if (waitBindDoctorId) { - this.handleBindDoctor(waitBindDoctorId) - } - }) - } - if (popupType === 'conformBindDoctorConform') { - this.setData({ - popupShow: false, - }) - wx.ajax({ - method: 'POST', - url: '?r=wtx/account/wait-bind-doctor', - data: { - doctorId: app.globalData.waitBindDoctorId, - }, - }).then(() => { - wx.navigateTo({ - url: `/patient/pages/login/index`, - }) - }) + if (popupType == 'popup2') { + this.setData({ popupShow: false }) + wx.navigateBack() } }, handlePopupCancel() { const { popupType } = this.data - if (popupType === 'argument') { - wx.exitMiniProgram() - } - if (popupType === 'conformBindDoctorConform') { - this.setData({ - popupShow: false, - }) - wx.ajax({ - method: 'POST', - url: '?r=wtx/account/wait-bind-doctor', - data: { - doctorId: app.globalData.waitBindDoctorId, - }, - }).then(() => { - app.globalData.waitBindDoctorId = '' - }) + if (popupType == 'popup2') { + this.setData({ popupShow: false }) + wx.navigateBack() } }, handleWechatWork() { diff --git a/src/pages/health/index.scss b/src/pages/health/index.scss index 955b582..ded7e92 100644 --- a/src/pages/health/index.scss +++ b/src/pages/health/index.scss @@ -29,6 +29,7 @@ page { } .tab-active-class { font-size: 32rpx; + font-weight: bold; } .tab-class { font-size: 28rpx; @@ -76,13 +77,18 @@ page { gap: 12rpx; font-size: 28rpx; color: rgba(30, 41, 59, 1); + .w-content { + display: inline-block; + vertical-align: middle; + } .wx-checkbox-input { width: 32rpx; height: 32rpx; border-radius: 8rpx; &.wx-checkbox-input-checked { + border-color: #fff !important; background: linear-gradient(270deg, #439fc7 0%, #2f82a9 100%); - border-color: transparent; + background-clip: border-box; &::before { font-size: 28rpx; color: #fff; diff --git a/src/pages/health/index.ts b/src/pages/health/index.ts index 03c2982..3be3827 100644 --- a/src/pages/health/index.ts +++ b/src/pages/health/index.ts @@ -41,6 +41,8 @@ Page({ attackCount: 0, maxHeartRate: 0, }, + + userInfo: {} as any, }, ecDataTrendComponent: null as any, _loaded: false, @@ -64,6 +66,9 @@ Page({ this.getRevisitList() this.getLastRevisit() } + app.getUserInfo().then((res) => { + this.setData({ userInfo: res }) + }) }) }, onReady() { @@ -422,62 +427,36 @@ Page({ return chart }) }, - handlePopupOk() { - const { popupType } = this.data - if (popupType === 'argument') { - wx.ajax({ - method: 'POST', - url: '?r=wtx/user/agree-guest-privacy', - data: { - WorkerId: app.globalData.scene?.workerId || '', - }, - }).then(() => { + handleRateTip() { + const { userInfo } = this.data + wx.ajax({ + method: 'POST', + url: '?r=psvt/user/set-tips', + data: { + isHeartRateTips: Number(!userInfo.isHeartRateTips), + }, + }).then(() => { + if (!userInfo.isHeartRateTips) { this.setData({ - popupShow: false, - popupType: '', - popupParams: {}, + popupShow: true, + popupType: 'popup1', }) - const waitBindDoctorId = app.globalData.waitBindDoctorId - if (waitBindDoctorId) { - this.handleBindDoctor(waitBindDoctorId) - } - }) - } - if (popupType === 'conformBindDoctorConform') { + } this.setData({ - popupShow: false, - }) - wx.ajax({ - method: 'POST', - url: '?r=wtx/account/wait-bind-doctor', - data: { - doctorId: app.globalData.waitBindDoctorId, - }, - }).then(() => { - wx.navigateTo({ - url: `/patient/pages/login/index`, - }) + ['userInfo.isHeartRateTips']: !userInfo.isHeartRateTips, }) + }) + }, + handlePopupOk() { + const { popupType } = this.data + if (popupType === 'popup1') { + this.setData({ popupShow: false }) } }, handlePopupCancel() { const { popupType } = this.data - if (popupType === 'argument') { - wx.exitMiniProgram() - } - if (popupType === 'conformBindDoctorConform') { - this.setData({ - popupShow: false, - }) - wx.ajax({ - method: 'POST', - url: '?r=wtx/account/wait-bind-doctor', - data: { - doctorId: app.globalData.waitBindDoctorId, - }, - }).then(() => { - app.globalData.waitBindDoctorId = '' - }) + if (popupType === 'popup1') { + this.setData({ popupShow: false }) } }, }) diff --git a/src/pages/health/index.wxml b/src/pages/health/index.wxml index 716025e..52cf655 100644 --- a/src/pages/health/index.wxml +++ b/src/pages/health/index.wxml @@ -35,8 +35,9 @@ - - 每周提醒我 + + 每周提醒我 + @@ -139,7 +140,10 @@ - {{item.isUpdatePrescription ? '已更新处方' : '未更新处方'}};{{isUpdateSurgery ? '已更新手术诊断' : '未手术诊断'}} + + {{item.isUpdatePrescription ? '已更新处方' : '未更新处方'}};{{isUpdateSurgery ? '已更新手术诊断' : + '未手术诊断'}} + {{item.remark}} diff --git a/src/pages/heartDetail/index.scss b/src/pages/heartDetail/index.scss index 0fafdc0..3a9235f 100644 --- a/src/pages/heartDetail/index.scss +++ b/src/pages/heartDetail/index.scss @@ -116,8 +116,9 @@ page { height: 32rpx; border-radius: 8rpx; &.wx-checkbox-input-checked { + border-color: #fff !important; background: linear-gradient(270deg, #439fc7 0%, #2f82a9 100%); - border-color: transparent; + background-clip: border-box; &::before { font-size: 28rpx; color: #fff; diff --git a/src/pages/heartForm/index.scss b/src/pages/heartForm/index.scss index 390214a..deca7bf 100644 --- a/src/pages/heartForm/index.scss +++ b/src/pages/heartForm/index.scss @@ -13,15 +13,18 @@ page { margin: 30rpx; padding: 32rpx; border-radius: 32rpx; - border: 2rpx solid #fff; + border: 1px solid #fff; background: rgba(255, 255, 255, 0.7); box-shadow: 0 8rpx 64rpx 0 rgba(0, 99, 132, 0.08); backdrop-filter: blur(10rpx); box-sizing: border-box; .rate { + margin-bottom: 56rpx; padding: 32rpx; border-radius: 24rpx; - background-color: #fff; + border: 1px solid #f1f5f9; + background: #fff; + box-shadow: 0 8rpx 64rpx 0 rgba(0, 99, 132, 0.08); .r-title { font-size: 32rpx; color: rgba(71, 85, 105, 1); @@ -46,7 +49,6 @@ page { color: rgba(148, 163, 184, 0.37); } .unit { - width: 200rpx; flex-shrink: 0; font-size: 40rpx; color: rgba(148, 163, 184, 1); @@ -90,14 +92,15 @@ page { } } .icon { - color: rgba(71, 85, 105, 1); + color: rgba(148, 163, 184, 1); } } .txa { - padding: 32rpx; + padding: 24rpx 32rpx; width: 100%; height: 240rpx; - font-size: 28rpx; + font-size: 32rpx; + line-height: 48rpx; color: rgba(30, 41, 59, 1); box-sizing: border-box; background: #f9fafb; @@ -120,8 +123,9 @@ page { height: 32rpx; border-radius: 8rpx; &.wx-checkbox-input-checked { + border-color: #fff !important; background: linear-gradient(270deg, #439fc7 0%, #2f82a9 100%); - border-color: transparent; + background-clip: border-box; &::before { font-size: 28rpx; color: #fff; diff --git a/src/pages/heartForm/index.ts b/src/pages/heartForm/index.ts index c85c7de..3d3b3d2 100644 --- a/src/pages/heartForm/index.ts +++ b/src/pages/heartForm/index.ts @@ -18,15 +18,28 @@ Page({ isPsvtAttack: 0, remark: '', isEdit: false, + + userInfo: {} as any, }, onLoad(options: any) { if (options.id) { this.setData({ id: options.id, isEdit: true }) app.waitLogin({ type: 1 }).then(() => { this.getDetail(options.id) + app.getUserInfo().then((res) => { + this.setData({ + userInfo: res, + }) + }) }) } else { - app.waitLogin({ type: 1 }).then(() => {}) + app.waitLogin({ type: 1 }).then(() => { + app.getUserInfo().then((res) => { + this.setData({ + userInfo: res, + }) + }) + }) } }, getDetail(id: string) { @@ -89,7 +102,7 @@ Page({ this.setData({ remark: e.detail.value }) }, handleSubmit() { - const { id, heartRate, recordDateTime, isPsvtAttack, remark, isEdit } = this.data + const { id, heartRate, recordDateTime, isPsvtAttack, remark, isEdit, userInfo } = this.data if (!heartRate) { wx.showToast({ title: '请输入心率数值', icon: 'none' }) @@ -134,10 +147,21 @@ Page({ }) .then(() => { wx.hideLoading() - wx.showToast({ title: '保存成功', icon: 'success' }) - setTimeout(() => { - wx.navigateBack() - }, 1000) + if (userInfo.isFollow == 1) { + wx.showToast({ title: '保存成功', icon: 'success' }) + setTimeout(() => { + wx.navigateBack() + }, 1000) + } else { + this.setData({ + popupShow: true, + popupType: 'popup3', + popupParams: { + position: 'center', + close: true, + }, + }) + } }) .catch(() => { wx.hideLoading() @@ -149,60 +173,16 @@ Page({ }, handlePopupOk() { const { popupType } = this.data - if (popupType === 'argument') { - wx.ajax({ - method: 'POST', - url: '?r=wtx/user/agree-guest-privacy', - data: { - WorkerId: app.globalData.scene?.workerId || '', - }, - }).then(() => { - this.setData({ - popupShow: false, - popupType: '', - popupParams: {}, - }) - const waitBindDoctorId = app.globalData.waitBindDoctorId - if (waitBindDoctorId) { - this.handleBindDoctor(waitBindDoctorId) - } - }) - } - if (popupType === 'conformBindDoctorConform') { - this.setData({ - popupShow: false, - }) - wx.ajax({ - method: 'POST', - url: '?r=wtx/account/wait-bind-doctor', - data: { - doctorId: app.globalData.waitBindDoctorId, - }, - }).then(() => { - wx.navigateTo({ - url: `/patient/pages/login/index`, - }) - }) + if (popupType == 'popup3') { + this.setData({ popupShow: false }) + wx.navigateBack() } }, handlePopupCancel() { const { popupType } = this.data - if (popupType === 'argument') { - wx.exitMiniProgram() - } - if (popupType === 'conformBindDoctorConform') { - this.setData({ - popupShow: false, - }) - wx.ajax({ - method: 'POST', - url: '?r=wtx/account/wait-bind-doctor', - data: { - doctorId: app.globalData.waitBindDoctorId, - }, - }).then(() => { - app.globalData.waitBindDoctorId = '' - }) + if (popupType == 'popup3') { + this.setData({ popupShow: false }) + wx.navigateBack() } }, }) diff --git a/src/pages/hotTopicDetail/index.scss b/src/pages/hotTopicDetail/index.scss index f44c06c..477664b 100644 --- a/src/pages/hotTopicDetail/index.scss +++ b/src/pages/hotTopicDetail/index.scss @@ -10,7 +10,7 @@ page { .page { .info { - margin: 56rpx 30rpx 0; + margin: 86rpx 30rpx 0; .i-header { display: flex; align-items: center; @@ -32,7 +32,7 @@ page { } } .container { - margin-top: 64rpx; + margin-top: 32rpx; padding-bottom: 120rpx; border-radius: 32rpx 32rpx 0 0; overflow: hidden; @@ -53,6 +53,7 @@ page { &.active { font-size: 32rpx; color: rgba(47, 130, 169, 1); + font-weight: bold; &::after { content: ''; width: 32rpx; @@ -75,7 +76,7 @@ page { padding: 36rpx 32rpx 12rpx; border-radius: 32rpx; border: 2rpx solid #f1f5f9; - background: #fff; + background: rgba(255, 255, 255, 0.7); box-shadow: 0 16rpx 48rpx -8rpx rgba(0, 99, 132, 0.06); box-sizing: border-box; .user { diff --git a/src/pages/login/index.scss b/src/pages/login/index.scss index 488d45e..0dea4ab 100644 --- a/src/pages/login/index.scss +++ b/src/pages/login/index.scss @@ -107,8 +107,9 @@ height: 36rpx; border-radius: 8rpx; &.wx-checkbox-input-checked { + border-color: #fff !important; background: linear-gradient(270deg, #439fc7 0%, #2f82a9 100%); - border-color: transparent; + background-clip: border-box; &::before { font-size: 28rpx; color: #fff; diff --git a/src/pages/login/index.ts b/src/pages/login/index.ts index 543d0f6..3638359 100644 --- a/src/pages/login/index.ts +++ b/src/pages/login/index.ts @@ -141,8 +141,11 @@ Page({ url: '/pages/confirmInfo/index', }) } else { - const redirectUrl = app.globalData.loginRedirectUrl + let redirectUrl = app.globalData.loginRedirectUrl app.globalData.loginRedirectUrl = '' + if (redirectUrl.includes('login') || redirectUrl.includes('confirmInfo') || redirectUrl.includes('start')) { + redirectUrl = '' + } wx.reLaunch({ url: redirectUrl ? `/${redirectUrl}` : '/pages/index/index', }) diff --git a/src/pages/userInfo/index.ts b/src/pages/userInfo/index.ts index cb42311..e754bff 100644 --- a/src/pages/userInfo/index.ts +++ b/src/pages/userInfo/index.ts @@ -3,20 +3,28 @@ const app = getApp() interface OptionItem { value: number label: string + subTitle?: string } const parseList = (list: any): OptionItem[] => { if (Array.isArray(list)) { return list.map((item) => { const key = Object.keys(item)[0] - return { value: Number(key), label: item[key] } + const val = item[key] + if (val && typeof val === 'object') { + return { value: Number(key), label: val.title, subTitle: val.subTitle } + } + return { value: Number(key), label: val } }) } if (list && typeof list === 'object') { - return Object.keys(list).map((key) => ({ - value: Number(key), - label: list[key], - })) + return Object.keys(list).map((key) => { + const val = list[key] + if (val && typeof val === 'object') { + return { value: Number(key), label: `${val.title}${val.subTitle}` } + } + return { value: Number(key), label: val } + }) } return [] } @@ -44,7 +52,7 @@ Page({ regionText: '', currentMonth: '', }, - onLoad() { + onShow() { const now = new Date() const currentMonth = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}` this.setData({ currentMonth }) @@ -219,6 +227,7 @@ Page({ url: '?r=psvt/user/cancellation', data: {}, }).then(() => { + app.globalData.initLoginInfo = {} wx.showToast({ title: '注销成功', icon: 'success' }) wx.restartMiniProgram({ path: '/pages/start/index' }) }) diff --git a/src/pages/videoDetail/index.scss b/src/pages/videoDetail/index.scss index b1ce0f3..e18ec0a 100644 --- a/src/pages/videoDetail/index.scss +++ b/src/pages/videoDetail/index.scss @@ -68,7 +68,7 @@ height: 48rpx; padding: 4rpx 24rpx; line-height: 40rpx; - border-radius: 24rpx; + border-radius: 100rpx; background: #fff; box-sizing: border-box; font-size: 24rpx; diff --git a/src/pages/wall/index.scss b/src/pages/wall/index.scss index 761906d..f3b6806 100644 --- a/src/pages/wall/index.scss +++ b/src/pages/wall/index.scss @@ -74,16 +74,12 @@ page { } } .type-navbar { - position: sticky; - top: 0; - left: 0; padding: 48rpx 0 24rpx 30rpx; display: flex; flex-wrap: nowrap; gap: 12rpx; overflow-x: auto; overflow-y: hidden; - background-color: #f7fafc; &::-webkit-scrollbar { display: none; } @@ -105,11 +101,12 @@ page { .list { padding: 0 30rpx; .list-card { + margin-bottom: 24rpx; position: relative; padding: 36rpx 32rpx 12rpx; border-radius: 32rpx; border: 2rpx solid #f1f5f9; - background: #fff; + background: rgba(255, 255, 255, 0.70); box-shadow: 0 16rpx 48rpx -8rpx rgba(0, 99, 132, 0.06); box-sizing: border-box; .user { @@ -231,6 +228,19 @@ page { color: rgba(47, 130, 169, 1); } } + .new-comment { + margin-top: 32rpx; + padding: 24rpx; + border-radius: 16rpx; + background: #f7fafc; + font-size: 28rpx; + color: rgba(71, 85, 105, 1); + line-height: 44rpx; + .label { + display: inline; + color: rgba(47, 130, 169, 1); + } + } .footer { margin-top: 12rpx; display: flex; @@ -255,7 +265,6 @@ page { } } - .fixed-add { position: fixed; right: 32rpx; diff --git a/src/pages/wall/index.wxml b/src/pages/wall/index.wxml index e5bad4c..11b5fee 100644 --- a/src/pages/wall/index.wxml +++ b/src/pages/wall/index.wxml @@ -9,7 +9,7 @@ - + @@ -48,9 +48,24 @@ {{item.publishTime}} - 热门推荐 + + 热门推荐 + - #{{topic.topicName}} + + #{{topic.topicName}} + {{item.content}} @@ -78,15 +93,31 @@ - - - - + + + + + + + diff --git a/src/pages/wallDetail/index.scss b/src/pages/wallDetail/index.scss index b5915ef..e02085d 100644 --- a/src/pages/wallDetail/index.scss +++ b/src/pages/wallDetail/index.scss @@ -15,7 +15,7 @@ page { padding: 0 32rpx 36rpx; border-radius: 32rpx; border: 2rpx solid #f1f5f9; - background: #fff; + background: rgba(255, 255, 255, 0.7); box-shadow: 0 16rpx 48rpx -8rpx rgba(0, 99, 132, 0.06); box-sizing: border-box; .auth { @@ -174,6 +174,7 @@ page { color: rgba(15, 23, 42, 1); font-weight: bold; .total { + margin-left: 8rpx; display: inline; font-weight: normal; color: rgba(100, 116, 139, 1); diff --git a/src/pages/wallDetail/index.wxml b/src/pages/wallDetail/index.wxml index 8f4c2f2..3e047ed 100644 --- a/src/pages/wallDetail/index.wxml +++ b/src/pages/wallDetail/index.wxml @@ -100,7 +100,7 @@ - {{item.nickName}} + {{item.nickName}} {{item.commentTime}} {{item.content}} @@ -134,7 +134,7 @@ > - {{childItem.nickName}} + {{childItem.nickName}} {{childItem.commentTime}} diff --git a/src/pages/wallForm/index.scss b/src/pages/wallForm/index.scss index 5607a14..80368bf 100644 --- a/src/pages/wallForm/index.scss +++ b/src/pages/wallForm/index.scss @@ -59,6 +59,7 @@ page { } .txa { padding: 32rpx 0; + width: 100%; font-size: 32rpx; color: rgba(30, 41, 59, 1); line-height: 48rpx; @@ -253,7 +254,7 @@ page { .send { background: linear-gradient(270deg, #439fc7 0%, #2f82a9 100%); color: #fff; - border-color: transparent; + border: none; } } } @@ -296,13 +297,14 @@ page { justify-content: center; background-color: #f7fafc; border-radius: 14rpx; + color: rgba(100, 116, 139, 1); } .content { padding-top: 4rpx; flex: 1; font-size: 36rpx; - color: rgba(30, 41, 59, 1); line-height: 48rpx; + color: rgba(71, 85, 105, 1); } .total { padding-top: 8rpx; @@ -321,18 +323,27 @@ page { background-color: rgba(255, 107, 34, 1); color: #fff; } + .content { + color: rgba(30, 41, 59, 1); + } } .li:nth-of-type(2) { .num { background-color: rgba(255, 143, 51, 1); color: #fff; } + .content { + color: rgba(30, 41, 59, 1); + } } .li:nth-of-type(3) { .num { background-color: rgba(47, 130, 169, 1); color: #fff; } + .content { + color: rgba(30, 41, 59, 1); + } } } } diff --git a/src/pages/wallForm/index.wxml b/src/pages/wallForm/index.wxml index bb95196..a890ec8 100644 --- a/src/pages/wallForm/index.wxml +++ b/src/pages/wallForm/index.wxml @@ -96,6 +96,7 @@ {{index+1}} # {{item.topicName}} + {{item.postCount}}篇帖子