Browse Source

ui走查问题处理

dev
kola-web 10 hours ago
parent
commit
2617836a4c
  1. 5
      src/components/pagination/index.scss
  2. 10
      src/components/pagination/index.wxml
  3. 96
      src/components/popup/index.ts
  4. 6
      src/components/popup/index.wxml
  5. 8
      src/custom-tab-bar/index.ts
  6. BIN
      src/images/bag/bag-decor.png
  7. BIN
      src/images/icon10.png
  8. BIN
      src/images/icon15.png
  9. BIN
      src/images/icon8-1.png
  10. BIN
      src/images/icon8.png
  11. BIN
      src/images/icon9-1.png
  12. BIN
      src/images/icon9.png
  13. BIN
      src/images/tabbar/tabbar1-4.png
  14. 9
      src/pages/articleDetail/index.scss
  15. 2
      src/pages/articleDetail/index.wxml
  16. 3
      src/pages/bag/index.scss
  17. 18
      src/pages/changeTel/index.ts
  18. 3
      src/pages/chat/index.scss
  19. 28
      src/pages/confirmInfo/index.scss
  20. 31
      src/pages/confirmInfo/index.ts
  21. 9
      src/pages/confirmInfo/index.wxml
  22. 4
      src/pages/followForm/index.scss
  23. 84
      src/pages/followForm/index.ts
  24. 8
      src/pages/health/index.scss
  25. 61
      src/pages/health/index.ts
  26. 10
      src/pages/health/index.wxml
  27. 3
      src/pages/heartDetail/index.scss
  28. 18
      src/pages/heartForm/index.scss
  29. 84
      src/pages/heartForm/index.ts
  30. 7
      src/pages/hotTopicDetail/index.scss
  31. 3
      src/pages/login/index.scss
  32. 5
      src/pages/login/index.ts
  33. 21
      src/pages/userInfo/index.ts
  34. 2
      src/pages/videoDetail/index.scss
  35. 21
      src/pages/wall/index.scss
  36. 47
      src/pages/wall/index.wxml
  37. 3
      src/pages/wallDetail/index.scss
  38. 4
      src/pages/wallDetail/index.wxml
  39. 15
      src/pages/wallForm/index.scss
  40. 1
      src/pages/wallForm/index.wxml

5
src/components/pagination/index.scss

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
/* components/pagination/index.wxss */
.none {
.pagination {
--divider-text-color: rgba(148, 163, 184, 1);
.none {
display: block;
margin: 30rpx auto;
width: 80%;
}
}

10
src/components/pagination/index.wxml

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
<image class="none" src="{{imageUrl}}none.png" wx:if="{{pagination.count==0}}"></image>
<van-divider contentPosition="center" wx:elif="{{pagination.page<pagination.pages}}">
<view class="pagination">
<image class="none" src="{{imageUrl}}none.png" wx:if="{{pagination.count==0}}"></image>
<van-divider contentPosition="center" wx:elif="{{pagination.page<pagination.pages}}">
<van-loading />
加载中...
</van-divider>
<van-divider contentPosition="center" wx:elif="{{pagination.page>=pagination.pages}}">没有更多了</van-divider>
</van-divider>
<van-divider contentPosition="center" wx:elif="{{pagination.page>=pagination.pages}}">没有更多了</van-divider>
</view>

96
src/components/popup/index.ts

@ -22,7 +22,13 @@ Component({ @@ -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({ @@ -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({

6
src/components/popup/index.wxml

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
>
<view class="title">关注“星动守护”</view>
<view class="content">我们将在每周五下午7点提醒您记录</view>
<image class="code" src="{{imageUrl}}bg1.png?t={{Timestamp}}" show-menu-by-longpress></image>
<image class="code" src="{{codeImg}}" show-menu-by-longpress></image>
</view>
</view>
<!-- 保存复诊记录成功-引导关注公众号 -->
@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
class="code-wrap"
style="background: url('{{imageUrl}}bg14.png?t={{Timestamp}}') no-repeat top center/100%"
>
<image class="code" src="{{imageUrl}}bg1.png?t={{Timestamp}}" show-menu-by-longpress></image>
<image class="code" src="{{codeImg}}" show-menu-by-longpress></image>
</view>
<view class="content">
关注“心动守护”公众号
@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
class="code-wrap"
style="background: url('{{imageUrl}}bg14.png?t={{Timestamp}}') no-repeat top center/100%"
>
<image class="code" src="{{imageUrl}}bg1.png?t={{Timestamp}}" show-menu-by-longpress></image>
<image class="code" src="{{codeImg}}" show-menu-by-longpress></image>
</view>
<view class="content">
关注“心动守护”公众号

8
src/custom-tab-bar/index.ts

@ -29,14 +29,14 @@ Component({ @@ -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',
},
],
},

BIN
src/images/bag/bag-decor.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

BIN
src/images/icon10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

After

Width:  |  Height:  |  Size: 567 B

BIN
src/images/icon15.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/images/icon8-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 812 B

BIN
src/images/icon8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/icon9-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 717 B

BIN
src/images/icon9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 B

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/tabbar/tabbar1-4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 791 B

After

Width:  |  Height:  |  Size: 1.3 KiB

9
src/pages/articleDetail/index.scss

@ -9,13 +9,15 @@ page { @@ -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 { @@ -231,6 +233,9 @@ page {
box-sizing: border-box;
font-size: 32rpx;
color: rgba(47, 130, 169, 1);
.arrow {
font-weight: bold;
}
}
}
}

2
src/pages/articleDetail/index.wxml

@ -81,7 +81,7 @@ @@ -81,7 +81,7 @@
</view>
<view class="next" wx:if="{{next.Id}}" bind:tap="handleNext">
下一篇
<van-icon name="arrow" />
<van-icon class="arrow" name="arrow" />
</view>
</view>
</view>

3
src/pages/bag/index.scss

@ -303,8 +303,9 @@ page { @@ -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;

18
src/pages/changeTel/index.ts

@ -62,16 +62,30 @@ Page({ @@ -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,

3
src/pages/chat/index.scss

@ -143,8 +143,9 @@ page { @@ -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;

28
src/pages/confirmInfo/index.scss

@ -22,11 +22,11 @@ page { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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;

31
src/pages/confirmInfo/index.ts

@ -1,8 +1,11 @@ @@ -1,8 +1,11 @@
import dayjs from 'dayjs'
const app = getApp<IAppOption>()
interface OptionItem {
value: number
label: string
subTitle?: string
}
Page({
@ -10,6 +13,8 @@ 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({ @@ -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({ @@ -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({ @@ -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',
})

9
src/pages/confirmInfo/index.wxml

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
>
<image class="logo" src="{{imageUrl}}logo1.png?t={{Timestamp}}"></image>
<view class="page-header">
<view class="item {{step==1 &&'active'}}">
<view class="item {{step>1 &&'last'}} {{step==1 &&'active'}}">
<view class="order" wx:if="{{step===1}}">1</view>
<view class="order" wx:else><image class="icon" src="{{imageUrl}}icon3.png?t={{Timestamp}}"></image></view>
<view class="name">基础信息</view>
@ -32,7 +32,9 @@ @@ -32,7 +32,9 @@
bind:tap="handleSelect"
data-key="ageRange"
data-value="{{item.value}}"
>{{item.label}}</view>
>
{{item.label}}
</view>
</view>
</view>
<view class="row">
@ -85,13 +87,14 @@ @@ -85,13 +87,14 @@
data-value="{{item.value}}"
>
<view class="title">{{item.label}}</view>
<view class="content" wx:if="{{item.subTitle}}">{{item.subTitle}}</view>
</view>
</view>
</view>
<view class="row" wx:if="{{diagnosisStatus===2}}">
<view class="row-title">确诊时间</view>
<view class="select3">
<picker mode="date" fields="month" bindchange="handleDiagnosisTimeChange" end="{{currentMonth}}">
<picker mode="date" fields="month" bindchange="handleDiagnosisTimeChange" end="{{today}}">
<view class="picker-content">
<view class="content" data-place="选择确诊时间">{{diagnosisTime || ''}}</view>
<image class="icon" src="{{imageUrl}}icon7.png?t={{Timestamp}}"></image>

4
src/pages/followForm/index.scss

@ -75,10 +75,10 @@ page { @@ -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;

84
src/pages/followForm/index.ts

@ -23,15 +23,28 @@ Page({ @@ -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({ @@ -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({ @@ -131,10 +144,21 @@ Page({
})
.then(() => {
wx.hideLoading()
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({ @@ -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() {

8
src/pages/health/index.scss

@ -29,6 +29,7 @@ page { @@ -29,6 +29,7 @@ page {
}
.tab-active-class {
font-size: 32rpx;
font-weight: bold;
}
.tab-class {
font-size: 28rpx;
@ -76,13 +77,18 @@ page { @@ -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;

61
src/pages/health/index.ts

@ -41,6 +41,8 @@ Page({ @@ -41,6 +41,8 @@ Page({
attackCount: 0,
maxHeartRate: 0,
},
userInfo: {} as any,
},
ecDataTrendComponent: null as any,
_loaded: false,
@ -64,6 +66,9 @@ Page({ @@ -64,6 +66,9 @@ Page({
this.getRevisitList()
this.getLastRevisit()
}
app.getUserInfo().then((res) => {
this.setData({ userInfo: res })
})
})
},
onReady() {
@ -422,62 +427,36 @@ Page({ @@ -422,62 +427,36 @@ Page({
return chart
})
},
handlePopupOk() {
const { popupType } = this.data
if (popupType === 'argument') {
handleRateTip() {
const { userInfo } = this.data
wx.ajax({
method: 'POST',
url: '?r=wtx/user/agree-guest-privacy',
url: '?r=psvt/user/set-tips',
data: {
WorkerId: app.globalData.scene?.workerId || '',
isHeartRateTips: Number(!userInfo.isHeartRateTips),
},
}).then(() => {
if (!userInfo.isHeartRateTips) {
this.setData({
popupShow: false,
popupType: '',
popupParams: {},
})
const waitBindDoctorId = app.globalData.waitBindDoctorId
if (waitBindDoctorId) {
this.handleBindDoctor(waitBindDoctorId)
}
popupShow: true,
popupType: 'popup1',
})
}
if (popupType === 'conformBindDoctorConform') {
this.setData({
popupShow: false,
['userInfo.isHeartRateTips']: !userInfo.isHeartRateTips,
})
wx.ajax({
method: 'POST',
url: '?r=wtx/account/wait-bind-doctor',
data: {
doctorId: app.globalData.waitBindDoctorId,
},
}).then(() => {
wx.navigateTo({
url: `/patient/pages/login/index`,
})
})
}
},
handlePopupCancel() {
handlePopupOk() {
const { popupType } = this.data
if (popupType === 'argument') {
wx.exitMiniProgram()
if (popupType === 'popup1') {
this.setData({ popupShow: false })
}
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 = ''
})
handlePopupCancel() {
const { popupType } = this.data
if (popupType === 'popup1') {
this.setData({ popupShow: false })
}
},
})

10
src/pages/health/index.wxml

@ -35,8 +35,9 @@ @@ -35,8 +35,9 @@
<image class="icon" src="{{imageUrl}}icon25.png?t={{Timestamp}}"></image>
</view>
<view class="week-alert">
<checkbox class="check"></checkbox>
每周提醒我
<checkbox class="check" checked="{{userInfo.isHeartRateTips}}" bind:tap="handleRateTip">
<view class="w-content">每周提醒我</view>
</checkbox>
</view>
</view>
<view class="stats-grid">
@ -139,7 +140,10 @@ @@ -139,7 +140,10 @@
<image class="p-img" mode="aspectFill" src="{{img}}"></image>
</view>
</view>
<view class="title">{{item.isUpdatePrescription ? '已更新处方' : '未更新处方'}};{{isUpdateSurgery ? '已更新手术诊断' : '未手术诊断'}}</view>
<view class="title">
{{item.isUpdatePrescription ? '已更新处方' : '未更新处方'}};{{isUpdateSurgery ? '已更新手术诊断' :
'未手术诊断'}}
</view>
<view class="content" wx:if="{{item.remark}}">{{item.remark}}</view>
</view>
</view>

3
src/pages/heartDetail/index.scss

@ -116,8 +116,9 @@ page { @@ -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;

18
src/pages/heartForm/index.scss

@ -13,15 +13,18 @@ page { @@ -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 { @@ -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 { @@ -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 { @@ -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;

84
src/pages/heartForm/index.ts

@ -18,15 +18,28 @@ Page({ @@ -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({ @@ -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({ @@ -134,10 +147,21 @@ Page({
})
.then(() => {
wx.hideLoading()
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({ @@ -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()
}
},
})

7
src/pages/hotTopicDetail/index.scss

@ -10,7 +10,7 @@ page { @@ -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 { @@ -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 { @@ -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 { @@ -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 {

3
src/pages/login/index.scss

@ -107,8 +107,9 @@ @@ -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;

5
src/pages/login/index.ts

@ -141,8 +141,11 @@ Page({ @@ -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',
})

21
src/pages/userInfo/index.ts

@ -3,20 +3,28 @@ const app = getApp<IAppOption>() @@ -3,20 +3,28 @@ const app = getApp<IAppOption>()
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({ @@ -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({ @@ -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' })
})

2
src/pages/videoDetail/index.scss

@ -68,7 +68,7 @@ @@ -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;

21
src/pages/wall/index.scss

@ -74,16 +74,12 @@ page { @@ -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 { @@ -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 { @@ -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 { @@ -255,7 +265,6 @@ page {
}
}
.fixed-add {
position: fixed;
right: 32rpx;

47
src/pages/wall/index.wxml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
<view class="page-header">
<view class="search">
<image class="icon" src="{{imageUrl}}icon14.png?t={{Timestamp}}"></image>
<input class="input" placeholder-class="place-input" type="text" placeholder="搜索帖子 / 话题 / 患者故事" />
<input class="input" placeholder-class="place-input" type="text" placeholder="搜索帖子 / 话题" />
</view>
</view>
<view class="topic" wx:if="{{hotTopics.length}}">
@ -48,9 +48,24 @@ @@ -48,9 +48,24 @@
<view class="date">{{item.publishTime}}</view>
</view>
</view>
<view class="hot" wx:if="{{item.isRecommend===1}}" style="background: url('{{imageUrl}}bg11.png?t={{Timestamp}}') no-repeat top center/100%">热门推荐</view>
<view
class="hot"
wx:if="{{item.isRecommend===1}}"
style="background: url('{{imageUrl}}bg11.png?t={{Timestamp}}') no-repeat top center/100%"
>
热门推荐
</view>
<view class="content">
<view class="c-topic" wx:for="{{item.topics}}" wx:for-item="topic" wx:key="topicId" catch:tap="handleTopicDetail" data-id="{{topic.topicId}}">#{{topic.topicName}}</view>
<view
class="c-topic"
wx:for="{{item.topics}}"
wx:for-item="topic"
wx:key="topicId"
catch:tap="handleTopicDetail"
data-id="{{topic.topicId}}"
>
#{{topic.topicName}}
</view>
{{item.content}}
</view>
<view class="tags" wx:if="{{item.categories.length}}">
@ -78,15 +93,31 @@ @@ -78,15 +93,31 @@
<image class="play-icon" src="{{imageUrl}}icon17.png?t={{Timestamp}}"></image>
</view>
<!-- 多图/视频混合 -->
<view wx:if="{{item.attachments.length>1}}" class="photo9">
<view
wx:if="{{item.attachments.length>1}}"
class="photo9"
class="p-item"
wx:for="{{item.attachments}}"
wx:for-item="att"
wx:key="id"
catch:tap="handlePreviewMedia"
data-index="{{index}}"
data-attachments="{{item.attachments}}"
>
<view class="p-item" wx:for="{{item.attachments}}" wx:for-item="att" wx:key="id" catch:tap="handlePreviewMedia" data-index="{{index}}" data-attachments="{{item.attachments}}">
<image class="p-img" mode="aspectFill" src="{{att.attachmentType==2 ? att.videoCoverUrl : att.attachmentUrl}}"></image>
<image class="play-icon" wx:if="{{att.attachmentType==2}}" src="{{imageUrl}}icon17.png?t={{Timestamp}}"></image>
<image
class="p-img"
mode="aspectFill"
src="{{att.attachmentType==2 ? att.videoCoverUrl : att.attachmentUrl}}"
></image>
<image
class="play-icon"
wx:if="{{att.attachmentType==2}}"
src="{{imageUrl}}icon17.png?t={{Timestamp}}"
></image>
</view>
</view>
<!-- <view class="new-comment"> -->
<!-- <view class="label">最新评论:</view> -->
<!-- </view> -->
<view class="footer">
<view class="op">
<image class="icon" src="{{imageUrl}}icon9.png?t={{Timestamp}}"></image>

3
src/pages/wallDetail/index.scss

@ -15,7 +15,7 @@ page { @@ -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 { @@ -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);

4
src/pages/wallDetail/index.wxml

@ -100,7 +100,7 @@ @@ -100,7 +100,7 @@
<image class="avatar" mode="aspectFill" src="{{item.avatar || imageUrl + 'bg1.png?t=' + Timestamp}}"></image>
<view class="wrap">
<view class="w-header">
<view class="name">{{item.nickName}}</view>
<view class="name" wx:if="{{item.nickName}}">{{item.nickName}}</view>
<view class="date">{{item.commentTime}}</view>
</view>
<view class="content">{{item.content}}</view>
@ -134,7 +134,7 @@ @@ -134,7 +134,7 @@
></image>
<view class="wrap">
<view class="w-header">
<view class="name">{{childItem.nickName}}</view>
<view class="name" wx:if="{{childItem.nickName}}">{{childItem.nickName}}</view>
<view class="date">{{childItem.commentTime}}</view>
</view>
<view class="content">

15
src/pages/wallForm/index.scss

@ -59,6 +59,7 @@ page { @@ -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 { @@ -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 { @@ -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 { @@ -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);
}
}
}
}

1
src/pages/wallForm/index.wxml

@ -96,6 +96,7 @@ @@ -96,6 +96,7 @@
<view class="li {{tools.include(item.id, selectedTopicIds) ? 'active' : ''}}" wx:for="{{topicList}}" wx:key="id" bind:tap="handleTopicTap" data-id="{{item.id}}">
<view class="num">{{index+1}}</view>
<view class="content"># {{item.topicName}}</view>
<view class="total">{{item.postCount}}篇帖子</view>
</view>
</view>
</view>

Loading…
Cancel
Save