Browse Source

患者端换皮肤

dev
kola-web 2 months ago
parent
commit
b80f439fcf
  1. 19
      .prettierrc
  2. 3
      README.md
  3. 6
      project.config.json
  4. 25
      project.private.config.json
  5. 4
      src/app.json
  6. 16
      src/components/patient-tab-bar/index.scss
  7. 64
      src/components/patient-tab-bar/index.ts
  8. 4
      src/components/patient-tab-bar/index.wxml
  9. BIN
      src/images/bg10.png
  10. BIN
      src/images/icon24.png
  11. BIN
      src/images/icon25.png
  12. BIN
      src/images/icon26.png
  13. BIN
      src/images/icon27.png
  14. BIN
      src/images/icon28.png
  15. BIN
      src/images/icon29.png
  16. BIN
      src/images/icon30.png
  17. BIN
      src/images/icon31.png
  18. BIN
      src/images/icon32.png
  19. BIN
      src/images/icon33.png
  20. BIN
      src/images/icon34.png
  21. BIN
      src/images/icon35.png
  22. BIN
      src/images/icon36.png
  23. BIN
      src/images/icon37.png
  24. BIN
      src/images/icon38.png
  25. BIN
      src/images/icon39.png
  26. BIN
      src/images/icon40.png
  27. BIN
      src/images/icon41.png
  28. BIN
      src/images/icon42.png
  29. BIN
      src/images/icon43.png
  30. BIN
      src/images/icon44.png
  31. BIN
      src/images/logo2.png
  32. BIN
      src/images/tabbar/tab-active4.png
  33. BIN
      src/images/tabbar/tab-active5.png
  34. BIN
      src/images/tabbar/tab4.png
  35. BIN
      src/images/tabbar/tab5.png
  36. BIN
      src/images/title6.png
  37. 4
      src/patient/pages/cancellation/index.json
  38. 38
      src/patient/pages/cancellation/index.scss
  39. 9
      src/patient/pages/cancellation/index.wxml
  40. 2
      src/patient/pages/doctorDetail/index.json
  41. 162
      src/patient/pages/doctorDetail/index.scss
  42. 10
      src/patient/pages/doctorDetail/index.ts
  43. 45
      src/patient/pages/doctorDetail/index.wxml
  44. 5
      src/patient/pages/enterInfo/index.json
  45. 172
      src/patient/pages/enterInfo/index.scss
  46. 104
      src/patient/pages/enterInfo/index.ts
  47. 170
      src/patient/pages/enterInfo/index.wxml
  48. 953
      src/patient/pages/index/index.scss
  49. 306
      src/patient/pages/index/index.ts
  50. 447
      src/patient/pages/index/index.wxml
  51. 5
      src/patient/pages/interactivePatient/index.json
  52. 71
      src/patient/pages/interactivePatient/index.scss
  53. 11
      src/patient/pages/interactivePatient/index.ts
  54. 37
      src/patient/pages/interactivePatient/index.wxml
  55. 3
      src/patient/pages/live/index.json
  56. 179
      src/patient/pages/live/index.scss
  57. 38
      src/patient/pages/live/index.wxml
  58. 4
      src/patient/pages/liveDetail/index.json
  59. 135
      src/patient/pages/liveDetail/index.scss
  60. 17
      src/patient/pages/liveDetail/index.ts
  61. 155
      src/patient/pages/liveDetail/index.wxml
  62. 6
      src/patient/pages/liveResult/index.json
  63. 259
      src/patient/pages/liveResult/index.scss
  64. 82
      src/patient/pages/liveResult/index.ts
  65. 74
      src/patient/pages/liveResult/index.wxml
  66. 122
      src/patient/pages/login/index.scss
  67. 62
      src/patient/pages/login/index.wxml
  68. 154
      src/patient/pages/my/index.scss
  69. 1
      src/patient/pages/my/index.ts
  70. 127
      src/patient/pages/my/index.wxml
  71. 3
      src/patient/pages/myLive/index.json
  72. 290
      src/patient/pages/myLive/index.scss
  73. 13
      src/patient/pages/myLive/index.ts
  74. 204
      src/patient/pages/myLive/index.wxml
  75. 3
      src/patient/pages/mySave/index.json
  76. 254
      src/patient/pages/mySave/index.scss
  77. 175
      src/patient/pages/mySave/index.ts
  78. 172
      src/patient/pages/mySave/index.wxml
  79. 4
      src/patient/pages/personalInformation/index.json
  80. 47
      src/patient/pages/personalInformation/index.scss
  81. 176
      src/patient/pages/personalInformation/index.ts
  82. 176
      src/patient/pages/personalInformation/index.wxml
  83. 5
      src/patient/pages/repository/index.json
  84. 84
      src/patient/pages/repository/index.scss
  85. 82
      src/patient/pages/repository/index.wxml
  86. 13
      src/patient/pages/repositoryDetail/index.scss
  87. 168
      src/patient/pages/repositoryDetail/index.ts
  88. 98
      src/patient/pages/repositoryDetail/index.wxml

19
.prettierrc

@ -1,35 +1,28 @@
{ {
"$schema": "https://json.schemastore.org/prettierrc.json", "$schema": "http://json.schemastore.org/prettierrc",
"printWidth": 120, "printWidth": 120,
"tabWidth": 2, "tabWidth": 2,
"useTabs": false, "useTabs": false,
"semi": true, "semi": false,
"singleQuote": true, "singleQuote": true,
"bracketSpacing": true, "bracketSpacing": true,
"trailingComma": "all", "trailingComma": "all",
"arrowParens": "always", "arrowParens": "always",
"endOfLine": "auto", "endOfLine": "lf",
"htmlWhitespaceSensitivity": "ignore", "htmlWhitespaceSensitivity": "ignore",
"singleAttributePerLine": false, "singleAttributePerLine": false,
"jsxSingleQuote": true,
"overrides": [ "overrides": [
{ {
"files": "*.wxml", "files": "*.wxml",
"options": { "options": { "parser": "html" }
"parser": "html"
}
}, },
{ {
"files": "*.wxss", "files": "*.wxss",
"options": { "options": { "parser": "css" }
"parser": "css"
}
}, },
{ {
"files": "*.wxs", "files": "*.wxs",
"options": { "options": { "parser": "babel" }
"parser": "babel"
}
} }
] ]
} }

3
README.md

@ -7,7 +7,8 @@
https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567 https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567
images svn 地址 images svn 地址
svn://39.106.86.127:28386/projects/takeda/proj_src/shop/frontend/web/wt svn://39.106.86.127:28386/projects/xd/proj_src/shop/frontend/web/xd
svn://39.106.86.127:28386/projects/xd/proj_src/branches/dev_v2.0/shop/frontend/web/xd/
(/images/)(\S*(?=["|'])) (/images/)(\S*(?=["|']))
{{imageUrl}}$2?t={{Timestamp}} {{imageUrl}}$2?t={{Timestamp}}

6
project.config.json

@ -3,10 +3,7 @@
"miniprogramRoot": "src/", "miniprogramRoot": "src/",
"compileType": "miniprogram", "compileType": "miniprogram",
"setting": { "setting": {
"useCompilerPlugins": [ "useCompilerPlugins": ["typescript", "sass"],
"typescript",
"sass"
],
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
@ -73,3 +70,4 @@
}, },
"appid": "wxf9ce8010f1ad24aa" "appid": "wxf9ce8010f1ad24aa"
} }

25
project.private.config.json

@ -23,11 +23,32 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "患者-直播结果页",
"pathName": "patient/pages/liveResult/index",
"query": "id=5",
"scene": null,
"launchMode": "default"
},
{
"name": "患者-医生详情",
"pathName": "patient/pages/doctorDetail/index",
"query": "id=3",
"launchMode": "default",
"scene": null
},
{
"name": "患者-互动",
"pathName": "patient/pages/interactivePatient/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "患者端-登录", "name": "患者端-登录",
"pathName": "patient/pages/login/index", "pathName": "patient/pages/login/index",
"query": "", "query": "",
"scene": null, "launchMode": "default",
"launchMode": "default" "scene": null
}, },
{ {
"name": "资料库详情", "name": "资料库详情",

4
src/app.json

@ -131,8 +131,8 @@
"text": "资料库" "text": "资料库"
}, },
{ {
"iconPath": "/images/tabbar/tab2.png", "iconPath": "/images/tabbar/tab4.png",
"selectedIconPath": "/images/tabbar/tab-active2.png", "selectedIconPath": "/images/tabbar/tab-active4.png",
"pagePath": "pages/d_interactive/index", "pagePath": "pages/d_interactive/index",
"text": "互动" "text": "互动"
}, },

16
src/components/patient-tab-bar/index.scss

@ -1,19 +1,15 @@
/* custom-tab-bar/index.wxss */ /* custom-tab-bar/index.wxss */
.tab-item { .tab-item {
.icon { .icon {
width: 50rpx; width: 48rpx;
height: 50rpx; height: 48rpx;
} }
.name { .name {
font-size: 24rpx; font-size: 20rpx;
color: #CCCCCC; color: rgba(105, 104, 110, 1);
&.active{ &.active {
color: #CF5375; color: rgba(33, 29, 46, 1);
}
&.drug-active{
color: #25D9C8;
} }
} }
} }

64
src/components/patient-tab-bar/index.ts

@ -1,5 +1,5 @@
import { getCurrentPageUrl } from '@/utils/util'; import { getCurrentPageUrl } from '@/utils/util'
const app = getApp(); const app = getApp()
Component({ Component({
properties: {}, properties: {},
@ -11,32 +11,26 @@ Component({
{ {
pagePath: '/patient/pages/index/index', pagePath: '/patient/pages/index/index',
text: '首页', text: '首页',
icon: 'home', icon: 'tab1',
iconActive: 'home-active', iconActive: 'tab-active1',
}, },
{ {
pagePath: '/patient/pages/repository/index', pagePath: '/patient/pages/repository/index',
text: 'MG全知道', text: '了解TED',
icon: 'story', icon: 'tab2',
iconActive: 'story-active', iconActive: 'tab-active2',
}, },
{ {
pagePath: '/patient/pages/live/index', pagePath: '/patient/pages/live/index',
text: '周三大咖说', text: '大咖说',
icon: 'gift', icon: 'tab5',
iconActive: 'gift-active', iconActive: 'tab-active5',
},
{
pagePath: '/patient/pages/story/index',
text: '向往的生活',
icon: 'class',
iconActive: 'class-active',
}, },
{ {
pagePath: '/patient/pages/my/index', pagePath: '/patient/pages/my/index',
text: '我的', text: '我的',
icon: 'my', icon: 'tab3',
iconActive: 'my-active', iconActive: 'tab-active3',
}, },
], ],
userInfo: {}, userInfo: {},
@ -50,17 +44,17 @@ Component({
app.zdGetTheme().then((res) => { app.zdGetTheme().then((res) => {
this.setData({ this.setData({
theme: res, theme: res,
}); })
}); })
const pagePath = getCurrentPageUrl(); const pagePath = getCurrentPageUrl()
const active = this.data.list.findIndex((item) => item.pagePath === pagePath); const active = this.data.list.findIndex((item) => item.pagePath === pagePath)
this.setData({ this.setData({
active, active,
}); })
this.setData({ this.setData({
showRed: app.globalData.showRed, showRed: app.globalData.showRed,
}); })
// getApp().registerListener(() => { // getApp().registerListener(() => {
// wx.ajax({ // wx.ajax({
// method: 'GET', // method: 'GET',
@ -76,30 +70,30 @@ Component({
methods: { methods: {
onChange() {}, onChange() {},
handleNav(e) { handleNav(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
const { list, config } = this.data; const { list, config } = this.data
const pagePath = list[index].pagePath; const pagePath = list[index].pagePath
app.globalData.BeginnerCardId = ''; app.globalData.BeginnerCardId = ''
if (pagePath == '/patient/pages/my/index') { if (pagePath == '/patient/pages/my/index') {
app.zdPermissionVerification(2, 0, `/patient/pages/index/index`).then(() => { app.zdPermissionVerification(2, 0, `/patient/pages/index/index`).then(() => {
wx.reLaunch({ wx.reLaunch({
url: pagePath, url: pagePath,
}); })
}); })
} else if (pagePath == '/patient/pages/repository/index' && config.picTextEbookStatus == 1) { } else if (pagePath == '/patient/pages/repository/index' && config.picTextEbookStatus == 1) {
app.zdPermissionVerification(2, 0, `/pages/repository/index`).then(() => { app.zdPermissionVerification(2, 0, `/pages/repository/index`).then(() => {
const webviewUrl = encodeURIComponent( const webviewUrl = encodeURIComponent(
`${app.globalData.url}/zdcare/#/cover?loginState=${app.globalData.loginState}`, `${app.globalData.url}/zdcare/#/cover?loginState=${app.globalData.loginState}`,
); )
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/webview/index?url=${webviewUrl}`, url: `/patient/pages/webview/index?url=${webviewUrl}`,
}); })
}); })
} else { } else {
wx.reLaunch({ wx.reLaunch({
url: pagePath, url: pagePath,
}); })
} }
}, },
}, },
}); })

4
src/components/patient-tab-bar/index.wxml

@ -4,9 +4,9 @@
class="tab-item" class="tab-item"
bind:tap="handleNav" bind:tap="handleNav"
data-index="{{index}}" data-index="{{index}}"
icon="{{imageUrl}}za-images/tabbar/{{active==index ? (theme === 'DRUG' ? 'drug-' :'' ) + item.iconActive: item.icon}}.png" icon="{{imageUrl}}tabbar/{{active==index ? item.iconActive: item.icon}}.png"
> >
<view class="name {{index==active && (theme === 'DRUG' ? 'drug-active' :'active')}}">{{item.text}}</view> <view class="name {{index==active && 'active'}}">{{item.text}}</view>
<view class="hot"></view> <view class="hot"></view>
</van-tabbar-item> </van-tabbar-item>
</block> </block>

BIN
src/images/bg10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 KiB

BIN
src/images/icon24.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

BIN
src/images/icon25.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

BIN
src/images/icon26.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/images/icon27.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/images/icon28.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
src/images/icon29.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
src/images/icon30.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

BIN
src/images/icon31.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/icon32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/images/icon33.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/images/icon34.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon35.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
src/images/icon36.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/images/icon37.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/icon38.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

BIN
src/images/icon39.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/images/icon40.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/icon41.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/icon42.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/images/icon43.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
src/images/icon44.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
src/images/logo2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
src/images/tabbar/tab-active4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/images/tabbar/tab-active5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/images/tabbar/tab4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/tabbar/tab5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/title6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

4
src/patient/pages/cancellation/index.json

@ -1,6 +1,6 @@
{ {
"navigationBarTitleText": "", "navigationBarTitleText": "注销账号",
"navigationStyle": "custom", "navigationStyle": "default",
"usingComponents": { "usingComponents": {
"navBar": "/components/zd-navBar/navBar" "navBar": "/components/zd-navBar/navBar"
} }

38
src/patient/pages/cancellation/index.scss

@ -1,46 +1,42 @@
page { page {
background-color: #afb7cb; background-color: rgba(246, 248, 249, 1);
} }
.page { .page {
height: 100vh; height: 100vh;
display: flex;
flex-direction: column;
.container { .container {
padding: 76rpx 48rpx 58rpx; padding: 84rpx 40rpx 0;
flex: 1;
margin-top: 160rpx;
box-sizing: border-box;
border-radius: 48rpx 48rpx 0 0;
background-color: #fff;
text-align: center; text-align: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.icon { .icon {
width: 256rpx; width: 128rpx;
height: 256rpx; height: 128rpx;
} }
.title { .title {
margin-top: 51rpx; margin-top: 51rpx;
font-size: 48rpx; font-size: 36rpx;
color: #495069; color: rgba(0, 0, 0, 1);
font-weight: bold; font-weight: bold;
} }
.tip { .tip {
text-align: left; margin-top: 48rpx;
margin-top: 44rpx; padding: 32rpx;
font-size: 30rpx; font-size: 32rpx;
line-height: 53rpx; line-height: 48rpx;
color: #aeb7cd; border-radius: 24rpx;
color: rgba(173, 172, 178, 1);
background-color: #fff;
} }
.footer { .footer {
margin-top: 80rpx;
.rescan { .rescan {
width: 100%; width: 100%;
height: 80rpx; height: 88rpx;
text-align: center; text-align: center;
color: #fff; color: #fff;
line-height: 80rpx; line-height: 88rpx;
background: #B8BFD1; background: linear-gradient( 197deg, #FFBCF9 0%, #B982FF 100%);
border-radius: 42rpx; border-radius: 42rpx;
} }
} }

9
src/patient/pages/cancellation/index.wxml

@ -1,13 +1,8 @@
<view class="page"> <view class="page">
<navBar back bind:back="handleBack" color="#fff" icon-theme="white" title="注销帐号"></navBar>
<view class="container"> <view class="container">
<view class="banner"> <view class="banner">
<image class="icon" src="{{imageUrl}}za-images/1/f-warn.png?t={{Timestamp}}"></image> <image class="icon" src="/images/icon44.png"></image>
<view class="title"> <view class="title">注销后数据不可恢复 请谨慎操作</view>
注销后数据不可恢复
<view></view>
请谨慎操作
</view>
<view class="tip"> <view class="tip">
注销账号后,系统会删除当前患者的全部信息和数据,包括基础信息数据,患者的健康记录数据,若您有亲友号绑定此患者,则亲友号也将同步自动注销。您注销后若重新注册,则为全新身份在平台内使用,原有的数据无法恢复。 注销账号后,系统会删除当前患者的全部信息和数据,包括基础信息数据,患者的健康记录数据,若您有亲友号绑定此患者,则亲友号也将同步自动注销。您注销后若重新注册,则为全新身份在平台内使用,原有的数据无法恢复。
</view> </view>

2
src/patient/pages/doctorDetail/index.json

@ -2,6 +2,6 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"navBar": "/components/zd-navBar/navBar" "navbar": "/components/navbar/index"
} }
} }

162
src/patient/pages/doctorDetail/index.scss

@ -1,19 +1,21 @@
page { page {
background: #f2f4f5; background: rgba(246, 248, 249, 1);
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
} }
.page { .page {
min-height: 100vh; min-height: 100vh;
padding: 0 30rpx;
.container { .container {
margin: 160rpx 30rpx 0; position: relative;
padding: 0 30rpx 40rpx; padding: 32rpx 32rpx 32rpx 32rpx;
background: #fff linear-gradient(to top, #ffffff 0%, #e8f0f1 100%) no-repeat top center/100% 200rpx; background: linear-gradient(53deg, #ffffff 0%, rgba(255, 255, 255, 0.46) 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
.avatar { .avatar {
margin-top: -50rpx; position: absolute;
width: 128rpx; top: -36rpx;
height: 128rpx; right: 32rpx;
width: 164rpx;
height: 164rpx;
.avatar-user { .avatar-user {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -21,46 +23,47 @@ page {
} }
} }
.name { .name {
margin: -55rpx 0 0 150rpx; padding-right: 220rpx;
font-size: 40rpx; font-size: 40rpx;
color: rgba(40, 48, 49, 1); color: rgba(33, 29, 46, 1);
font-weight: bold; font-weight: bold;
line-height: 1; line-height: 48rpx;
.label {
display: inline;
font-weight: normal;
font-size: 28rpx;
color: rgba(105, 104, 110, 1);
}
} }
.card { .hostipal {
margin-top: 52rpx; margin-top: 20rpx;
padding: 32rpx; padding-right: 220rpx;
background: #ffffff; font-size: 28rpx;
box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04); color: rgba(105, 104, 110, 1);
border-radius: 24rpx 24rpx 24rpx 24rpx; .tag {
border: 2rpx solid #f8f9f9; margin-right: 12rpx;
.content { display: inline-block;
display: flex; flex-shrink: 0;
gap: 8rpx; padding: 4rpx 12rpx;
align-items: start; font-size: 22rpx;
font-size: 32rpx; color: #fff;
color: rgba(40, 48, 49, 1); border-radius: 8rpx;
line-height: 1; background: linear-gradient(90deg, #ffd650 0%, #f8a61a 100%);
.tag {
flex-shrink: 0;
padding: 4rpx 12rpx;
font-size: 22rpx;
color: rgba(229, 154, 41, 1);
border-radius: 8rpx;
background-color: rgba(229, 154, 41, 0.29);
}
} }
}
.card {
margin-top: 32rpx;
padding-top: 32rpx;
border-top: 1px solid rgba(246, 248, 249, 1);
.c-row { .c-row {
margin-top: 32rpx;
display: flex; display: flex;
gap: 12rpx; gap: 16rpx;
font-size: 32rpx; font-size: 28rpx;
color: rgba(40, 48, 49, 1); color: rgba(105, 104, 110, 1);
line-height: 1;
.icon { .icon {
flex-shrink: 0; flex-shrink: 0;
width: 32rpx; width: 36rpx;
height: 32rpx; height: 36rpx;
} }
.site-num { .site-num {
margin-top: 10rpx; margin-top: 10rpx;
@ -70,75 +73,22 @@ page {
} }
} }
} }
.row {
margin-top: 32rpx;
.r-title {
width: 128rpx;
height: 32rpx;
}
.r-content {
margin-top: 16rpx;
font-size: 28rpx;
color: rgba(154, 161, 163, 1);
}
}
} }
.invite { .info-card {
padding: 36rpx 30rpx 36rpx 168rpx; margin-top: 24rpx;
margin: 24rpx 30rpx 0; padding: 32rpx;
display: flex; background: #ffffff;
align-items: center; border-radius: 24rpx 24rpx 24rpx 24rpx;
justify-content: space-between;
border-radius: 24rpx;
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
.wrap { .r-title {
.title { width: 128rpx;
font-size: 36rpx; height: 32rpx;
color: rgba(40, 48, 49, 1);
}
.content {
font-size: 28rpx;
color: rgba(154, 161, 163, 1);
}
}
.btn {
width: 198rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: rgba(255, 255, 255, 1);
background: #62bed0;
border-radius: 136rpx 136rpx 136rpx 136rpx;
} }
} .r-content {
.list { margin-top: 16rpx;
margin: 24rpx 30rpx 0; font-size: 28rpx;
.list-item { color: rgba(105, 104, 110, 1);
padding: 30rpx; line-height: 44rpx;
display: flex;
justify-content: space-between;
align-items: center;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.left {
display: flex;
gap: 20rpx;
align-items: center;
.icon {
width: 48rpx;
height: 48rpx;
}
.name {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
}
}
.more {
color: #d4d9da;
font-size: 32rpx;
}
} }
} }
} }

10
src/patient/pages/doctorDetail/index.ts

@ -13,15 +13,7 @@ Page({
}, },
}, },
onLoad(options) { onLoad(options) {
const SystemInfo = app.globalSystemInfo app.waitLogin({ type: [1] }).then((_res) => {
if (SystemInfo) {
const { top, bottom } = SystemInfo.capsulePosition
this.setData({
top,
bottom,
})
}
app.zdWaitLogin().then((_res) => {
this.setData({ this.setData({
id: options.id, id: options.id,
}) })

45
src/patient/pages/doctorDetail/index.wxml

@ -1,43 +1,50 @@
<view <view
class="page" class="page"
style="padding-top: {{top+5}}px;background: url({{imageUrl}}za-images//doctor/my-bg.png?t={{Timestamp}}) no-repeat top center / 100% 740rpx" style="padding-top: {{pageTop+40}}px;background: url({{imageUrl}}bg10.png?t={{Timestamp}}) no-repeat top center / 100% 610rpx"
> >
<navBar title="" fixed background="{{background}}" home="{{false}}" back bind:back="handleBack"></navBar> <navbar fixed title="" custom-style="background:{{background}}">
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<view class="container"> <view class="container">
<view class="avatar"> <view class="avatar">
<image class="avatar-user" mode="aspectFill" src="{{detail.Img}}"></image> <image class="avatar-user" mode="aspectFill" src="{{detail.Img}}"></image>
</view> </view>
<view class="name">{{detail.Name}}</view> <view class="name">
{{detail.Name}}
<view class="label">主任医生 | 眼科</view>
</view>
<view class="hostipal">
<view class="tag">三级甲等</view>
{{detail.hospital.Name}}
<!-- <view class="tag" wx:if="{{detail.hospital.HospitalClassificationName || detail.hospital.HospitalLevelName}}"> -->
<!-- {{detail.hospital.HospitalClassificationName}}{{detail.hospital.HospitalLevelName}} -->
<!-- </view> -->
</view>
<view class="card"> <view class="card">
<view class="content">
{{detail.hospital.Name}}
<view class="tag" wx:if="{{detail.hospital.HospitalClassificationName || detail.hospital.HospitalLevelName}}">
{{detail.hospital.HospitalClassificationName}}{{detail.hospital.HospitalLevelName}}
</view>
</view>
<view <view
class="c-row" class="c-row"
bind:tap="handleOpenMap" bind:tap="handleOpenMap"
wx:if="{{detail.hospital.ProvinceName || detail.hospital.CityName || detail.hospital.CountyName || detail.hospital.Address}}" wx:if="{{detail.hospital.ProvinceName || detail.hospital.CityName || detail.hospital.CountyName || detail.hospital.Address}}"
> >
<image class="icon" src="{{imageUrl}}za-images//doctor/icon-site.png?t={{Timestamp}}"></image> <image class="icon" src="/images/icon41.png"></image>
<view> <view>
{{detail.hospital.ProvinceName}}{{detail.hospital.CityName}}{{detail.hospital.CountyName}}{{detail.hospital.Address}} {{detail.hospital.ProvinceName}}{{detail.hospital.CityName}}{{detail.hospital.CountyName}}{{detail.hospital.Address}}
<view class="site-num">{{detail.hospital.dist}}</view> <view class="site-num">{{detail.hospital.dist}}</view>
</view> </view>
</view> </view>
<view class="c-row" bind:tap="handlePhone" wx:if="{{ detail.Telephone }}"> <view class="c-row" bind:tap="handlePhone" wx:if="{{ detail.Telephone }}">
<image class="icon" src="{{imageUrl}}za-images//doctor/icon-phone.png?t={{Timestamp}}"></image> <image class="icon" src="/images/icon42.png"></image>
{{ detail.Telephone }} {{ detail.Telephone }}
</view> </view>
</view> </view>
<view class="row" wx:if="{{detail.Introduce}}"> </view>
<image class="r-title" src="{{imageUrl}}za-images//doctor/my-title1.png?t={{Timestamp}}"></image>
<view class="r-content">{{detail.Introduce}}</view> <view class="info-card" wx:if="{{detail.Introduce}}">
</view> <image class="r-title" src="{{imageUrl}}za-images//doctor/my-title1.png?t={{Timestamp}}"></image>
<view class="row" wx:if="{{detail.weekName}}"> <view class="r-content">{{detail.Introduce}}</view>
<image class="r-title" src="{{imageUrl}}za-images//doctor/my-title2.png?t={{Timestamp}}"></image> </view>
<view class="r-content pre-line">{{detail.weekName}}</view> <view class="info-card" wx:if="{{detail.weekName}}">
</view> <image class="r-title" src="{{imageUrl}}za-images//doctor/my-title2.png?t={{Timestamp}}"></image>
<view class="r-content pre-line">{{detail.weekName}}</view>
</view> </view>
</view> </view>

5
src/patient/pages/enterInfo/index.json

@ -3,10 +3,9 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"disableSwipeBack": true, "disableSwipeBack": true,
"usingComponents": { "usingComponents": {
"loginNavbar": "/components/loginNavbar/index",
"pageNavbar": "/components/pageNavbar/index",
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"van-divider": "@vant/weapp/divider/index", "van-divider": "@vant/weapp/divider/index",
"van-popup": "@vant/weapp/popup/index" "van-popup": "@vant/weapp/popup/index",
"navbar": "/components/navbar/index"
} }
} }

172
src/patient/pages/enterInfo/index.scss

@ -2,77 +2,76 @@
min-height: 100vh; min-height: 100vh;
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: rgba(255, 255, 255, 1);
.bg { .bg {
width: 100%; width: 100%;
height: 512rpx;
} }
.page-container { .page-container {
padding-bottom: 180rpx; padding-bottom: 260rpx;
position: absolute; position: absolute;
width: 100%; width: 100%;
top: 0; top: 0;
left: 0; left: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.navbar {
flex-shrink: 0;
}
.title {
margin-top: 86rpx;
font-size: 56rpx;
color: #333333;
font-weight: bold;
text-align: center;
}
.content { .content {
margin: 86rpx auto 0; padding: 40rpx 40rpx 0;
padding: 40rpx 64rpx 0;
width: 654rpx;
box-sizing: border-box; box-sizing: border-box;
background: #ffffff;
box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.09);
border: 2rpx solid rgba(224, 71, 117, 0.25);
border-radius: 24rpx; border-radius: 24rpx;
.switch { .switch {
margin-bottom: 40rpx; margin-bottom: 50rpx;
display: flex; display: flex;
gap: 22rpx; gap: 22rpx;
justify-content: space-between; justify-content: center;
gap: 86rpx;
.item { .item {
padding: 19rpx 19rpx 16rpx; .icon-wrap {
flex: 1; background: rgba(255, 255, 255, 1);
background: #f2f2f2; border-radius: 24rpx 24rpx 24rpx 24rpx;
border-radius: 24rpx 24rpx 24rpx 24rpx; border: 1px solid rgba(255, 255, 255, 1);
border: 1px solid #d2d2d2; text-align: center;
text-align: center; .icon {
.icon { display: block;
width: 152rpx; margin-bottom: -2px;
height: 90rpx; width: 186rpx;
height: 164rpx;
}
} }
.name { .name {
margin-top: 12rpx; margin-top: 24rpx;
font-size: 28rpx; font-size: 32rpx;
color: #999999; color: rgba(173, 172, 178, 1);
line-height: 32rpx; text-align: center;
} }
&.active { &.active {
background-color: #ffffff; .icon-wrap {
border-color: #cf5375; border-color: rgba(185, 130, 255, 1);
}
.name { .name {
color: #cf5375; color: rgba(185, 130, 255, 1);
} }
} }
} }
} }
.divider { .row-title {
font-size: 24rpx; margin-top: 48rpx;
color: #aaaaaa; margin-bottom: 24rpx;
font-size: 32rpx;
font-weight: bold;
color: rgba(33, 29, 46, 1);
.sub {
font-size: 32rpx;
color: rgba(105, 104, 110, 1);
font-weight: normal;
}
} }
.row { .row {
margin-bottom: 40rpx; margin-bottom: 40rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
gap: 22rpx;
&.row-age { &.row-age {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
@ -110,97 +109,102 @@
height: 40rpx; height: 40rpx;
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
background: #f2f2f2; background: #f6f8f9;
border: 2rpx solid #cccccc; border-radius: 116rpx;
border-radius: 24rpx; }
.input-place {
color: rgba(173, 172, 178, 1);
}
.input-required {
display: flex;
justify-content: space-between;
align-items: flex-end;
&::after {
flex-shrink: 0;
margin-right: 60rpx;
content: '';
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: rgba(185, 130, 255, 1);
}
} }
.item { .item {
padding: 12rpx 24rpx; flex: 1;
padding: 12rpx 62rpx;
opacity: 1; opacity: 1;
border: 2rpx solid #cccccc; border: 2rpx solid #cccccc;
font-size: 28rpx; font-size: 32rpx;
color: #999999; color: rgba(173, 172, 178, 1);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 12rpx; border-radius: 116rpx;
background: linear-gradient(90deg, #fff 0%, #f9f9f9 100%); background: rgba(246, 248, 249, 1);
.icon { .icon {
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
} }
&.active { &.active {
color: #e04775; color: rgba(185, 130, 255, 1);
background: linear-gradient(90deg, #fff 0%, #f9f9f9 100%); background: #fff;
border-color: #e04775; border-color: rgba(185, 130, 255, 1);
}
}
.input-required {
display: flex;
justify-content: space-between;
align-items: center;
&::after {
margin-right: 60rpx;
content: '';
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #e04775;
} }
} }
.age-item { .age-item {
margin-bottom: 24rpx; margin-bottom: 24rpx;
width: 160rpx; width: 208rpx;
height: 88rpx; height: 88rpx;
white-space: nowrap; white-space: nowrap;
font-size: 28rpx; font-size: 32rpx;
color: #999999; color: #999999;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 12rpx; border-radius: 150rpx;
box-sizing: border-box; box-sizing: border-box;
border: 2rpx solid #d2d2d2; border: 2rpx solid #d2d2d2;
&.active { &.active {
color: #e04775; color: rgba(185, 130, 255, 1);
border-color: #e04775; border-color: rgba(185, 130, 255, 1);
} }
} }
} }
.tip { .tip {
margin-top: -26rpx; margin-top: -24rpx;
font-size: 24rpx; margin-left: 46rpx;
font-size: 28rpx;
line-height: 40rpx; line-height: 40rpx;
color: #cf5375; color: rgba(185, 130, 255, 1);
} }
} }
} }
.footer { .footer {
padding: 32rpx 40rpx 40rpx;
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 40rpx; bottom: 0;
width: calc(100% - 96rpx); width: 100%;
flex-shrink: 0;
margin: 0 48rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; background-color: #fff;
> view:not(:last-of-type), box-shadow: 0 -10rpx 10rpx rgba(204,204,204, 0.1);
> image {
margin-right: 30rpx;
}
.next { .next {
flex: 1; flex: 1;
text-align: center; text-align: center;
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
text-align: center; text-align: center;
border: 2rpx solid #e04775; border-radius: 100rpx;
border-radius: 24rpx;
font-size: 34rpx; font-size: 34rpx;
font-weight: bold; background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
background-color: #e04775;
color: #fff; color: #fff;
} }
.cancel {
margin-top: 48rpx;
font-size: 32rpx;
color: rgba(173, 172, 178, 1);
text-align: center;
}
} }
} }

104
src/patient/pages/enterInfo/index.ts

@ -1,5 +1,5 @@
import dayjs from 'dayjs'; import dayjs from 'dayjs'
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
Page({ Page({
data: { data: {
@ -26,7 +26,7 @@ Page({
this.setData({ this.setData({
pagePath: options.page, pagePath: options.page,
proces: options.proces, proces: options.proces,
}); })
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => { app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => {
app.getZdUserInfo(this, true, (zdUserInfo) => { app.getZdUserInfo(this, true, (zdUserInfo) => {
this.setData({ this.setData({
@ -34,81 +34,53 @@ Page({
name: zdUserInfo.PatientName, name: zdUserInfo.PatientName,
gender: zdUserInfo.Gender, gender: zdUserInfo.Gender,
ageRange: zdUserInfo.AgeRange, ageRange: zdUserInfo.AgeRange,
}); })
}); })
app.zdMpBehavior({ PageName: 'PG_PATIENTINFOENTRY' }); app.zdMpBehavior({ PageName: 'PG_PATIENTINFOENTRY' })
}); })
}, },
handleRelationType(e: WechatMiniprogram.CustomEvent) { handleRelationType(e: WechatMiniprogram.CustomEvent) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset
this.setData({ this.setData({
relationType: id, relationType: id,
}); })
}, },
handleGender(e: WechatMiniprogram.CustomEvent) { handleGender(e: WechatMiniprogram.CustomEvent) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset
this.setData({ this.setData({
gender: id, gender: id,
}); })
}, },
handleSelectAge(e: WechatMiniprogram.CustomEvent) { handleSelectAge(e: WechatMiniprogram.CustomEvent) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset
this.setData({ this.setData({
ageRange: id, ageRange: id,
}); })
},
bindChangeDate(e: WechatMiniprogram.CustomEvent) {
const { key } = e.currentTarget.dataset;
this.setData({
[key]: e.detail.value,
});
},
handleDiagnoseTypeSave() {
const rangeIndex = this.data.selectDiagnoseTypeIndex;
const { DiagnoseType } = this.data;
const { id, name } = DiagnoseType[rangeIndex];
this.setData({
diagnoseTypeIndex: rangeIndex,
diagnoseTypeName: name,
diagnoseType: id,
});
this.handleDiagnoseTypeShow();
},
handleDiagnoseTypeShow() {
this.setData({
diagnoseTypeShow: !this.data.diagnoseTypeShow,
});
},
bindChange(e: WechatMiniprogram.CustomEvent) {
const rangeIndex = e.detail.value[0];
this.setData({
selectDiagnoseTypeIndex: rangeIndex,
});
}, },
handleSubmit() { handleSubmit() {
if (this.data.submiting) return; if (this.data.submiting) return
app.zdMpBehavior({ PageName: 'BTN_PATIENTINFONEXT' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTINFONEXT' })
const { name, gender, ageRange, relationType } = this.data; const { name, gender, ageRange, relationType } = this.data
const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData; const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData
const { doctorId, inviteChan } = app.globalData.scene; const { doctorId, inviteChan } = app.globalData.scene
let toast = ''; let toast = ''
// if (!diagnosisTime) toast = "确诊时间不能为空"; // if (!diagnosisTime) toast = "确诊时间不能为空";
// if (!birth) toast = "出生日期不能为空"; // if (!birth) toast = "出生日期不能为空";
if (!gender) toast = '请选择性别'; if (!gender) toast = '请选择性别'
if (!ageRange) toast = '请选择年龄范围'; if (!ageRange) toast = '请选择年龄范围'
if (!name) toast = '姓名不能为空'; if (!name) toast = '姓名不能为空'
if (toast) { if (toast) {
wx.showToast({ title: toast, icon: 'none' }); wx.showToast({ title: toast, icon: 'none' })
return; return
} }
const backPage = app.globalData.backPage; const backPage = app.globalData.backPage
const navUrl = const navUrl =
typeof backPage === 'string' && backPage.includes('liveResult') ? backPage : '/patient/pages/certReslove/index'; typeof backPage === 'string' && backPage.includes('liveResult') ? backPage : '/patient/pages/certReslove/index'
this.setData({ this.setData({
submiting: true, submiting: true,
}); })
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/account/reg', url: '?r=zd/account/reg',
@ -133,21 +105,27 @@ Page({
app.updateLoginInfo(() => { app.updateLoginInfo(() => {
wx.reLaunch({ wx.reLaunch({
url: navUrl, url: navUrl,
}); })
this.setData({ this.setData({
submiting: false, submiting: false,
}); })
}); })
}) })
.catch(() => { .catch(() => {
this.setData({ this.setData({
submiting: false, submiting: false,
}); })
}); })
}, },
handleBack() { handleBack() {
wx.navigateBack(); wx.navigateBack({
fail() {
wx.reLaunch({
url: '/patient/pages/login/index',
})
},
})
}, },
}); })
export {}; export {}

170
src/patient/pages/enterInfo/index.wxml

@ -1,31 +1,21 @@
<view class="page"> <view class="page">
<image class="bg" mode="widthFix" src="{{imageUrl}}za-images/1/login-bg.png?t={{Timestamp}}"></image> <navbar fixed title="录入信息" custom-style="background:{{background}}">
<view class="page-container"> <van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
<pageNavbar></pageNavbar> </navbar>
<view class="title">录入信息</view> <image class="bg" src="/images/bg10.png"></image>
<view class="page-container" style="padding-top:{{pageTop+24}}px;">
<view class="content"> <view class="content">
<view class="viewider">
<van-divider contentPosition="center" textColor="#aaaaaa">选择身份</van-divider>
</view>
<view class="switch"> <view class="switch">
<!-- <view class="name {{relationType==1 && 'active'}}" bind:tap="handleRelationType" data-id="1">患者本人</view> -->
<!-- <view class="name {{relationType==2 && 'active'}}" bind:tap="handleRelationType" data-id="2">患者亲友</view> -->
<view class="item {{relationType==1 && 'active'}}" bind:tap="handleRelationType" data-id="1"> <view class="item {{relationType==1 && 'active'}}" bind:tap="handleRelationType" data-id="1">
<image <view class="icon-wrap">
wx:if="{{relationType==1}}" <image class="icon" src="/images/icon28.png"></image>
class="icon" </view>
src="{{imageUrl}}za-images/1/enter-switch1-active.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/1/enter-switch1.png?t={{Timestamp}}"></image>
<view class="name">患者本人</view> <view class="name">患者本人</view>
</view> </view>
<view class="item {{relationType==2 && 'active'}}" bind:tap="handleRelationType" data-id="2"> <view class="item {{relationType==2 && 'active'}}" bind:tap="handleRelationType" data-id="2">
<image <view class="icon-wrap">
wx:if="{{relationType==2}}" <image class="icon" src="/images/icon29.png"></image>
class="icon" </view>
src="{{imageUrl}}za-images/1/enter-switch2-active.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/1/enter-switch2.png?t={{Timestamp}}"></image>
<view class="name">患者亲友</view> <view class="name">患者亲友</view>
</view> </view>
</view> </view>
@ -33,28 +23,31 @@
<input <input
model:value="{{name}}" model:value="{{name}}"
class="input input-required" class="input input-required"
placeholder-class="input-place"
focus focus
maxlength="{{8}}" maxlength="{{8}}"
placeholder="怎么称呼{{relationType==1?'您':'患者'}}?" placeholder="怎么称呼{{relationType==1?'您':'患者'}}?"
/> />
</view> </view>
<view class="tip">请您输入真实姓名,便于医生识别随访</view> <view class="tip">请您输入真实姓名,便于医生识别随访</view>
<view class="viewider"> <view class="row-title">患者性别</view>
<van-divider contentPosition="center" textColor="#aaaaaa">患者性别</van-divider>
</view>
<view class="row"> <view class="row">
<view class="item {{gender==2 && 'active'}}" bind:tap="handleGender" data-id="2"> <view class="item {{gender==2 && 'active'}}" bind:tap="handleGender" data-id="2">
<image class="icon" src="{{imageUrl}}za-images/1/woman{{gender==2 ? '-active' : ''}}.png?t={{Timestamp}}"></image> <image
class="icon"
src="{{imageUrl}}za-images/1/woman{{gender==2 ? '-active' : ''}}.png?t={{Timestamp}}"
></image>
女性用户 女性用户
</view> </view>
<view class="item {{gender==1 && 'active'}}" bind:tap="handleGender" data-id="1"> <view class="item {{gender==1 && 'active'}}" bind:tap="handleGender" data-id="1">
<image class="icon" src="{{imageUrl}}za-images/1/man{{gender==1 ? '-active' : ''}}.png?t={{Timestamp}}"></image> <image
class="icon"
src="{{imageUrl}}za-images/1/man{{gender==1 ? '-active' : ''}}.png?t={{Timestamp}}"
></image>
男性用户 男性用户
</view> </view>
</view> </view>
<view class="viewider"> <view class="row-title">患者年龄范围</view>
<van-divider contentPosition="center" textColor="#aaaaaa">患者年龄范围</van-divider>
</view>
<view class="row row-age"> <view class="row row-age">
<view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">18岁以下</view> <view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">18岁以下</view>
<view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">18岁-44岁</view> <view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">18岁-44岁</view>
@ -62,109 +55,28 @@
<view class="age-item {{ageRange==3 && 'active'}}" data-id="3" bind:tap="handleSelectAge">60岁-74岁</view> <view class="age-item {{ageRange==3 && 'active'}}" data-id="3" bind:tap="handleSelectAge">60岁-74岁</view>
<view class="age-item {{ageRange==4 && 'active'}}" data-id="4" bind:tap="handleSelectAge">75岁以上</view> <view class="age-item {{ageRange==4 && 'active'}}" data-id="4" bind:tap="handleSelectAge">75岁以上</view>
</view> </view>
<!-- <view class="row"> --> <view class="row-title">
<!-- <picker --> 是否有Graves病病史
<!-- class="picker" --> <div class="sub">(非必填)</div>
<!-- value="{{birth}}" --> </view>
<!-- bind:change="bindChangeDate" --> <view class="row row-age">
<!-- mode="date" --> <view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">是</view>
<!-- fields="month" --> <view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">否</view>
<!-- end="{{currentDate}}" --> <view class="age-item {{ageRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectAge">不确定</view>
<!-- data-key="birth" --> </view>
<!-- > --> <view class="row-title">
<!-- <view class="select"> --> 是否有TED(甲状腺眼突)及其相关眼部手术史
<!-- <input --> <div class="sub">(非必填)</div>
<!-- class="picker-input" --> </view>
<!-- value="{{birth}}" --> <view class="row row-age">
<!-- type="text" --> <view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">是</view>
<!-- placeholder="请选择{{relationType==1?'您':'患者'}}的出生年月" --> <view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">否</view>
<!-- disabled="{{true}}" --> <view class="age-item {{ageRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectAge">不确定</view>
<!-- /> --> </view>
<!-- <view class="icons"> -->
<!-- <view class="required"></view> -->
<!-- <van-icon class="icon" name="arrow-down" color="#CCCCCC" size="20" /> -->
<!-- </view> -->
<!-- </view> -->
<!-- </picker> -->
<!-- </view> -->
<!-- <view class="row"> -->
<!-- <picker -->
<!-- class="picker" -->
<!-- value="{{diagnosisTime}}" -->
<!-- bind:change="bindChangeDate" -->
<!-- fields="month" -->
<!-- mode="date" -->
<!-- end="{{currentDate}}" -->
<!-- data-key="diagnosisTime" -->
<!-- > -->
<!-- <view class="select"> -->
<!-- <input -->
<!-- class="picker-input" -->
<!-- value="{{diagnosisTime}}" -->
<!-- type="text" -->
<!-- placeholder="请选择{{relationType==1?'您':'患者'}}的确诊时间" -->
<!-- disabled="{{true}}" -->
<!-- /> -->
<!-- <view class="icons"> -->
<!-- <view class="required"></view> -->
<!-- <van-icon class="icon" name="arrow-down" color="#CCCCCC" size="20" /> -->
<!-- </view> -->
<!-- </view> -->
<!-- </picker> -->
<!-- </view> -->
<!-- <view class="row"> -->
<!-- <picker -->
<!-- class="picker" -->
<!-- bind:change="bindChange" -->
<!-- value="{{diagnoseTypeIndex}}" -->
<!-- range="{{DiagnoseType}}" -->
<!-- range-key="name" -->
<!-- disabled="{{true}}" -->
<!-- > -->
<!-- <view class="select" bind:tap="handleDiagnoseTypeShow"> -->
<!-- <input -->
<!-- wx:if="{{!diagnoseTypeName}}" -->
<!-- class="picker-input" -->
<!-- value="{{diagnoseTypeName}}" -->
<!-- type="text" -->
<!-- placeholder="请选择{{relationType==1?'您':'患者'}}的诊断分型" -->
<!-- disabled="{{true}}" -->
<!-- /> -->
<!-- <view class="select-content" wx:else>{{diagnoseTypeName}}</view> -->
<!-- <view class="icons"> -->
<!-- <van-icon class="icon" name="arrow-down" color="#CCCCCC" size="20" /> -->
<!-- </view> -->
<!-- </view> -->
<!-- </picker> -->
<!-- </view> -->
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<view bind:tap="handleSubmit" class="next">立即进入</view> <view bind:tap="handleSubmit" class="next">立即进入</view>
<view bind:tap="handleBack" class="cancel">取消</view>
</view> </view>
</view> </view>
<van-popup
class="popup"
show="{{ diagnoseTypeShow }}"
position="bottom"
round
close-on-click-overlay
bind:close="handleDiagnoseTypeShow"
>
<view class="popup-title">
<view class="close" bind:tap="handleDiagnoseTypeShow">关闭</view>
<view class="sure" bind:tap="handleDiagnoseTypeSave">保存</view>
</view>
<picker-view
class="popup-picker"
indicator-style="height: 50px;"
style="width: 100%; height: 300px"
value="{{value}}"
bindchange="bindChange"
>
<picker-view-column>
<view class="picker-col" wx:for="{{DiagnoseType}}">{{item.name}}</view>
</picker-view-column>
</picker-view>
</van-popup>

953
src/patient/pages/index/index.scss

File diff suppressed because it is too large Load Diff

306
src/patient/pages/index/index.ts

@ -1,6 +1,6 @@
import dayjs from 'dayjs'; import dayjs from 'dayjs'
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
const licia = require('miniprogram-licia'); const licia = require('miniprogram-licia')
Page({ Page({
data: { data: {
@ -12,6 +12,7 @@ Page({
zdUserInfo: {} as any, zdUserInfo: {} as any,
anyWhere: false, anyWhere: false,
regGuide: true, regGuide: true,
isLogin: 1,
adlList: [], adlList: [],
adlNum: '', adlNum: '',
@ -47,49 +48,50 @@ Page({
options: {} as any, options: {} as any,
}, },
onLoad(options) { onLoad(options) {
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync()
app.zdGetTheme().then((res) => { app.zdGetTheme().then((res) => {
this.setData({ this.setData({
theme: res, theme: res,
}); })
}); })
this.setData({ this.setData({
sliderTop: systemInfo.screenHeight - 160, sliderTop: systemInfo.screenHeight - 160,
options, options,
}); })
}, },
onShow() { onShow() {
app.waitLogin({ type: [0, 1] }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTHOME' }); app.zdMpBehavior({ PageName: 'PG_PATIENTHOME' })
this.setData({ this.setData({
anyWhere: app.globalData.anyWhere, anyWhere: app.globalData.anyWhere,
}); isLogin: app.globalData.isLogin,
})
if (this.data.options.es === '201501') { if (this.data.options.es === '201501') {
app.globalData.IsAliQiWei = 1; app.globalData.IsAliQiWei = 1
app.zdMpBehavior({ PageName: 'JUMP_PATIENT_HOME_INDEX' }); app.zdMpBehavior({ PageName: 'JUMP_PATIENT_HOME_INDEX' })
this.setData({ this.setData({
options: {}, options: {},
}); })
} }
app.getZdUserInfo(this, true, (zdUserInfo) => { app.getZdUserInfo(this, true, (zdUserInfo) => {
this.setData({ this.setData({
zdUserInfo, zdUserInfo,
publicCard: zdUserInfo.isShowFollowGuide == 1, publicCard: zdUserInfo.isShowFollowGuide == 1,
}); })
this.getPopup(); this.getPopup()
this.getConfig(zdUserInfo); this.getConfig(zdUserInfo)
this.getSystemConfig(); this.getSystemConfig()
if (zdUserInfo.ExclusiveDoctorId > 0) { if (zdUserInfo.ExclusiveDoctorId > 0) {
this.getUnreadCount(); this.getUnreadCount()
} }
if (zdUserInfo.UserType == 4) { if (zdUserInfo.UserType == 4) {
this.getLastRecord(); this.getLastRecord()
} }
}); })
}); })
}, },
getUnreadCount() { getUnreadCount() {
wx.ajax({ wx.ajax({
@ -99,8 +101,8 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
unreadCount: res, unreadCount: res,
}); })
}); })
}, },
getSystemConfig() { getSystemConfig() {
wx.ajax({ wx.ajax({
@ -110,8 +112,8 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
systemConfig: res, systemConfig: res,
}); })
}); })
}, },
getLastRecord() { getLastRecord() {
wx.ajax({ wx.ajax({
@ -124,13 +126,13 @@ Page({
days: dayjs().diff(res.InjectionDate, 'day'), days: dayjs().diff(res.InjectionDate, 'day'),
...res, ...res,
}, },
}); })
}); })
}, },
getConfig(zdUserInfo: any) { getConfig(zdUserInfo: any) {
let UserType = zdUserInfo.UserType; let UserType = zdUserInfo.UserType
if (UserType <= 2) { if (UserType <= 2) {
UserType = 1; UserType = 1
} }
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
@ -140,8 +142,8 @@ Page({
res = res.map((item: any) => { res = res.map((item: any) => {
if (item.code == 'spread1' || item.code == 'spread2' || item.code == 'serviceConf') { if (item.code == 'spread1' || item.code == 'spread2' || item.code == 'serviceConf') {
item.subList = item.subList.filter((subItem) => { item.subList = item.subList.filter((subItem) => {
return subItem.showStatus == 1; return subItem.showStatus == 1
}); })
} }
// if (item.name === 'BANNER-MINIDOVTOR') { // if (item.name === 'BANNER-MINIDOVTOR') {
// item.subList = item.subList // item.subList = item.subList
@ -152,29 +154,29 @@ Page({
// return subItem.linkUrl !== 'MINIDOCTOR-1.0' || zdUserInfo.EntryTwoPeriod === 1 // return subItem.linkUrl !== 'MINIDOCTOR-1.0' || zdUserInfo.EntryTwoPeriod === 1
// }) // })
// } // }
return item; return item
}); })
this.setData({ this.setData({
configList: res, configList: res,
}); })
res.forEach((item) => { res.forEach((item) => {
if (item.code == 'article') { if (item.code == 'article') {
this.getInfoList(item.configId); this.getInfoList(item.configId)
} }
if (item.code == 'story') { if (item.code == 'story') {
this.getStoryList(item.configId); this.getStoryList(item.configId)
} }
if (item.code == 'adl') { if (item.code == 'adl') {
this.getAdl(); this.getAdl()
} }
if (item.code == 'activity2') { if (item.code == 'activity2') {
this.getActivity(item.configId, item.showNum, 'liveList'); this.getActivity(item.configId, item.showNum, 'liveList')
} }
if (item.code == 'activity1') { if (item.code == 'activity1') {
this.getActivity(item.configId, item.showNum, 'liveDownList'); this.getActivity(item.configId, item.showNum, 'liveDownList')
} }
}); })
}); })
}, },
async getPopup() { async getPopup() {
const data5 = await wx.ajax({ const data5 = await wx.ajax({
@ -183,15 +185,15 @@ Page({
data: { data: {
Type: 5, Type: 5,
}, },
}); })
if (data5.showAlert) { if (data5.showAlert) {
this.setData({ this.setData({
toastShow: data5.showAlert, toastShow: data5.showAlert,
toastType: 'doubleStandards', toastType: 'doubleStandards',
toastParams: data5, toastParams: data5,
}); })
return; return
} }
const data4 = await wx.ajax({ const data4 = await wx.ajax({
@ -200,28 +202,28 @@ Page({
data: { data: {
Type: 4, Type: 4,
}, },
}); })
if (data4.showAlert) { if (data4.showAlert) {
this.setData({ this.setData({
toastShow: data4.showAlert, toastShow: data4.showAlert,
toastType: 'vipScan', toastType: 'vipScan',
toastParams: {}, toastParams: {},
}); })
return; return
} }
const data1 = await wx.ajax({ const data1 = await wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/popup/info', url: '?r=zd/popup/info',
data: { Type: 1 }, data: { Type: 1 },
}); })
if (!Array.isArray(data1)) { if (!Array.isArray(data1)) {
this.setData({ this.setData({
toastShow: true, toastShow: true,
toastType: 'healthCare', toastType: 'healthCare',
toastParams: data1, toastParams: data1,
}); })
return; return
} }
const data2 = await wx.ajax({ const data2 = await wx.ajax({
@ -230,7 +232,7 @@ Page({
data: { data: {
Type: 2, Type: 2,
}, },
}); })
if (data2.showAlert && this.data.zdUserInfo.UserType == 4) { if (data2.showAlert && this.data.zdUserInfo.UserType == 4) {
this.setData({ this.setData({
toastShow: data2.showAlert, toastShow: data2.showAlert,
@ -238,7 +240,7 @@ Page({
toastParams: { toastParams: {
id: data2.articleId, id: data2.articleId,
}, },
}); })
} }
const data3 = await wx.ajax({ const data3 = await wx.ajax({
@ -247,25 +249,25 @@ Page({
data: { data: {
Type: 6, Type: 6,
}, },
}); })
if (data3.showAlert) { if (data3.showAlert) {
this.setData({ this.setData({
toastShow: data3.showAlert, toastShow: data3.showAlert,
toastType: 'dedicatedDoctor', toastType: 'dedicatedDoctor',
toastParams: {}, toastParams: {},
}); })
} }
const data6 = await wx.ajax({ const data6 = await wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/re-visit/get-popup-show-status', url: '?r=zd/re-visit/get-popup-show-status',
}); })
if (data6.showStatus === 1) { if (data6.showStatus === 1) {
this.setData({ this.setData({
toastShow: true, toastShow: true,
toastType: 'referral-toast', toastType: 'referral-toast',
toastParams: {}, toastParams: {},
}); })
} }
}, },
setPopupInfo() { setPopupInfo() {
@ -276,14 +278,14 @@ Page({
Type: 1, Type: 1,
Id: this.data.toastParams.Id, Id: this.data.toastParams.Id,
}, },
}).then((_res) => {}); }).then((_res) => {})
}, },
setBannerClick() { setBannerClick() {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/nrdl/add-banner-click-record', url: '?r=zd/nrdl/add-banner-click-record',
data: {}, data: {},
}); })
}, },
getInfoList(configId: string) { getInfoList(configId: string) {
wx.ajax({ wx.ajax({
@ -296,8 +298,8 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
infoList: licia.chunk(res.list, 3), infoList: licia.chunk(res.list, 3),
}); })
}); })
}, },
getStoryList(configId: string) { getStoryList(configId: string) {
wx.ajax({ wx.ajax({
@ -310,8 +312,8 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
storyList: res.list, storyList: res.list,
}); })
}); })
}, },
getAdl() { getAdl() {
wx.ajax({ wx.ajax({
@ -319,7 +321,7 @@ Page({
url: '?r=zd/adl/index', url: '?r=zd/adl/index',
data: {}, data: {},
}).then((res) => { }).then((res) => {
const newRecord = res.newRecord; const newRecord = res.newRecord
this.setData({ this.setData({
adlList: res.list, adlList: res.list,
adlNum: res.count, adlNum: res.count,
@ -328,8 +330,8 @@ Page({
...newRecord, ...newRecord,
newCreateTime: dayjs(newRecord.CreateTime).format('YYYY-MM-DD'), newCreateTime: dayjs(newRecord.CreateTime).format('YYYY-MM-DD'),
}, },
}); })
}); })
}, },
getActivity(ConfigId: string, count: number, key: string) { getActivity(ConfigId: string, count: number, key: string) {
wx.ajax({ wx.ajax({
@ -339,126 +341,126 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
[key]: res.list.map((item) => { [key]: res.list.map((item) => {
item.EndTimeValue = dayjs(item.EndTime).valueOf(); item.EndTimeValue = dayjs(item.EndTime).valueOf()
item.BeginTimeValue = dayjs(item.BeginTime).valueOf(); item.BeginTimeValue = dayjs(item.BeginTime).valueOf()
item.SignUpDeadlineValue = dayjs(item.SignUpDeadline).valueOf(); item.SignUpDeadlineValue = dayjs(item.SignUpDeadline).valueOf()
item.BeginDate = dayjs(item.BeginTime).format('YYYY-MM-DD'); item.BeginDate = dayjs(item.BeginTime).format('YYYY-MM-DD')
item.EndDate = dayjs(item.EndTime).format('YYYY-MM-DD'); item.EndDate = dayjs(item.EndTime).format('YYYY-MM-DD')
item.isDay = item.BeginDate == item.EndDate; item.isDay = item.BeginDate == item.EndDate
item.BeginHm = dayjs(item.BeginTime).format('HH:mm'); item.BeginHm = dayjs(item.BeginTime).format('HH:mm')
item.EndHm = dayjs(item.EndTime).format('HH:mm'); item.EndHm = dayjs(item.EndTime).format('HH:mm')
item.BeginTime = dayjs(item.BeginTime).format('YYYY-MM-DD HH:mm'); item.BeginTime = dayjs(item.BeginTime).format('YYYY-MM-DD HH:mm')
item.EndTime = dayjs(item.EndTime).format('YYYY-MM-DD HH:mm'); item.EndTime = dayjs(item.EndTime).format('YYYY-MM-DD HH:mm')
return item; return item
}), }),
}); })
}); })
}, },
routerTo(e) { routerTo(e) {
let { url, active, code } = e.currentTarget.dataset; let { url, active, code } = e.currentTarget.dataset
if (!url) return; if (!url) return
if (code === 'adl') { if (code === 'adl') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEADLMODULE' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEADLMODULE' })
} }
if (code === 'drugs') { if (code === 'drugs') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEMEDICATIONMODULE' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEMEDICATIONMODULE' })
} }
if (code === 'story' && url === '/patient/pages/story/index') { if (code === 'story' && url === '/patient/pages/story/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORIESVIEWALL' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORIESVIEWALL' })
} }
if (code === 'story' && url.includes('/patient/pages/publishStoryDetail/index')) { if (code === 'story' && url.includes('/patient/pages/publishStoryDetail/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORYCLICK' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORYCLICK' })
} }
if (code === 'activity2' && url === '/patient/pages/live/index') { if (code === 'activity2' && url === '/patient/pages/live/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESVIEWALL' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESVIEWALL' })
} }
if (code === 'activity2' && url === '/patient/pages/live/index?index=0') { if (code === 'activity2' && url === '/patient/pages/live/index?index=0') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESMONTHLYPOSTER' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESMONTHLYPOSTER' })
} }
if (code === 'activity2' && url.includes('/patient/pages/liveDetail/index')) { if (code === 'activity2' && url.includes('/patient/pages/liveDetail/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESCARD' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESCARD' })
} }
if (code === 'activity1' && url === '/patient/pages/live/index') { if (code === 'activity1' && url === '/patient/pages/live/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESVIEWALL' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESVIEWALL' })
} }
if (code === 'activity1' && url.includes('/patient/pages/liveDetail/index')) { if (code === 'activity1' && url.includes('/patient/pages/liveDetail/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESCARD' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESCARD' })
} }
if (code === 'article' && url === '/patient/pages/repository/index') { if (code === 'article' && url === '/patient/pages/repository/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGVIEWALL' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGVIEWALL' })
} }
if (code === 'article' && url.includes('/patient/pages/repositoryDetail/index')) { if (code === 'article' && url.includes('/patient/pages/repositoryDetail/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGARTICLE' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGARTICLE' })
} }
if (code === 'serviceConf') { if (code === 'serviceConf') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESERVICE' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESERVICE' })
} }
if (url === '/patient/pages/interactivePatient/index') { if (url === '/patient/pages/interactivePatient/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEDOCTORCARD' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEDOCTORCARD' })
} }
if (url === 'NRDL') { if (url === 'NRDL') {
this.setBannerClick(); this.setBannerClick()
this.handleNRDL(); this.handleNRDL()
return; return
} }
if (url.includes('loginState')) { if (url.includes('loginState')) {
url = url + encodeURIComponent(app.globalData.loginState); url = url + encodeURIComponent(app.globalData.loginState)
app.zdPermissionVerification(2, 11, `/patient/pages/repository/index`).then(() => { app.zdPermissionVerification(2, 11, `/patient/pages/repository/index`).then(() => {
wx.navigateTo({ wx.navigateTo({
url, url,
}); })
}); })
return; return
} }
wx.navigateTo({ wx.navigateTo({
url, url,
fail() { fail() {
app.globalData.active = active; app.globalData.active = active
wx.switchTab({ wx.switchTab({
url, url,
}); })
}, },
}); })
}, },
handleReg() { handleReg() {
app.zdPermissionVerification(3, 0, ''); app.zdPermissionVerification(3, 0, '')
}, },
handleMiniDoctor(e) { handleMiniDoctor(e) {
const { link } = e.currentTarget.dataset; const { link } = e.currentTarget.dataset
let period = ''; let period = ''
if (link === 'MINIDOCTOR-1.0') { if (link === 'MINIDOCTOR-1.0') {
period = '2'; period = '2'
} }
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/webview/index?period=${period}`, url: `/patient/pages/webview/index?period=${period}`,
}); })
}, },
handleQuestion() { handleQuestion() {
app.zdPermissionVerification(2, 11, `/patient/pages/repository/index`).then(() => { app.zdPermissionVerification(2, 11, `/patient/pages/repository/index`).then(() => {
const webviewUrl = encodeURIComponent( const webviewUrl = encodeURIComponent(
`${app.globalData.url}/zdcare/#/info?loginState=${app.globalData.loginState}`, `${app.globalData.url}/zdcare/#/info?loginState=${app.globalData.loginState}`,
); )
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/webview/index?url=${webviewUrl}`, url: `/patient/pages/webview/index?url=${webviewUrl}`,
}); })
}); })
}, },
handleSlider() { handleSlider() {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/nrdl/add-slide-click-record', url: '?r=zd/nrdl/add-slide-click-record',
data: {}, data: {},
}); })
this.handleNRDL(); this.handleNRDL()
}, },
handleNRDL() { handleNRDL() {
app.zdPermissionVerification(3, 12, `/patient/pages/index/index`).then(() => { app.zdPermissionVerification(3, 12, `/patient/pages/index/index`).then(() => {
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/nrdl/index`, url: `/patient/pages/nrdl/index`,
}); })
// if (this.data.zdUserInfo.has7DayAdl === 1) { // if (this.data.zdUserInfo.has7DayAdl === 1) {
// wx.navigateTo({ // wx.navigateTo({
// url: `/patient/pages/nrdl/index`, // url: `/patient/pages/nrdl/index`,
@ -469,57 +471,57 @@ Page({
// toastType: "ndrlAldAlert", // toastType: "ndrlAldAlert",
// }); // });
// } // }
}); })
}, },
routerVipTo() { routerVipTo() {
const { MedicineAuditSwitch, UseDrugsAuditStatus, isFollow } = this.data.zdUserInfo; const { MedicineAuditSwitch, UseDrugsAuditStatus, isFollow } = this.data.zdUserInfo
if (MedicineAuditSwitch === '0') { if (MedicineAuditSwitch === '0') {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/vipLogin/index', url: '/patient/pages/vipLogin/index',
}); })
} else if (MedicineAuditSwitch === '1') { } else if (MedicineAuditSwitch === '1') {
const pendPath = { const pendPath = {
0: '/patient/pages/vipPending/index', 0: '/patient/pages/vipPending/index',
1: '/patient/pages/vipStartPending/index', 1: '/patient/pages/vipStartPending/index',
}[isFollow]; }[isFollow]
const url = { const url = {
1: pendPath, 1: pendPath,
2: '/patient/pages/vipReject/index', 2: '/patient/pages/vipReject/index',
}[UseDrugsAuditStatus]; }[UseDrugsAuditStatus]
wx.navigateTo({ wx.navigateTo({
url: url || '/patient/pages/vipCert/index', url: url || '/patient/pages/vipCert/index',
}); })
} else { } else {
wx.showToast({ wx.showToast({
icon: 'none', icon: 'none',
title: '工程师正在努力建设中,敬请期待!', title: '工程师正在努力建设中,敬请期待!',
}); })
} }
}, },
handleToastOk() { handleToastOk() {
const { toastType } = this.data; const { toastType } = this.data
if (toastType === 'vipScan') { if (toastType === 'vipScan') {
this.routerVipTo(); this.routerVipTo()
this.handleToastCancel(); this.handleToastCancel()
} else if (toastType === 'aldAlert') { } else if (toastType === 'aldAlert') {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adl/index', url: '/patient/pages/adl/index',
}); })
this.handleToastCancel(); this.handleToastCancel()
} else if (toastType === 'healthCare') { } else if (toastType === 'healthCare') {
this.setPopupInfo(); this.setPopupInfo()
this.handleNRDL(); this.handleNRDL()
this.handleToastCancel(); this.handleToastCancel()
} else if (toastType === 'ndrlAldAlert') { } else if (toastType === 'ndrlAldAlert') {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adl/index?nrdl=1', url: '/patient/pages/adl/index?nrdl=1',
}); })
this.handleToastCancel(); this.handleToastCancel()
} else if (toastType === 'doubleStandards') { } else if (toastType === 'doubleStandards') {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adl/index', url: '/patient/pages/adl/index',
}); })
this.handleToastCancel(); this.handleToastCancel()
} else if (toastType === 'dedicatedDoctor') { } else if (toastType === 'dedicatedDoctor') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -530,23 +532,23 @@ Page({
}).then((_res) => { }).then((_res) => {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/interactivePatient/index', url: '/patient/pages/interactivePatient/index',
}); })
}); })
this.handleToastCancel(null, false); this.handleToastCancel(null, false)
} else if (toastType === 'referral-toast') { } else if (toastType === 'referral-toast') {
this.setData({ this.setData({
referralFromShow: true, referralFromShow: true,
}); })
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/re-visit/update-popup-show-status', url: '?r=zd/re-visit/update-popup-show-status',
data: {}, data: {},
}); })
this.handleToastCancel(null, false); this.handleToastCancel(null, false)
} }
}, },
handleToastCancel(_e = null, sure = true) { handleToastCancel(_e = null, sure = true) {
const { toastType } = this.data; const { toastType } = this.data
if (toastType === 'doubleStandards' && sure) { if (toastType === 'doubleStandards' && sure) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -554,7 +556,7 @@ Page({
data: { data: {
Type: 5, Type: 5,
}, },
}); })
} else if (toastType === 'dedicatedDoctor' && sure) { } else if (toastType === 'dedicatedDoctor' && sure) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -562,49 +564,49 @@ Page({
data: { data: {
Type: 6, Type: 6,
}, },
}); })
} else if (toastType === 'referral-toast') { } else if (toastType === 'referral-toast') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/re-visit/update-popup-show-status', url: '?r=zd/re-visit/update-popup-show-status',
data: {}, data: {},
}); })
} }
this.setData({ this.setData({
toastShow: false, toastShow: false,
toastType: '', toastType: '',
toastParams: '', toastParams: '',
}); })
}, },
handlePublic() { handlePublic() {
this.setData({ this.setData({
toastShow: true, toastShow: true,
toastType: 'public-toast', toastType: 'public-toast',
toastParams: {}, toastParams: {},
}); })
this.handlePublicClose(); this.handlePublicClose()
}, },
handlePublicClose() { handlePublicClose() {
this.setData({ this.setData({
publicCard: false, publicCard: false,
}); })
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/account/add-user-subscribe-guide-record', url: '?r=zd/account/add-user-subscribe-guide-record',
data: {}, data: {},
}); })
}, },
handleMp(e: any) { handleMp(e: any) {
const { code } = e.currentTarget.dataset; const { code } = e.currentTarget.dataset
const PageName = { const PageName = {
spread1: 'BTN_PATIENTHOMEBANNER1', spread1: 'BTN_PATIENTHOMEBANNER1',
spread2: 'BTN_PATIENTHOMEBANNER2', spread2: 'BTN_PATIENTHOMEBANNER2',
}[code]; }[code]
app.zdMpBehavior({ PageName }); app.zdMpBehavior({ PageName })
}, },
handleRegClose() { handleRegClose() {
this.setData({ this.setData({
regGuide: false, regGuide: false,
}); })
}, },
}); })

447
src/patient/pages/index/index.wxml

@ -1,39 +1,17 @@
<view class="page"> <view
<image wx:if="{{theme === 'DRUG'}}" class="drug-bg" src="{{imageUrl}}za-images/1/my-bg.png?t={{Timestamp}}"></image> class="page"
<image wx:else class="bg" mode="widthFix" src="{{imageUrl}}za-images/1/index-bg.png?t={{Timestamp}}"></image> style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
>
<view class="page-container"> <view class="page-container">
<pageNavbar drug="{{theme === 'DRUG'}}"></pageNavbar> <pageNavbar></pageNavbar>
<view class="user" wx:if="{{zdUserInfo.UserType!=1}}"> <!-- style="background: url({{imageUrl}}za-images/2/doctor-home{{theme === 'DRUG' ? '-drug':''}}-bg.png?t={{Timestamp}}) no-repeat 16rpx 9rpx/606rpx 173rpx,{{theme === 'DRUG'? 'linear-gradient( 360deg, #25D9C8 0%, #25D9C8 73%, #B5EFEA 100%)':'linear-gradient( 360deg, #CF5375 0%, #CF5375 74%, #EE9FB9 100%) no-repeat top center/100% 100%'}}" -->
<image
class="avatar"
src="{{zdUserInfo.UserImg}}"
bind:tap="routerTo"
data-url="/patient/pages/getUserInfo/index"
></image>
<view class="content">
<view class="name">{{today}}</view>
<view class="info" wx:if="{{zdUserInfo.UserType>=3}}">
今天是重症肌无力加油站陪伴你的第
<text class="num">{{zdUserInfo.JoinDays}}</text>
</view>
</view>
</view>
<view <view
wx:if="{{zdUserInfo.UserType>=3}}" class="doctor"
class="referral"
bind:tap="routerTo"
data-url="/patient/pages/referral/index"
>
<image class="referral-img" src="{{imageUrl}}za-images/5/referral-card.png?t={{Timestamp}}"></image>
</view>
<view
class="doctor {{theme === 'DRUG' && 'doctor-drugs'}}"
wx:if="{{zdUserInfo.ExclusiveDoctorId}}" wx:if="{{zdUserInfo.ExclusiveDoctorId}}"
style="background: url({{imageUrl}}za-images/2/doctor-home{{theme === 'DRUG' ? '-drug':''}}-bg.png?t={{Timestamp}}) no-repeat 16rpx 9rpx/606rpx 173rpx,{{theme === 'DRUG'? 'linear-gradient( 360deg, #25D9C8 0%, #25D9C8 73%, #B5EFEA 100%)':'linear-gradient( 360deg, #CF5375 0%, #CF5375 74%, #EE9FB9 100%) no-repeat top center/100% 100%'}}"
bind:tap="routerTo" bind:tap="routerTo"
data-url="/patient/pages/interactivePatient/index" data-url="/patient/pages/interactivePatient/index"
> >
<view class="title">我的专属医生</view>
<view class="container"> <view class="container">
<view class="avatar"> <view class="avatar">
<image class="a-img" mode="aspectFill" src="{{zdUserInfo.ExclusiveDoctorImg}}" alt=""></image> <image class="a-img" mode="aspectFill" src="{{zdUserInfo.ExclusiveDoctorImg}}" alt=""></image>
@ -42,7 +20,7 @@
<view class="name-wrap"> <view class="name-wrap">
<view class="name"> <view class="name">
<view class="n-content">{{zdUserInfo.ExclusiveDoctorName}}</view> <view class="n-content">{{zdUserInfo.ExclusiveDoctorName}}</view>
<image wx:if="{{unreadCount}}" class="icon" src="{{imageUrl}}za-images/icon5.png?t={{Timestamp}}"></image> <image wx:if="{{unreadCount}}" class="icon" src="{{imageUrl}}/icon31.png?t={{Timestamp}}"></image>
</view> </view>
</view> </view>
<view class="content" wx:if="{{unreadCount}}">医生给您留言了,记得查看!</view> <view class="content" wx:if="{{unreadCount}}">医生给您留言了,记得查看!</view>
@ -56,10 +34,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="btn"> <view class="btn">{{unreadCount ? '去看看':'去咨询'}}</view>
{{unreadCount ? '去看看':'去咨询'}}
<van-icon name="arrow" />
</view>
</view> </view>
</view> </view>
<block wx:for="{{configList}}" wx:key="index" wx:for-item="card" wx:for-index="cIndex"> <block wx:for="{{configList}}" wx:key="index" wx:for-item="card" wx:for-index="cIndex">
@ -98,233 +73,45 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<view class="adl {{theme === 'DRUG' && 'adl-drugs'}}" wx:if="{{card.code == 'adl' && card.showStatus == 1}}"> <view class="live-up-new" wx:if="{{card.code == 'activity2' && card.showStatus == 1 }}">
<image
class="adl-bg"
src="{{imageUrl}}za-images/double-standard/{{theme === 'DRUG'?'home-adl-drug-bg':'home-adl-bg'}}.png?t={{Timestamp}}"
></image>
<view class="adl-container">
<view
class="other"
catch:tap="routerTo"
data-url="/gift/pages/myHealthRecord/index"
data-code="{{card.code}}"
>
<image
class="adl-title"
src="{{imageUrl}}za-images/double-standard/home-adl-title{{theme === 'DRUG'?'-drug':''}}.png?t={{Timestamp}}"
></image>
<!-- <view class="title">自在生活<text class="blod">“双达标”</text></view> -->
<!-- <view class="num">控制症状 减少副作用</view> -->
<view
class="status"
wx:if="{{adlNewRecord.TotalScore}}"
catch:tap="routerTo"
data-url="/patient/pages/adl/index"
data-code="{{card.code}}"
>
最近一次测评 {{adlNewRecord.newCreateTime}}
</view>
<view
class="btn"
wx:else
catch:tap="routerTo"
data-url="/patient/pages/adl/index"
data-code="{{card.code}}"
>
立即自测
<image
wx:if="{{theme === 'DRUG'}}"
class="icon"
src="{{imageUrl}}za-images/1.5/btn-drug.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/1/arrow-right.png?t={{Timestamp}}"></image>
</view>
<view class="o-aside">
<image
class="badge"
src="{{imageUrl}}za-images/double-standard/{{theme === 'DRUG'?'home-adl-drug-badge':'home-adl-badge'}}.png?t={{Timestamp}}"
></image>
</view>
</view>
</view>
</view>
<view class="drug-record" wx:if="{{card.code == 'drugs' && card.showStatus == 1}}">
<block wx:if="{{detail.Id}}">
<view class="d-header">
<view class="status">
<view class="icons">
<image class="icon" src="{{imageUrl}}za-images/1.5/drug-icon.png?t={{Timestamp}}"></image>
</view>
<view class="name">连续治疗 {{detail.Times}} 次</view>
</view>
<view
class="more"
catch:tap="routerTo"
data-url="/patient/pages/myHealthRecord/index"
data-code="{{card.code}}"
>
查看健康档案
<van-icon name="arrow" />
</view>
</view>
<view class="d-line"></view>
<view class="date">
<view class="d-name">上次治疗日期</view>
<view class="d-str">
{{detail.InjectionDate}}
<view class="week">{{detail.weekName}}</view>
</view>
</view>
<view class="d-card">
<view class="dc-header">距离上次用药</view>
<view class="dc-content">
<view class="c-l today" wx:if="{{detail.days == 0}}">
<view class="box">今天治疗</view>
</view>
<view class="c-l" wx:else>
<view class="box">{{detail.days}}</view>
<view class="sub">天</view>
</view>
<view
class="more"
catch:tap="routerTo"
data-url="/patient/pages/drugRecord/index"
data-code="{{card.code}}"
>
更新记录
<van-icon name="arrow" />
</view>
</view>
</view>
</block>
<view class="d-noraml" wx:else>
<view class="n-left">
<view class="title">
<view>展示您的注射信息</view>
<view>开启您的专属服务</view>
</view>
<view class="btn" catch:tap="routerTo" data-url="/patient/pages/drugRecord/index" data-code="{{card.code}}">
开始记录
<image class="icon" src="{{imageUrl}}za-images/1.5/btn-drug.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="n-right">
<view class="item">
<view class="icon">
<image src="{{imageUrl}}za-images/1.5/d1.png?t={{Timestamp}}"></image>
</view>
<view class="name">ADL提醒</view>
</view>
<view class="item">
<view class="icon">
<image src="{{imageUrl}}za-images/1.5/d2.png?t={{Timestamp}}"></image>
</view>
<view class="name">随访服务</view>
</view>
<view class="item">
<view class="icon">
<image src="{{imageUrl}}za-images/1.5/d3.png?t={{Timestamp}}"></image>
</view>
<view class="name">健康报告</view>
</view>
</view>
</view>
</view>
<view class="live" wx:if="{{card.code == 'activity1' && card.showStatus == 1 && liveDownList.length}}">
<view class="header" wx:if="{{card.name}}"> <view class="header" wx:if="{{card.name}}">
<view class="title">{{card.name}}</view> <view class="title">{{card.name}}</view>
<view <!-- <view bind:tap="routerTo" class="more" data-url="/patient/pages/repository/index" data-code="{{card.code}}"> -->
class="more" <!-- 查看全部 -->
bind:tap="routerTo" <!-- <van-icon name="arrow" /> -->
data-url="/patient/pages/live/index" <!-- </view> -->
data-active="1"
data-code="{{card.code}}"
>
查看全部
<van-icon name="arrow" />
</view>
</view> </view>
<view class="live-container"> <view
<view class="scroll"> class="l-banner"
<view bind:tap="routerTo"
class="live-item" data-url="/patient/pages/live/index?index=0"
wx:for="{{liveDownList}}" data-code="{{card.code}}"
wx:key="index" >
bind:tap="routerTo" <image class="live-img" mode="aspectFill" src="{{imageUrl}}za-images/live-banner.png?t={{Timestamp}}"></image>
data-url="/patient/pages/liveDetail/index?id={{item.Id}}"
data-code="{{card.code}}"
>
<image class="live-img" mode="aspectFill" src="{{item.IntroductionUrl}}"></image>
</view>
</view>
</view> </view>
</view> <view class="list">
<!-- 隐藏老的直播模块 -->
<view class="live-up" wx:if="{{card.code == 'activity2' && card.showStatus == 1 && false }}">
<view class="header" wx:if="{{card.name}}">
<view class="title">{{card.name}}</view>
<view <view
class="more" class="item"
wx:for="{{liveList}}"
wx:key="index"
bind:tap="routerTo" bind:tap="routerTo"
data-url="/patient/pages/live/index" data-url="/patient/pages/liveDetail/index?id={{item.Id}}"
data-active="0"
data-code="{{card.code}}" data-code="{{card.code}}"
> >
查看全部 <view class="photo-wrap">
<van-icon name="arrow" /> <image class="photo" src="{{item.PosterUrl}}"></image>
</view> </view>
</view> <view class="content">
<view class="live-container {{theme === 'DRUG' && 'live-container-drugs'}}"> <view class="name">{{item.Name}}</view>
<view class="scroll"> <view class="labels" wx:if="{{item.doctorName}}">
<view {{item.doctorName}}
class="live-item" <text class="line" wx:if="{{item.hospitalName}}"></text>
bind:tap="routerTo" {{item.hospitalName}}
data-url="/patient/pages/live/index?index=0"
data-code="{{card.code}}"
>
<image class="live-img" mode="aspectFill" src="{{imageUrl}}za-images/1/3.png?t={{Timestamp}}"></image>
</view>
<view
class="item"
wx:for="{{liveList}}"
wx:key="index"
bind:tap="routerTo"
data-url="/patient/pages/liveDetail/index?id={{item.Id}}"
data-code="{{card.code}}"
>
<view class="photo-wrap">
<image class="photo" src="{{item.IntroductionUrl}}"></image>
<view class="status {{item.Status != 2 && 'bad'}}">
<view class="dot"></view>
{{liveStatus[item.Status]}}
</view>
<!-- <view class="date"> -->
<!-- <view class="d-title"> -->
<!-- <van-icon class="icon" name="play" /> -->
<!-- 会议时间 -->
<!-- </view> -->
<!-- <block wx:if="{{item.isDay}}"> -->
<!-- <view class="ymd">{{item.BeginDate}}</view> -->
<!-- <view class="hm">{{item.BeginHm}}-{{item.EndHm}}</view> -->
<!-- </block> -->
<!-- <block wx:else> -->
<!-- <view class="ymd">{{item.BeginTime}}</view> -->
<!-- <view class="hm">{{item.EndTime}}</view> -->
<!-- </block> -->
<!-- </view> -->
</view> </view>
<view class="content"> <view class="c-footer">
<view class="name">{{item.MasterName}}</view> <view class="date">{{item.BeginTime}}</view>
<view class="labels">
<!-- <view class="label" wx:for="{{item.Labels}}" wx:for-item="label" wx:key="index">{{label}}</view> -->
<view class="label">{{item.MasterTitle}}</view>
</view>
<view class="btn"> <view class="btn">
<image <image class="icon" src="/images/icon30.png"></image>
class="icon"
src="{{imageUrl}}za-images/{{theme === 'DRUG'?1.5:1}}/live-play.png?t={{Timestamp}}"
></image>
{{item.Status==2?'参会':'查看'}} {{item.Status==2?'参会':'查看'}}
</view> </view>
</view> </view>
@ -332,115 +119,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="live-up-new" wx:if="{{card.code == 'activity2' && card.showStatus == 1 }}">
<view
class="l-banner"
bind:tap="routerTo"
data-url="/patient/pages/live/index?index=0"
data-code="{{card.code}}"
>
<image class="live-img" mode="aspectFill" src="{{imageUrl}}za-images/live-banner.png?t={{Timestamp}}"></image>
</view>
<view
class="item"
wx:for="{{liveList}}"
wx:key="index"
bind:tap="routerTo"
data-url="/patient/pages/liveDetail/index?id={{item.Id}}"
data-code="{{card.code}}"
>
<view class="photo-wrap">
<image class="photo" src="{{item.PosterUrl}}"></image>
<view class="status {{item.Status == 2 && 'active'}}">
<image
wx:if="{{item.Status==2}}"
class="icon"
src="{{imageUrl}}za-images/icon2.png?t={{Timestamp}}"
></image>
{{liveStatus[item.Status]}}
</view>
<!-- <view class="date"> -->
<!-- <view class="d-title"> -->
<!-- <van-icon class="icon" name="play" /> -->
<!-- 会议时间 -->
<!-- </view> -->
<!-- <block wx:if="{{item.isDay}}"> -->
<!-- <view class="ymd">{{item.BeginDate}}</view> -->
<!-- <view class="hm">{{item.BeginHm}}-{{item.EndHm}}</view> -->
<!-- </block> -->
<!-- <block wx:else> -->
<!-- <view class="ymd">{{item.BeginTime}}</view> -->
<!-- <view class="hm">{{item.EndTime}}</view> -->
<!-- </block> -->
<!-- </view> -->
</view>
<view class="content">
<view class="name">{{item.Name}}</view>
<view class="labels" wx:if="{{item.doctorName}}">
{{item.doctorName}}{{item.hospitalName ? ' | ' + item.hospitalName : ''}}
</view>
<view class="c-footer">
<view class="date">{{item.BeginTime}}</view>
<view class="btn">
<image class="icon" src="{{imageUrl}}za-images/icon1.png?t={{Timestamp}}"></image>
{{item.Status==2?'参会':'查看'}}
</view>
</view>
</view>
</view>
</view>
<view class="story" wx:if="{{card.code == 'story' && card.showStatus == 1}}">
<view class="header" wx:if="{{card.name}}">
<view class="title">{{card.name}}</view>
<view class="more" bind:tap="routerTo" data-url="/patient/pages/story/index" data-code="{{card.code}}">
查看全部
<van-icon name="arrow" />
</view>
</view>
<view class="story-container {{theme === 'DRUG' && 'story-container-drugs'}}">
<view class="scroll">
<view
class="story-item"
wx:for="{{storyList}}"
bind:tap="routerTo"
data-url="/patient/pages/publishStoryDetail/index?id={{item.Id}}"
data-code="{{card.code}}"
>
<image class="story-img" mode="aspectFill" src="{{item.ListPicLink}}"></image>
<view class="story-content">{{item.Title}}</view>
</view>
</view>
</view>
</view>
<view class="server" wx:if="{{card.code == 'serviceConf' && card.showStatus == 1}}">
<view class="header" wx:if="{{card.name}}">
<view class="title">{{card.name}}</view>
</view>
<view class="server-container">
<view class="two" wx:if="{{card.showType==1}}">
<block wx:for="{{card.subList}}" wx:key="index">
<!-- <view class="item" bind:tap="handleMiniDoctor" wx:if="{{item.showStatus==1 && index == 0}}"> -->
<!-- <image class="item-bg" src="{{item.img}}"></image> -->
<!-- </view> -->
<view class="item" bind:tap="routerTo" data-url="{{item.linkUrl}}" data-code="{{card.code}}">
<image class="item-bg" src="{{item.img}}"></image>
</view>
</block>
</view>
<view class="four" wx:if="{{card.showType==2}}">
<block wx:for="{{card.subList}}" wx:key="index">
<!-- <view class="item" bind:tap="handleMiniDoctor" wx:if="{{item.showStatus==1 && index==0}}"> -->
<!-- <image class="icon" src="{{item.img}}"></image> -->
<!-- <view class="name">{{item.title}}</view> -->
<!-- </view> -->
<view class="item" bind:tap="routerTo" data-url="{{item.linkUrl}}" data-code="{{card.code}}">
<image class="icon" src="{{item.img}}"></image>
<view class="name">{{item.title}}</view>
</view>
</block>
</view>
</view>
</view>
<view class="book" wx:if="{{card.code == 'article' && card.showStatus == 1 && infoList.length}}"> <view class="book" wx:if="{{card.code == 'article' && card.showStatus == 1 && infoList.length}}">
<view class="header" wx:if="{{card.name}}"> <view class="header" wx:if="{{card.name}}">
<view class="title">{{card.name}}</view> <view class="title">{{card.name}}</view>
@ -449,7 +127,6 @@
<van-icon name="arrow" /> <van-icon name="arrow" />
</view> </view>
</view> </view>
<!-- style="height:{{infoList[0].length * 240}}rpx" -->
<swiper <swiper
class="swiper" class="swiper"
indicator-active-color="rgba(39, 58, 101, 0.5)" indicator-active-color="rgba(39, 58, 101, 0.5)"
@ -468,7 +145,7 @@
> >
<view class="cover"> <view class="cover">
<image class="photo" mode="aspectFill" src="{{item.TitlePicLink}}"></image> <image class="photo" mode="aspectFill" src="{{item.TitlePicLink}}"></image>
<view class="label">{{item.CateName}}</view> <!-- <view class="label">{{item.CateName}}</view> -->
</view> </view>
<view class="content"> <view class="content">
<view class="title">{{item.Title}}</view> <view class="title">{{item.Title}}</view>
@ -481,13 +158,8 @@
</block> </block>
</view> </view>
<view <view class="reg" wx:if="{{regGuide && isLogin === 0}}" bind:tap="handleReg">
class="reg" 注册后享受全面TED患者服务
wx:if="{{regGuide && (zdUserInfo.UserType==1 || (zdUserInfo.UserType==2 && zdUserInfo.AuditStatus==0))}}"
bind:tap="handleReg"
>
<text class="blod">注册</text>
后享受全面重症肌无力患者服务
<van-icon name="arrow" /> <van-icon name="arrow" />
<image <image
catch:tap="handleRegClose" catch:tap="handleRegClose"
@ -495,28 +167,15 @@
src="{{imageUrl}}za-images/5/reg-close.png?t={{Timestamp}}" src="{{imageUrl}}za-images/5/reg-close.png?t={{Timestamp}}"
></image> ></image>
</view> </view>
<view <!-- <view wx:elif="{{!anyWhere && publicCard}}" class="public" bind:tap="handlePublic"> -->
class="reg-audit" <!-- <image class="logo" src="{{imageUrl}}za-images/5/logo1.png?t={{Timestamp}}"></image> -->
wx:elif="{{regGuide && zdUserInfo.UserType==2 && (zdUserInfo.AuditStatus==1 || zdUserInfo.AuditStatus==2 )}}" <!-- <view class="wrap"> -->
bind:tap="handleReg" <!-- <view class="title">关注公众号</view> -->
> <!-- <view class="content">重要提醒不丢失~</view> -->
您的认证正在审核中,审核通过后获取全部服务 <!-- </view> -->
<van-icon name="arrow" /> <!-- <view class="btn">去关注</view> -->
<image <!-- <image catch:tap="handlePublicClose" class="close" src="{{imageUrl}}za-images/5/close1.png?t={{Timestamp}}"></image> -->
catch:tap="handleRegClose" <!-- </view> -->
class="reg-close"
src="{{imageUrl}}za-images/5/reg-close.png?t={{Timestamp}}"
></image>
</view>
<view wx:elif="{{!anyWhere && publicCard}}" class="public" bind:tap="handlePublic">
<image class="logo" src="{{imageUrl}}za-images/5/logo1.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="title">关注公众号</view>
<view class="content">重要提醒不丢失~</view>
</view>
<view class="btn">去关注</view>
<image catch:tap="handlePublicClose" class="close" src="{{imageUrl}}za-images/5/close1.png?t={{Timestamp}}"></image>
</view>
</view> </view>
<movable-area class="slidearea"> <movable-area class="slidearea">
@ -543,10 +202,6 @@
</movable-view> </movable-view>
</movable-area> </movable-area>
<!-- <view class="question" bind:tap="handleQuestion"> -->
<!-- <image class="question-img" src="{{imageUrl}}za-images/1.5/hoem-question.png?t={{Timestamp}}"></image> -->
<!-- </view> -->
<toast <toast
bind:cancel="handleToastCancel" bind:cancel="handleToastCancel"
bind:ok="handleToastOk" bind:ok="handleToastOk"

5
src/patient/pages/interactivePatient/index.json

@ -1,9 +1,10 @@
{ {
"navigationBarTitleText": "互动", "navigationBarTitleText": "互动",
"navigationStyle": "default", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"van-loading": "@vant/weapp/loading/index", "van-loading": "@vant/weapp/loading/index",
"referralFrom": "/components/referralFrom/index" "referralFrom": "/components/referralFrom/index",
"navbar": "/components/navbar/index"
} }
} }

71
src/patient/pages/interactivePatient/index.scss

@ -7,31 +7,33 @@ page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
box-sizing: border-box;
.page-header { .page-header {
flex-shrink: 0; flex-shrink: 0;
margin: 0 30rpx;
padding: 30rpx; padding: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-radius: 0 0 24rpx 24rpx; border-radius: 24rpx;
background-color: #fff; background-color: #fff;
.avatar { .avatar {
width: 104rpx; width: 96rpx;
height: 104rpx; height: 96rpx;
border-radius: 50%; border-radius: 50%;
} }
.wrap { .wrap {
flex: 1; flex: 1;
padding: 0 20rpx; padding: 0 20rpx;
.name { .name {
font-size: 40rpx; font-size: 36rpx;
color: rgba(40, 48, 49, 1); color: rgba(33, 29, 46, 1);
font-weight: bold; font-weight: bold;
} }
.content { .content {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 28rpx; font-size: 28rpx;
color: rgba(154, 161, 162, 1); color: rgba(173, 172, 178, 1);
display: flex; display: flex;
gap: 8rpx; gap: 8rpx;
align-items: start; align-items: start;
@ -41,17 +43,18 @@ page {
flex-shrink: 0; flex-shrink: 0;
height: 28rpx; height: 28rpx;
font-size: 22rpx; font-size: 22rpx;
color: rgba(229, 154, 41, 1); color: #fff;
line-height: 1; line-height: 1;
text-align: center; text-align: center;
line-height: 28rpx; line-height: 28rpx;
background: rgba(229, 154, 41, 0.29); background: linear-gradient(90deg, #ffd650 0%, #f8a61a 100%);
border-radius: 8rpx 8rpx 8rpx 8rpx; border-radius: 4rpx;
} }
} }
} }
.more { .more {
color: #d4d9da; color: rgba(173, 172, 178, 1);
font-size: 20rpx;
} }
} }
.page-container { .page-container {
@ -86,8 +89,8 @@ page {
.guide { .guide {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 32rpx 30rpx; padding: 32rpx 30rpx;
border-radius: 0 32rpx 32rpx; border-radius: 32rpx 32rpx;
background: linear-gradient(13deg, #ffffff 8%, #e8f0f1 100%); background: linear-gradient(180deg, #f6efff 0%, #ffffff 100%);
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
.title { .title {
font-size: 32rpx; font-size: 32rpx;
@ -102,10 +105,10 @@ page {
.list { .list {
.l-item { .l-item {
display: flex; display: flex;
align-items: center;
gap: 16rpx; gap: 16rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.order { .order {
margin-top: 6rpx;
flex-shrink: 0; flex-shrink: 0;
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
@ -115,11 +118,11 @@ page {
justify-content: center; justify-content: center;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
border-radius: 6rpx; border-radius: 6rpx;
background: #67baca; background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
} }
.content { .content {
font-size: 32rpx; font-size: 32rpx;
color: rgba(40, 48, 49, 1); color: rgba(33, 29, 46, 1);
} }
} }
} }
@ -356,7 +359,6 @@ page {
.list { .list {
.l-item { .l-item {
display: flex; display: flex;
align-items: center;
gap: 16rpx; gap: 16rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.order { .order {
@ -391,8 +393,8 @@ page {
.message { .message {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 26rpx 32rpx; padding: 26rpx 32rpx;
background: #67baca; background: rgba(185, 130, 255, 1);
border-radius: 32rpx 0 32rpx 32rpx; border-radius: 32rpx;
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: #fff;
white-space: pre-line; white-space: pre-line;
@ -499,9 +501,9 @@ page {
flex-shrink: 0; flex-shrink: 0;
padding: 13rpx 22rpx; padding: 13rpx 22rpx;
font-size: 32rpx; font-size: 32rpx;
color: rgba(40, 48, 49, 1); color: rgba(33, 29, 46, 1);
border-radius: 129rpx; border-radius: 8rpx;
background-color: rgba(242, 244, 245, 1); background-color: rgba(246, 248, 249, 1);
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8rpx; gap: 8rpx;
@ -517,7 +519,7 @@ page {
} }
&.active { &.active {
color: #fff; color: #fff;
background-color: rgba(103, 186, 202, 1); background-color: rgba(185, 130, 255, 1);
.icon { .icon {
display: none; display: none;
} }
@ -531,29 +533,40 @@ page {
max-height: 35vh; max-height: 35vh;
overflow-y: auto; overflow-y: auto;
.l-item { .l-item {
padding: 20rpx 0; padding: 32rpx 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
border-bottom: 1px solid rgba(39, 58, 101, 0.1);
&:last-of-type {
border: none;
}
.order { .order {
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
font-size: 24rpx; font-size: 40rpx;
font-weight: bold;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: rgba(255, 255, 255, 1); color: rgba(185, 130, 255, 1);
border-radius: 6rpx; border-radius: 6rpx;
background: #67baca;
} }
.content { .content {
padding: 0 16rpx; padding: 0 16rpx;
flex: 1; flex: 1;
font-size: 32rpx; font-size: 32rpx;
color: rgba(40, 48, 49, 1); color: rgba(33, 29, 46, 1);
} }
.icon { .icon-wrap {
color: rgba(40, 48, 49, 1); padding: 8rpx 20rpx;
background: #f6f8f9;
border-radius: 20rpx 20rpx 20rpx 20rpx;
.icon {
display: block;
width: 24rpx;
height: 24rpx;
}
} }
} }
} }

11
src/patient/pages/interactivePatient/index.ts

@ -53,7 +53,7 @@ Page({
this.innerAudioContext = wx.createInnerAudioContext({ this.innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement: true, useWebAudioImplement: true,
}) })
app.zdWaitLogin({}).then(() => { app.waitLogin({ type: [1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTINTERACTIONDETAILS' }) app.zdMpBehavior({ PageName: 'PG_PATIENTINTERACTIONDETAILS' })
this.getDoctorDetail() this.getDoctorDetail()
this.getQuestionList() this.getQuestionList()
@ -362,4 +362,13 @@ Page({
], ],
}) })
}, },
handleBack() {
wx.navigateBack({
fail() {
wx.reLaunch({
url: '/patient/pages/index/index',
})
},
})
},
}) })

37
src/patient/pages/interactivePatient/index.wxml

@ -1,6 +1,13 @@
<page-meta page-style="{{ referralFromShow ? 'overflow: hidden;' : '' }}" /> <page-meta page-style="{{ referralFromShow ? 'overflow: hidden;' : '' }}" />
<view class="page"> <navbar fixed title="互动" custom-style="background:{{background}}">
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<view
class="page"
style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
>
<view class="page-header" bind:tap="handleDoctorDetail"> <view class="page-header" bind:tap="handleDoctorDetail">
<image class="avatar" mode="aspectFill" src="{{doctorDetail.doctorAvatar}}"></image> <image class="avatar" mode="aspectFill" src="{{doctorDetail.doctorAvatar}}"></image>
<view class="wrap"> <view class="wrap">
@ -45,10 +52,6 @@
<view class="content">{{item.question}}</view> <view class="content">{{item.question}}</view>
</view> </view>
</view> </view>
<view class="tip">
{{message.welcomeMsg.guideClick}}
<image class="icon" src="{{imageUrl}}za-images//doctor/icon-down1.png?t={{Timestamp}}"></image>
</view>
</view> </view>
<view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view> <view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
<view class="week" wx:elif="{{message.msgContentType==='2'}}"> <view class="week" wx:elif="{{message.msgContentType==='2'}}">
@ -119,17 +122,23 @@
<view class="patient" wx:if="{{message.msgFromType==='1'}}"> <view class="patient" wx:if="{{message.msgFromType==='1'}}">
<view class="p-container"> <view class="p-container">
<view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view> <view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
<view class="referral-replay" wx:if="{{message.msgContentType==='9'}}"> <view class="referral-replay" wx:if="{{message.msgContentType==='9'}}">
<view class="title">我最近一次复诊时间是{{message.ReVisitInfo.visitDateName}}</view> <view class="title">我最近一次复诊时间是{{message.ReVisitInfo.visitDateName}}</view>
<view class="sub-title">我的方案是</view> <view class="sub-title">我的方案是</view>
<view class="r-list"> <view class="r-list">
<view class="item" wx:if="{{message.ReVisitInfo.hormone==1}}">1.激素</view> <view class="item" wx:if="{{message.ReVisitInfo.hormone==1}}">1.激素</view>
<view class="item" wx:if="{{message.ReVisitInfo.traditionalInhibitor==1}}">2.传统免疫抑制剂(如他克莫司、吗 替麦考酚酯等)</view> <view class="item" wx:if="{{message.ReVisitInfo.traditionalInhibitor==1}}">
2.传统免疫抑制剂(如他克莫司、吗 替麦考酚酯等)
</view>
<view class="item" wx:if="{{message.ReVisitInfo.gammaGlobulin==1}}">3.静脉输注丙种球蛋白</view> <view class="item" wx:if="{{message.ReVisitInfo.gammaGlobulin==1}}">3.静脉输注丙种球蛋白</view>
<view class="item" wx:if="{{message.ReVisitInfo.plasmaExchange==1}}">4.血浆置换</view> <view class="item" wx:if="{{message.ReVisitInfo.plasmaExchange==1}}">4.血浆置换</view>
<view class="item" wx:if="{{message.ReVisitInfo.bCellInhibitor==1}}">5.B细胞抑制剂(如:利妥昔单抗、泰 它西普、伊奈利珠单抗)</view> <view class="item" wx:if="{{message.ReVisitInfo.bCellInhibitor==1}}">
5.B细胞抑制剂(如:利妥昔单抗、泰 它西普、伊奈利珠单抗)
</view>
<view class="item" wx:if="{{message.ReVisitInfo.fcRnAntagonists==1}}">6.FcRn拮抗剂(如:艾加莫德)</view> <view class="item" wx:if="{{message.ReVisitInfo.fcRnAntagonists==1}}">6.FcRn拮抗剂(如:艾加莫德)</view>
<view class="item" wx:if="{{message.ReVisitInfo.c5ComplementInhibitor==1}}">7.C5补体抑制剂(如:依库珠单抗)</view> <view class="item" wx:if="{{message.ReVisitInfo.c5ComplementInhibitor==1}}">
7.C5补体抑制剂(如:依库珠单抗)
</view>
<view class="item" wx:if="{{message.ReVisitInfo.chineseMedicine==1}}">8.中药或中成药</view> <view class="item" wx:if="{{message.ReVisitInfo.chineseMedicine==1}}">8.中药或中成药</view>
<view class="item" wx:if="{{message.ReVisitInfo.other==1}}">9.其他</view> <view class="item" wx:if="{{message.ReVisitInfo.other==1}}">9.其他</view>
</view> </view>
@ -161,11 +170,6 @@
catch:tap="handleQuestionTab" catch:tap="handleQuestionTab"
data-index="{{index}}" data-index="{{index}}"
> >
<image class="icon" src="{{imageUrl}}za-images//doctor/d_interactivePatient-tab{{index%4+1}}.png?t={{Timestamp}}"></image>
<image
class="icon-active"
src="{{imageUrl}}za-images//doctor/d_interactivePatient-tab-active{{index%4+1}}.png?t={{Timestamp}}"
></image>
{{item.typeName}} {{item.typeName}}
</view> </view>
</view> </view>
@ -179,11 +183,12 @@
> >
<view class="order">{{index+1}}</view> <view class="order">{{index+1}}</view>
<view class="content">{{item.question}}</view> <view class="content">{{item.question}}</view>
<van-icon color="#ADB3B4" name="arrow" /> <view class="icon-wrap">
<image class="icon" src="/images/icon38.png"></image>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<referralFrom model:show="{{referralFromShow}}" bind:refresh="handleReferralReplay"></referralFrom> <referralFrom model:show="{{referralFromShow}}" bind:refresh="handleReferralReplay"></referralFrom>

3
src/patient/pages/live/index.json

@ -1,11 +1,12 @@
{ {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "default", "navigationStyle": "custom",
"navigationBarBackgroundColor": "#fafafa", "navigationBarBackgroundColor": "#fafafa",
"usingComponents": { "usingComponents": {
"van-tab": "@vant/weapp/tab/index", "van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index", "van-tabs": "@vant/weapp/tabs/index",
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"navbar": "/components/navbar/index",
"patient-tab-bar": "/components/patient-tab-bar/index" "patient-tab-bar": "/components/patient-tab-bar/index"
} }
} }

179
src/patient/pages/live/index.scss

@ -1,23 +1,14 @@
page {
background-color: rgba(246, 248, 249, 1);
}
.page { .page {
padding-bottom: 120rpx; padding-bottom: 120rpx;
background-color: #fafafa;
position: relative; position: relative;
.tab {
font-size: 32rpx;
color: #9e9e9e;
background-color: #fafafa;
&.tab-active {
font-size: 36rpx;
color: #484848;
}
}
.search { .search {
margin: 32rpx 30rpx 0; margin: 32rpx 30rpx 0;
padding: 18rpx 32rpx; padding: 12rpx 32rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 38rpx; border-radius: 38rpx;
border: 2rpx solid #ebecee;
display: flex; display: flex;
align-items: center; align-items: center;
.icon { .icon {
@ -30,20 +21,14 @@
font-size: 28rpx; font-size: 28rpx;
} }
.placeholder-input { .placeholder-input {
color: #a8a8a8; color: rgba(173, 172, 178, 1);
} }
.clear { .clear {
color: #ccc; color: #ccc;
} }
} }
.sticky { .sticky {
position: sticky;
top: 0rpx;
left: 0;
z-index: 20;
padding-bottom: 10rpx; padding-bottom: 10rpx;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
background-color: #fafafa;
.tags { .tags {
margin-top: 20rpx; margin-top: 20rpx;
padding-top: 28rpx; padding-top: 28rpx;
@ -62,15 +47,15 @@
margin-right: 16rpx; margin-right: 16rpx;
flex-shrink: 0; flex-shrink: 0;
font-size: 28rpx; font-size: 28rpx;
color: #484848; color: rgba(33, 29, 46, 1);
background-color: #f2f2f2; background-color: rgba(255, 255, 255, 1);
border-radius: 24rpx; border-radius: 8rpx;
padding: 10rpx 24rpx; padding: 8rpx 24rpx;
line-height: 1; line-height: 1.2;
&.active { &.active {
position: relative; position: relative;
color: #fff; color: #fff;
background-color: var(--name); background-color: rgba(185, 130, 255, 1);
} }
} }
.site { .site {
@ -102,9 +87,7 @@
.list-item { .list-item {
margin-bottom: 32rpx; margin-bottom: 32rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx; border-radius: 24rpx;
border: 2rpx solid #ebecee;
.photo-wrap { .photo-wrap {
position: relative; position: relative;
@ -112,80 +95,21 @@
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx 24rpx 0 0;
display: block; display: block;
width: 100%; width: 100%;
height: 388rpx; height: 328rpx;
}
.status {
padding: 6rpx 32rpx;
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
background: linear-gradient(90deg, #e5e9f5 0%, #fde4ec 100%);
border-radius: 24rpx 0rpx 24rpx 0rpx;
font-size: 28rpx;
color: var(--name);
.dot {
margin-right: 8rpx;
width: 13rpx;
height: 13rpx;
border-radius: 50%;
background-color: var(--name);
}
&.bad {
color: #484848;
background: #e6e6e6;
.dot {
display: none;
}
}
} }
.money { .sign {
padding: 0 16rpx 0 0;
position: absolute; position: absolute;
right: 16rpx; right: 24rpx;
bottom: 16rpx; top: 24rpx;
background-color: #ffedca; width: 120rpx;
height: 42rpx;
font-size: 24rpx; font-size: 24rpx;
color: #f5ad1d;
line-height: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 36rpx; color: rgba(255, 255, 255, 1);
.icon { background: rgba(0, 0, 0, 0.53);
margin-right: 5rpx; border-radius: 74rpx 74rpx 74rpx 74rpx;
width: 38rpx;
height: 36rpx;
}
}
.date {
padding: 18rpx 18rpx 8rpx;
position: absolute;
left: 40rpx;
bottom: 0;
background: var(--name);
border-radius: 11rpx 11rpx 0rpx 0rpx;
text-align: center;
.d-title {
font-size: 22rpx;
color: #ffffff;
font-weight: bold;
.icon {
margin-right: -10rpx;
}
}
.ymd {
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
border-bottom: 2rpx solid rgba(255, 255, 255, 0.34);
}
.hm {
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
}
} }
} }
.inner { .inner {
@ -194,33 +118,25 @@
border-radius: 0 0 24rpx 24rpx; border-radius: 0 0 24rpx 24rpx;
.title { .title {
font-size: 32rpx; font-size: 32rpx;
color: #252525; color: rgba(33, 29, 46, 1);
font-weight: bold; font-weight: bold;
line-height: 48rpx;
} }
.content { .labels {
margin-top: 20rpx; margin-top: 16rpx;
display: flex; max-width: 56vw;
justify-content: space-between; font-size: 28rpx;
align-items: flex-start; color: rgba(105, 104, 110, 1);
.labels { white-space: nowrap;
display: flex; text-overflow: ellipsis;
align-items: center; overflow: hidden;
flex-wrap: wrap; .line {
.label { margin: 0 4rpx;
margin-right: 16rpx; vertical-align: baseline;
margin-bottom: 16rpx; display: inline-block;
padding: 2rpx 20rpx; width: 1px;
font-size: 22rpx; height: 24rpx;
color: var(--name); background-color: rgba(105, 104, 110, 0.2);
border-radius: 18rpx;
background-color: var(--tag-bg);
word-break: break-all;
}
}
.people {
flex-shrink: 0;
color: #9e9e9e;
font-size: 22rpx;
} }
} }
.footer { .footer {
@ -228,21 +144,26 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.site { .people {
font-size: 22rpx; flex-shrink: 0;
color: #bebebe; color: rgba(173, 172, 178, 1);
font-size: 28rpx;
} }
.btn { .btn {
margin-left: 10rpx; margin-left: 10rpx;
flex-shrink: 0; flex-shrink: 0;
padding: 4rpx 36rpx; padding: 18rpx 36rpx;
font-size: 28rpx; font-size: 30rpx;
line-height: 1;
color: #ffffff; color: #ffffff;
background: var(--name); background: linear-gradient(to right, #c690fd, #d79ffc);
border-radius: 24rpx; border-radius: 80rpx;
min-width: 182rpx;
box-sizing: border-box;
text-align: center;
&.active { &.active {
color: #484848; color: #484848;
background-color: #e7e7e7; background: #e7e7e7;
} }
.icon { .icon {
width: 24rpx; width: 24rpx;

38
src/patient/pages/live/index.wxml

@ -1,23 +1,11 @@
<navbar fixed title="大咖说" custom-style="background:{{background}}">
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<view <view
class="page" class="page"
style="{{theme === 'DRUG'?'--name:#25D9C8;--tag-bg:rgba(37, 217, 200, 0.13)':'--name:#e04775;--tag-bg:rgba(224, 71, 117, 0.13)'}}" style="--name:#e04775;--tag-bg:rgba(224, 71, 117, 0.13);background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
> >
<van-tabs
wx:if="{{online_open_status==1 && offline_open_status==1}}"
class="navbar"
active="{{ active }}"
bind:change="tabChange"
title-inactive-color="#9E9E9E"
title-active-color="#484848"
line-width="{{17}}"
line-height="{{4}}"
color="#E04775"
tab-class="tab"
tab-active-class="tab-active"
>
<van-tab title="会议"></van-tab>
<van-tab title="活动"></van-tab>
</van-tabs>
<view class="search"> <view class="search">
<image class="icon" src="{{imageUrl}}za-images/1/search.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}za-images/1/search.png?t={{Timestamp}}"></image>
<input <input
@ -55,21 +43,17 @@
<view class="list-item" wx:for="{{list}}" bind:tap="handleDetail" data-id="{{item.Id}}" wx:key="index"> <view class="list-item" wx:for="{{list}}" bind:tap="handleDetail" data-id="{{item.Id}}" wx:key="index">
<view class="photo-wrap"> <view class="photo-wrap">
<image class="photo" mode="aspectFill" src="{{item.IntroductionUrl}}"></image> <image class="photo" mode="aspectFill" src="{{item.IntroductionUrl}}"></image>
<view class="status {{item.Status != 2 && 'bad'}}"> <view class="sign" wx:if="{{item.SignUpStatus==2}}">已报名</view>
<view class="dot"></view>
{{liveStatus[item.Status]}}
</view>
</view> </view>
<view class="inner"> <view class="inner">
<view class="title">{{item.Name}}</view> <view class="title">{{item.Name}}</view>
<view class="content"> <view class="labels" wx:if="{{item.doctorName}}">
<view class="labels"> {{item.doctorName}}
<view class="label" wx:for="{{item.Labels}}" wx:for-item="label" wx:key="index">{{label}}</view> <text class="line" wx:if="{{item.MasterHosipital}}"></text>
</view> {{item.MasterHosipital}}
<view class="people" wx:if="{{item.SignUpPeopleNum * 1}}">{{item.SignUpPeopleNum}}人已报名</view>
</view> </view>
<view class="footer"> <view class="footer">
<view class="site">{{item.MasterName}} {{item.MasterTitle}}</view> <view class="people" wx:if="{{item.SignUpPeopleNum * 1}}">{{item.SignUpPeopleNum}}人已报名</view>
<view class="btn active" wx:if="{{ item.Status==99}}">已取消</view> <view class="btn active" wx:if="{{ item.Status==99}}">已取消</view>
<view class="btn active" wx:elif="{{ item.Status==100}}">已删除</view> <view class="btn active" wx:elif="{{ item.Status==100}}">已删除</view>
<view class="btn" wx:elif="{{item.Status==3 && item.ReplayVideoUrl}}">看回放</view> <view class="btn" wx:elif="{{item.Status==3 && item.ReplayVideoUrl}}">看回放</view>

4
src/patient/pages/liveDetail/index.json

@ -1,10 +1,12 @@
{ {
"navigationBarTitleText": "活动详情", "navigationBarTitleText": "活动详情",
"navigationBarBackgroundColor": "#EEF0F3", "navigationBarBackgroundColor": "#EEF0F3",
"navigationStyle": "default", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"mp-html": "mp-html", "mp-html": "mp-html",
"van-icon": "@vant/weapp/icon/index",
"customPoster": "/components/customPoster/index", "customPoster": "/components/customPoster/index",
"navbar": "/components/navbar/index",
"van-popup": "@vant/weapp/popup/index" "van-popup": "@vant/weapp/popup/index"
} }
} }

135
src/patient/pages/liveDetail/index.scss

@ -1,12 +1,13 @@
page {
background-color: #eef0f3;
}
.page { .page {
min-height: 100vh; min-height: 100vh;
.banner { .banner {
width: 100%; margin: 0 40rpx;
height: 422rpx; display: block;
width: calc(100vw - 80rpx);
height: 334rpx;
border-radius: 24rpx;
border: 2rpx solid #ffffff;
box-shadow: 0 10rpx 10rpx #ccc;
} }
.page-container { .page-container {
padding: 18rpx 30rpx 160rpx; padding: 18rpx 30rpx 160rpx;
@ -16,63 +17,47 @@ page {
line-height: 64rpx; line-height: 64rpx;
font-weight: bold; font-weight: bold;
} }
.stat { .info {
margin-top: 20rpx; margin-top: 32rpx;
padding-bottom: 32rpx;
display: flex; display: flex;
.s-item { justify-content: space-between;
display: flex; align-items: center;
align-items: center; border-bottom: 1px solid rgba(159, 168, 172, 0.1);
font-size: 24rpx; .date {
color: #1e1f21; font-size: 32rpx;
margin-right: 48rpx; color: rgba(33, 29, 46, 1);
.icon {
width: 36rpx;
height: 36rpx;
margin-right: 12rpx;
}
}
}
.module {
margin-top: 30rpx;
padding: 34rpx 32rpx;
border-radius: 24rpx;
border: 2rpx solid #ebecee;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
background-color: #fff;
> view:nth-of-type(2) {
margin-top: 30rpx;
} }
.info { .stat {
display: flex; display: flex;
align-items: center; .s-item {
font-size: 28rpx;
color: #636466;
.icon {
margin-right: 12rpx;
width: 32rpx;
height: 32rpx;
}
}
.site {
display: flex;
justify-content: space-between;
.wrap {
font-size: 28rpx;
color: #636466;
display: flex; display: flex;
align-items: center;
font-size: 32rpx;
color: rgba(105, 104, 110, 1);
margin-left: 36rpx;
.icon { .icon {
flex-shrink: 0; width: 40rpx;
margin-right: 12rpx; height: 40rpx;
width: 32rpx; margin-right: 8rpx;
height: 32rpx;
vertical-align: middle;
} }
} }
.nav-site { }
margin-left: 10rpx; }
flex-shrink: 0; .limit {
width: 36rpx; margin-top: 32rpx;
height: 36rpx; font-size: 32rpx;
color: rgba(105, 104, 110, 1);
display: flex;
align-items: center;
gap: 20rpx;
.i-item {
display: flex;
align-items: center;
.num {
font-size: 36rpx;
color: rgba(185, 130, 255, 1);
font-weight: bold;
} }
} }
} }
@ -80,15 +65,15 @@ page {
position: relative; position: relative;
margin-top: 30rpx; margin-top: 30rpx;
padding: 32rpx 32rpx 0; padding: 32rpx 32rpx 0;
background: linear-gradient(360deg, #ffffff 0%, #f6f7f7 100%); background: rgba(246, 248, 249, 1);
border-radius: 24rpx; border-radius: 24rpx;
box-sizing: border-box; box-sizing: border-box;
.screen-list { .screen-list {
max-height: 200rpx; max-height: 268rpx;
.s-item { .s-item {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 28rpx; font-size: 32rpx;
.avatar { .avatar {
margin-right: 20rpx; margin-right: 20rpx;
width: 68rpx; width: 68rpx;
@ -97,14 +82,14 @@ page {
} }
.name { .name {
margin-right: 20rpx; margin-right: 20rpx;
color: #1e1f21; color: rgba(33, 29, 46, 1);
} }
.action { .action {
margin-right: 20rpx; margin-right: 20rpx;
color: #9b9fa4; color: rgba(33, 29, 46, 1);
} }
.date { .date {
color: #e04775; color: rgba(173, 172, 178, 1);
} }
} }
} }
@ -138,35 +123,11 @@ page {
left: 0; left: 0;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
display: flex;
background-color: #fff; background-color: #fff;
box-shadow: 0rpx 8rpx 48rpx 0rpx rgba(0, 0, 0, 0.19); box-shadow: 0rpx 8rpx 48rpx 0rpx rgba(0, 0, 0, 0.19);
.inner {
flex: 1;
display: flex;
.i-item {
text-align: center;
.num {
font-size: 36rpx;
color: #1e1f21;
}
.name {
font-size: 22rpx;
color: #a8acb0;
}
}
.vertical {
margin: 0 38rpx;
width: 2rpx;
height: 64rpx;
opacity: 0.19;
background: linear-gradient(180deg, rgba(200, 200, 200, 0), rgba(173, 173, 173, 1), rgba(151, 151, 151, 0));
}
}
.btn { .btn {
width: 346rpx;
height: 88rpx; height: 88rpx;
background: #e04775; background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
border-radius: 44rpx; border-radius: 44rpx;
text-align: center; text-align: center;
line-height: 88rpx; line-height: 88rpx;

17
src/patient/pages/liveDetail/index.ts

@ -119,7 +119,12 @@ Page({
handleLive() { handleLive() {
const { Type } = this.data.detail const { Type } = this.data.detail
app app
.zdPermissionVerification(3, Type == 1 ? 1 : 10, `/patient/pages/liveDetail/index?id=${this.data.id}`, this.data.id) .zdPermissionVerification(
3,
Type == 1 ? 1 : 10,
`/patient/pages/liveDetail/index?id=${this.data.id}`,
this.data.id,
)
.then(() => { .then(() => {
const { TencentMeetingCode } = this.data.detail const { TencentMeetingCode } = this.data.detail
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
@ -292,6 +297,16 @@ Page({
handlePlayVideo() { handlePlayVideo() {
this.videoContext.play() this.videoContext.play()
}, },
handleBack() {
wx.navigateBack({
fail() {
wx.reLaunch({
url: '/patient/pages/index/index',
})
},
})
},
onShareAppMessage() { onShareAppMessage() {
this.saveShare() this.saveShare()
return { return {

155
src/patient/pages/liveDetail/index.wxml

@ -1,29 +1,41 @@
<view class="page"> <navbar fixed title="" custom-style="background:{{background}}">
<van-icon name="arrow-left" slot="left" color="#000" bind:tap="handleBack" />
</navbar>
<view
class="page"
style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
>
<image class="banner" mode="aspectFill" src="{{detail.IntroductionUrl}}"></image> <image class="banner" mode="aspectFill" src="{{detail.IntroductionUrl}}"></image>
<view class="page-container"> <view class="page-container">
<view class="title">{{detail.Name}}</view> <view class="title">{{detail.Name}}</view>
<view class="stat"> <view class="info">
<view class="s-item" wx:if="{{detail.ActivityBasicNum * 1 + detail.OpenNum * 1}}"> <view class="date">2025.7.15</view>
<image class="icon" src="{{imageUrl}}za-images/1/view.png?t={{Timestamp}}"></image> <view class="stat">
{{detail.ActivityBasicNum * 1 + detail.OpenNum * 1}}次 <view class="s-item" wx:if="{{detail.ActivityBasicNum * 1 + detail.OpenNum * 1}}">
</view> <image class="icon" src="/images/icon40.png"></image>
<view class="s-item" bind:tap="handleShare" wx:if="{{detail.ShareNum}}"> {{detail.ActivityBasicNum * 1 + detail.OpenNum * 1}}次
<image class="icon" src="{{imageUrl}}za-images/1/share.png?t={{Timestamp}}"></image> </view>
{{detail.ShareNum}}次 <view class="s-item" bind:tap="handleShare" wx:if="{{detail.ShareNum}}">
<image class="icon" src="/images/icon39.png"></image>
{{detail.ShareNum}}次
</view>
</view> </view>
</view> </view>
<view class="module"> <view class="limit">
<view class="info"> <view class="i-item">
<image class="icon" src="{{imageUrl}}za-images/1/date.png?t={{Timestamp}}"></image> 已报名
{{detail.BeginTime}} <view class="num">{{detail.SignUpPeopleNum}}</view>
</view> </view>
<view class="site" wx:if="{{detail.Type==2 && detail.Location}}"> <block wx:if="{{detail.IsLimitUser==1}}">
<view class="wrap"> <view class="vertical"></view>
<image class="icon" src="{{imageUrl}}za-images/1/site.png?t={{Timestamp}}"></image> <view class="i-item">
{{detail.Location}} 限额
<view class="num">{{detail.LimitPeopleNum}}</view>
</view> </view>
<image class="nav-site" src="{{imageUrl}}za-images/1/nav-site.png?t={{Timestamp}}" bind:tap="handleMap"></image> </block>
</view>
</view> </view>
<view class="screen" wx:if="{{detail.SignUpRecord.length}}"> <view class="screen" wx:if="{{detail.SignUpRecord.length}}">
<swiper <swiper
@ -32,7 +44,7 @@
interval="{{1000}}" interval="{{1000}}"
circular="{{true}}" circular="{{true}}"
vertical="{{true}}" vertical="{{true}}"
display-multiple-items="{{detail.SignUpRecord.length>2?2.5:detail.SignUpRecord.length}}" display-multiple-items="3"
easing-function="linear" easing-function="linear"
> >
<swiper-item class="s-item" wx:for="{{detail.SignUpRecord}}" wx:key="UserId"> <swiper-item class="s-item" wx:for="{{detail.SignUpRecord}}" wx:key="UserId">
@ -49,85 +61,36 @@
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<view class="inner"> <view class="btn active" wx:if="{{ detail.Status==99}}">已取消</view>
<view class="i-item"> <view class="btn active" wx:elif="{{ detail.Status==100}}">已删除</view>
<view class="num">{{detail.SignUpPeopleNum}}人</view> <view class="btn" wx:elif="{{detail.Status==3 && detail.ReplayVideoUrl}}" bind:tap="handleReplay">看回放</view>
<view class="name">已报名</view> <view class="btn active" wx:elif="{{detail.Status==3 && !detail.ReplayVideoUrl}}">回放生成中</view>
</view> <block wx:elif="{{detail.IsSignUp==1 && zdUserInfo.AuditStatus}}">
<block wx:if="{{detail.IsLimitUser==1}}"> <block wx:if="{{zdUserInfo.AuditStatus == 1 || zdUserInfo.AuditStatus == 3 || zdUserInfo.AuditStatus == 4}}">
<view class="vertical"></view> <view class="btn active" wx:if="{{detail.SignUpStatus==1}}" bind:tap="handleResult">审核中</view>
<view class="i-item"> <block wx:elif="{{detail.SignUpStatus==2}}">
<view class="num">{{detail.LimitPeopleNum}}人</view> <view class="btn" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1}}" bind:tap="handleLive">参会</view>
<view class="name">限额</view> <view class="btn active" wx:else bind:tap="handleResult">已报名</view>
</view>
</block>
</view>
<block wx:if="{{detail.Type==1}}">
<view class="btn active" wx:if="{{ detail.Status==99}}">已取消</view>
<view class="btn active" wx:elif="{{ detail.Status==100}}">已删除</view>
<view class="btn" wx:elif="{{detail.Status==3 && detail.ReplayVideoUrl}}" bind:tap="handleReplay">看回放</view>
<view class="btn active" wx:elif="{{detail.Status==3 && !detail.ReplayVideoUrl}}">回放生成中</view>
<block wx:elif="{{detail.IsSignUp==1 && zdUserInfo.AuditStatus}}">
<block wx:if="{{zdUserInfo.AuditStatus == 1 || zdUserInfo.AuditStatus == 3 || zdUserInfo.AuditStatus == 4}}">
<view class="btn active" wx:if="{{detail.SignUpStatus==1}}" bind:tap="handleResult">审核中</view>
<block wx:elif="{{detail.SignUpStatus==2}}">
<view class="btn" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1}}" bind:tap="handleLive">参会</view>
<view class="btn active" wx:else bind:tap="handleResult">已报名</view>
</block>
<block wx:elif="{{detail.SignUpStatus==3}}">
<view
class="btn active"
wx:if="{{detail.IsLimitUser==1 && detail.SignUpPeopleNum * 1 >= detail.LimitPeopleNum * 1}}"
>
已满额
</view>
</block>
</block> </block>
</block> <block wx:elif="{{detail.SignUpStatus==3}}">
<block wx:else> <view
<view class="btn active"
class="btn active" wx:if="{{detail.IsLimitUser==1 && detail.SignUpPeopleNum * 1 >= detail.LimitPeopleNum * 1}}"
wx:if="{{detail.IsLimitUser==1 && detail.SignUpPeopleNum * 1 >= detail.LimitPeopleNum * 1}}" >
> 已满额
已满额 </view>
</view>
<view class="btn active" wx:elif="{{detail.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view>
<view class="btn" wx:else bind:tap="handleSignUp">报名</view>
</block>
</block>
<block wx:elif="{{detail.Type==2}}">
<view class="btn active" wx:if="{{ detail.Status==3}}">已结束</view>
<view class="btn active" wx:elif="{{ detail.Status==99}}">已取消</view>
<view class="btn active" wx:elif="{{ detail.Status==100}}">已删除</view>
<block wx:elif="{{detail.IsSignUp==1 && zdUserInfo.AuditStatus}}">
<block wx:if="{{zdUserInfo.AuditStatus == 1 || zdUserInfo.AuditStatus == 3 || zdUserInfo.AuditStatus == 4}}">
<view class="btn active" wx:if="{{detail.SignUpStatus==1}}" bind:tap="handleResult">审核中</view>
<block wx:elif="{{detail.SignUpStatus==2}}">
<view class="btn" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1}}" bind:tap="handleResult">
已报名
</view>
<view class="btn active" wx:else bind:tap="handleResult">已报名</view>
</block>
<block wx:elif="{{detail.SignUpStatus==3}}">
<view
class="btn active"
wx:if="{{detail.IsLimitUser==1 && detail.SignUpPeopleNum * 1 >= detail.LimitPeopleNum * 1}}"
>
已满额
</view>
</block>
</block> </block>
</block> </block>
<block wx:else> </block>
<view <block wx:else>
class="btn active" <view
wx:if="{{detail.IsLimitUser==1 && detail.SignUpPeopleNum * 1 >= detail.LimitPeopleNum * 1}}" class="btn active"
> wx:if="{{detail.IsLimitUser==1 && detail.SignUpPeopleNum * 1 >= detail.LimitPeopleNum * 1}}"
已满额 >
</view> 已满额
<view class="btn active" wx:elif="{{detail.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view> </view>
<view class="btn" wx:else bind:tap="handleSignUp">报名</view> <view class="btn active" wx:elif="{{detail.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view>
</block> <view class="btn" wx:else bind:tap="handleSignUp">报名</view>
</block> </block>
</view> </view>

6
src/patient/pages/liveResult/index.json

@ -1,5 +1,7 @@
{ {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "default", "navigationStyle": "custom",
"usingComponents": {} "usingComponents": {
"navbar": "/components/navbar/index"
}
} }

259
src/patient/pages/liveResult/index.scss

File diff suppressed because one or more lines are too long

82
src/patient/pages/liveResult/index.ts

@ -1,100 +1,84 @@
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
import dayjs from "dayjs"; import dayjs from 'dayjs'
let live_time: null | number = null; let live_time: null | number = null
Page({ Page({
data: { data: {
id: "", id: '',
detail: {} as any, detail: {} as any,
liveDetail: {} as any, liveDetail: {} as any,
zdUserInfo: {}, zdUserInfo: {},
codeUrl: "", codeUrl: '',
dateValue: "" as string | number, dateValue: '' as string | number,
rewardScore: 0 as number | undefined, rewardScore: 0 as number | undefined,
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
id: options.id, id: options.id,
rewardScore: options.rewardScore, rewardScore: options.rewardScore,
}); })
if (live_time) { if (live_time) {
clearInterval(live_time); clearInterval(live_time)
} }
this.setData({ this.setData({
dateValue: dayjs().valueOf(), dateValue: dayjs().valueOf(),
}); })
live_time = setInterval(() => { live_time = setInterval(() => {
this.setData({ this.setData({
dateValue: dayjs().valueOf(), dateValue: dayjs().valueOf(),
}); })
}, 1000); }, 1000)
app.zdWaitLogin().then((_res) => { app.waitLogin({ type: [1] }).then((_res) => {
this.getLiveDetail(); this.getLiveDetail()
this.getDetail(); this.getDetail()
this.getCode(); app.getZdUserInfo(this, true)
app.getZdUserInfo(this, true); })
});
}, },
getDetail() { getDetail() {
wx.ajax({ wx.ajax({
method: "GET", method: 'GET',
url: "?r=zd/activity/sign-up-detail", url: '?r=zd/activity/sign-up-detail',
data: { data: {
Id: this.data.id, Id: this.data.id,
}, },
}).then((res) => { }).then((res) => {
res.BeginTime = dayjs(res.BeginTime).format("YYYY-MM-DD HH:mm"); res.BeginTime = dayjs(res.BeginTime).format('YYYY-MM-DD HH:mm')
res.BeginTimeValue = dayjs(res.BeginTime).valueOf(); res.BeginTimeValue = dayjs(res.BeginTime).valueOf()
this.setData({ this.setData({
detail: res, detail: res,
}); })
}); })
}, },
getLiveDetail() { getLiveDetail() {
wx.ajax({ wx.ajax({
method: "GET", method: 'GET',
url: "?r=zd/activity/detail", url: '?r=zd/activity/detail',
data: { data: {
Id: this.data.id, Id: this.data.id,
}, },
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
liveDetail: res, liveDetail: res,
}); })
}); })
}, },
handleLive() { handleLive() {
const { TencentMeetingCode } = this.data.detail; const { TencentMeetingCode } = this.data.detail
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: "wx33fd6cdc62520063", // 要跳转的微信小程序appid appId: 'wx33fd6cdc62520063', // 要跳转的微信小程序appid
path: `pages/index/index?code=${TencentMeetingCode}`, path: `pages/index/index?code=${TencentMeetingCode}`,
}); })
},
getCode() {
const { registChannel } = app.globalData;
wx.ajax({
method: "GET",
url: "?r=zd/common/get-channel-wx-code",
data: {
Id: this.data.id,
ChannelType: registChannel,
},
}).then((res) => {
this.setData({
codeUrl: res,
});
});
}, },
handleHome() { handleHome() {
wx.reLaunch({ wx.reLaunch({
url: "/patient/pages/index/index", url: '/patient/pages/index/index',
}); })
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: this.data.detail.ActivityName, title: this.data.detail.ActivityName,
path: `/patient/pages/liveDetail/index?id=${this.data.detail.ActivityId}`, path: `/patient/pages/liveDetail/index?id=${this.data.detail.ActivityId}`,
imageUrl: `${this.data.liveDetail.IntroductionUrl}`, imageUrl: `${this.data.liveDetail.IntroductionUrl}`,
}; }
}, },
}); })

74
src/patient/pages/liveResult/index.wxml

@ -1,61 +1,23 @@
<view class="page"> <navbar fixed title="" custom-style="background:{{background}}">
<block wx:if="{{detail.AuditStatus==1}}"> <van-icon name="arrow-left" slot="left" color="background=='#FFFFFF'?'#000':'#fff'" bind:tap="handleBack" />
<image class="badge" mode="aspectFit" src="{{imageUrl}}za-images/1/live-result-reject.png?t={{Timestamp}}"></image> </navbar>
<view class="status green">资料审核中</view> <!-- padding-top:{{pageTop+22}}px; -->
<view class="tip">资料审核通过后可参与活动</view> <view class="page" style="background: url('/images/bg10.png') no-repeat top center/100% 610rpx">
</block> <view class="bg"></view>
<block wx:elif="{{detail.SignUpStatus==2 && (detail.AuditStatus==3 || detail.AuditStatus==4)}}"> <view class="page-container" style="top:{{pageTop+30}}px;">
<!-- <block> --> <image class="badge" mode="aspectFit" src="/images/icon43.png"></image>
<image class="badge" mode="aspectFit" src="{{imageUrl}}za-images/1/live-result-success.png?t={{Timestamp}}"></image>
<view class="status">报名成功</view> <view class="status">报名成功</view>
<view class="tip">您已成功报名大咖秀</view> <view class="tip">欢迎您参与此次活动</view>
<view class="price" wx:if="{{rewardScore>0}}"> <view class="container">
+{{rewardScore}} <view class="c-content">
<view class="sub">能量</view> <image class="banner" src="{{liveDetail.IntroductionUrl}}"></image>
</view> <view class="c-title">{{detail.ActivityName}}</view>
</block> <view class="date">直播时间: {{detail.BeginTime}}</view>
<view class="container"> <view wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1 && detail.Type==1}}" class="btn" bind:tap="handleLive">
<view class="c-content"> 立即进入直播间
<!-- <video --> </view>
<!-- class="video" --> <button open-type="share" class="btn btn2">分享活动</button>
<!-- show-mute-btn -->
<!-- autoplay -->
<!-- src="https://rs-os-lyh-dt-publicread-video-auto1080tr-prod.liangyihui.net/boss-upload/Mabd3TtaDlquV01ODi6qwA/YsT9kzIy5QKlZTYY.mp4" -->
<!-- controls -->
<!-- ></video> -->
<view class="c-title">{{detail.ActivityName}}</view>
<view class="date">
<image class="icon" src="{{imageUrl}}za-images/1/date.png?t={{Timestamp}}"></image>
{{detail.BeginTime}}
</view> </view>
<view class="site" wx:if="{{detail.Type==2}}">地点:{{detail.Location}}</view>
<block wx:if="{{detail.IsFollow==0}}">
<image class="code" src="{{codeUrl}}" show-menu-by-longpress></image>
<view class="c-tip">关注"gMG给力加油站"公众号获取活动通知</view>
</block>
</view> </view>
</view> </view>
<view class="footer">
<block wx:if="{{detail.AuditStatus==1}}">
<button wx:if="{{detail.IsFollow==1}}" open-type="share" class="btn">邀约好友参与</button>
<view class="btn btn2" bind:tap="handleHome">随便看看</view>
</block>
<block wx:elif="{{detail.SignUpStatus==2 && (detail.AuditStatus==3 || detail.AuditStatus==4)}}">
<block wx:if="{{detail.IsFollow==0}}">
<view class="btn" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1 && detail.Type==1}}" bind:tap="handleLive">
进入会议间
</view>
</block>
<block wx:else>
<view
class="btn btn1"
wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1 && detail.Type==1}}"
bind:tap="handleLive"
>
立即进入会议间
</view>
<button open-type="share" class="btn">邀约好友参与</button>
</block>
</block>
</view>
</view> </view>

122
src/patient/pages/login/index.scss

@ -4,9 +4,9 @@ pgae {
padding-bottom: 80rpx; padding-bottom: 80rpx;
position: relative; position: relative;
height: 100vh; height: 100vh;
background-color: #fafafa;
.bg { .bg {
width: 100%; width: 100%;
height: 610rpx;
} }
.container { .container {
position: absolute; position: absolute;
@ -16,14 +16,14 @@ pgae {
.frame { .frame {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
width: 124rpx; width: 196rpx;
height: 145rpx; height: 196rpx;
} }
.title { .title {
display: block; display: block;
margin: 32rpx auto 0; margin: 32rpx auto 0;
width: 430rpx; width: 330rpx;
height: 50rpx; height: 52rpx;
} }
.content { .content {
padding: 32rpx 50rpx 0; padding: 32rpx 50rpx 0;
@ -34,90 +34,25 @@ pgae {
color: rgba(207, 83, 117, 1); color: rgba(207, 83, 117, 1);
} }
} }
.form {
margin-top: 32rpx;
padding: 0 64rpx;
.row {
margin-bottom: 40rpx;
display: flex;
.input {
flex: 1;
padding: 24rpx 32rpx;
height: 40rpx;
font-size: 28rpx;
color: #999999;
background: #f2f2f2;
border: 1rpx solid #cccccc;
border-radius: 24rpx;
}
.code {
margin-left: 24rpx;
flex-shrink: 0;
width: 212rpx;
border: 2rpx solid #e04775;
border-radius: 24rpx;
font-size: 28rpx;
color: #e04775;
display: flex;
align-items: center;
justify-content: center;
}
.submit {
width: 622rpx;
height: 88rpx;
background: #e04775;
border-radius: 24rpx;
font-size: 34rpx;
color: #ffffff;
font-weight: bold;
text-align: center;
line-height: 88rpx;
}
}
}
.phone-btn { .phone-btn {
margin: 48rpx 50rpx 0; margin: 64rpx 50rpx 0;
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
text-align: center; text-align: center;
font-size: 34rpx; font-size: 32rpx;
color: #ffffff; color: rgba(255, 255, 255, 1);
background: #cf5375; background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 30%, #b982ff 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 100rpx;
&::after { &::after {
border: none; border: none;
outline: none; outline: none;
} }
} }
.divider {
margin: 48rpx auto 0;
width: 300rpx;
}
.other {
margin-top: 48rpx;
display: flex;
justify-content: center;
align-items: center;
.col {
font-size: 32rpx;
color: rgba(153, 153, 153, 1);
display: flex;
align-items: center;
justify-content: center;
}
.line {
flex-shrink: 0;
margin: 0 50rpx;
width: 1rpx;
height: 36rpx;
background-color: rgba(221, 221, 221, 1);
}
}
.argument { .argument {
margin-top: 76rpx; margin-top: 150rpx;
padding: 0 50rpx; padding: 0 50rpx;
.a-col { .a-col {
margin-bottom: 20rpx; margin-bottom: 30rpx;
display: flex; display: flex;
gap: 12rpx; gap: 12rpx;
@ -128,12 +63,41 @@ pgae {
} }
.a-content { .a-content {
font-size: 28rpx; font-size: 28rpx;
color: rgba(102, 102, 102, 1); color: rgba(105, 104, 110, 1);
.link { .link {
color: rgba(207, 83, 117, 1); color: rgba(185, 130, 255, 1);
} }
} }
} }
} }
.divider {
margin: 106rpx auto 0;
width: 380rpx;
font-size: 28rpx;
color: rgba(207, 209, 213, 1);
}
.other {
margin-top: 48rpx;
display: flex;
justify-content: center;
align-items: center;
gap: 50rpx;
.col {
padding: 8rpx 32rpx;
font-size: 28rpx;
color: rgba(161, 164, 172, 1);
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
background-color: rgba(246, 248, 249, 1);
border-radius: 92rpx;
.icon {
flex-shrink: 0;
width: 40rpx;
height: 40rpx;
}
}
}
} }
} }

62
src/patient/pages/login/index.wxml

@ -1,28 +1,8 @@
<view class="page"> <view class="page">
<image class="bg" mode="widthFix" src="{{imageUrl}}za-images/1/login-bg.png?t={{Timestamp}}"></image> <image class="bg" src="/images/bg10.png"></image>
<image src="/src/images/bg1.png"></image>
<view class="container"> <view class="container">
<image class="frame" src="{{imageUrl}}za-images/icon17.png?t={{Timestamp}}"></image> <image class="frame" src="/images/logo2.png"></image>
<image class="title" src="{{imageUrl}}za-images/1/login-title.png?t={{Timestamp}}"></image> <image class="title" src="/images/title6.png"></image>
<view class="content">
在您加入gMG 给力加油站平台之前,请您阅读并充分理解
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《个人信息及隐私保护政策》</text>
,了解您的权益及相关数据处理方法,我们将严格按照法律法规及
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《个人信息及隐私保护政策》</text>
的相关规定保证您的个人信息不受侵犯。
</view>
<!-- <view class="form"> -->
<!-- <view class="row"> -->
<!-- <input type="number" model:value="{{mobile}}" class="input" placeholder="请输入手机号" /> -->
<!-- </view> -->
<!-- <view class="row"> -->
<!-- <input type="number" model:value="{{code}}" class="input" placeholder="请输入验证码" /> -->
<!-- <view class="code" bind:tap="getCode">{{codeText}}</view> -->
<!-- </view> -->
<!-- <view class="row"> -->
<!-- <view class="submit" bind:tap="handleSubmit">立即加入</view> -->
<!-- </view> -->
<!-- </view> -->
<button <button
wx:if="{{check1 && check2}}" wx:if="{{check1 && check2}}"
class="phone-btn" class="phone-btn"
@ -37,53 +17,45 @@
<image <image
wx:if="{{check1}}" wx:if="{{check1}}"
class="icon" class="icon"
src="{{imageUrl}}za-images/icon20.png?t={{Timestamp}}" src="/images/icon25.png"
bind:tap="handleCheck"
data-key="check1"
></image>
<image
wx:else
class="icon"
src="{{imageUrl}}za-images/icon19.png?t={{Timestamp}}"
bind:tap="handleCheck" bind:tap="handleCheck"
data-key="check1" data-key="check1"
></image> ></image>
<image wx:else class="icon" src="/images/icon24.png" bind:tap="handleCheck" data-key="check1"></image>
<view class="a-content"> <view class="a-content">
我已阅读并同意 我已阅读并同意
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《个人信息及隐私协议政策》</text> <text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《用户协议》</text>
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《隐私政策》</text>
</view> </view>
</view> </view>
<view class="a-col"> <view class="a-col">
<image <image
wx:if="{{check2}}" wx:if="{{check2}}"
class="icon" class="icon"
src="{{imageUrl}}za-images/icon20.png?t={{Timestamp}}" src="/images/icon25.png"
bind:tap="handleCheck"
data-key="check2"
></image>
<image
wx:else
class="icon"
src="{{imageUrl}}za-images/icon19.png?t={{Timestamp}}"
bind:tap="handleCheck" bind:tap="handleCheck"
data-key="check2" data-key="check2"
></image> ></image>
<image wx:else class="icon" src="/images/icon24.png" bind:tap="handleCheck" data-key="check2"></image>
<view class="a-content"> <view class="a-content">
特此同意依照此 我同意依照此
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《个人信息及隐私保护政策》</text> <text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《隐私政策》</text>
规定收集我的个人敏感信息 规定收集我的个人敏感信息
</view> </view>
</view> </view>
</view> </view>
<view class="divider">
<van-divider contentPosition="center" custom-style="color:rgba(207, 209, 213, 1)">或者</van-divider>
</view>
<view class="other"> <view class="other">
<view class="col" bind:tap="handleVisitors"> <view class="col" bind:tap="handleVisitors">
<image class="icon" src="/images/icon26.png"></image>
随便看看 随便看看
<van-icon name="arrow" />
</view> </view>
<view class="line"></view>
<view class="col" bind:tap="handleDoctor"> <view class="col" bind:tap="handleDoctor">
<image class="icon" src="/images/icon27.png"></image>
我是医生 我是医生
<van-icon name="arrow" />
</view> </view>
</view> </view>
</view> </view>

154
src/patient/pages/my/index.scss

@ -1,163 +1,50 @@
page { page {
background-color: #fcfcfc; background-color: rgba(246, 248, 249, 1);
} }
.page { .page {
.bg {
width: 100%;
height: 902rpx;
}
.page-container { .page-container {
position: absolute;
left: 0;
top: 0;
width: 100%; width: 100%;
padding: 0 40rpx; padding: 0 40rpx;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 200rpx;
.banner { .banner {
padding: 24rpx;
border-radius: 24rpx; border-radius: 24rpx;
background: rgba(255, 255, 255, 0.13);
border: 2rpx solid rgba(235, 236, 238, 0.51);
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
.user { .user {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.avatar { .avatar {
flex-shrink: 0; flex-shrink: 0;
width: 116rpx; width: 112rpx;
height: 116rpx; height: 112rpx;
border-radius: 50%; border-radius: 50%;
border: 4rpx solid #fff; border: 4rpx solid #fff;
} }
.inner { .inner {
flex: 1; flex: 1;
padding-left: 16rpx; padding-left: 28rpx;
.name { .name {
font-size: 40rpx; font-size: 40rpx;
font-weight: bold; font-weight: bold;
color: var(--name); color: rgba(33, 29, 46, 1);
} }
.tip { .tip {
margin-top: 16rpx; margin-top: 4rpx;
font-size: 24rpx; font-size: 28rpx;
color: #9e9e9e; color: rgba(173, 172, 178, 1);
.day { .day {
font-size: 36rpx; font-size: 40rpx;
color: var(--name); color: rgba(185, 130, 255, 1);
font-weight: bold; font-weight: bold;
} }
} }
} }
} }
.options {
margin-top: 32rpx;
padding: 30rpx 22rpx;
display: flex;
align-items: center;
justify-content: space-between;
background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx;
border: 1rpx solid rgba(222, 222, 222, 0.6);
.ver-line {
margin: 0 26rpx;
flex-shrink: 0;
width: 2rpx;
height: 60rpx;
background-color: rgba(221, 221, 221, 0.6);
}
.option {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
.icon {
margin-right: 16rpx;
width: 50rpx;
height: 50rpx;
}
.wrap {
.title {
font-size: 28rpx;
color: #484848;
font-weight: bold;
.sub {
font-size: 20rpx;
}
}
.content {
margin-top: 4rpx;
font-size: 20rpx;
color: var(--name);
display: flex;
align-items: center;
justify-content: center;
&.gift {
color: #c2c2c2;
}
.line {
margin: 0 10rpx;
width: 2rpx;
height: 16rpx;
background-color: var(--name);
}
}
}
}
}
.notice {
margin-top: 24rpx;
height: 44rpx;
background: linear-gradient(90deg, rgba(241, 241, 241, 0) 0%, #f1f1f1 52%, rgba(241, 241, 241, 0) 100%);
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #3f3f3f;
.icon {
margin-right: 6rpx;
width: 30rpx;
height: 24rpx;
}
}
}
.common-operations {
margin-top: 32rpx;
display: flex;
.item {
flex: 1;
padding: 30rpx;
display: flex;
align-items: center;
justify-content: center;
background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx;
border: 2rpx solid rgba(235, 236, 238, 0.51);
.icon {
width: 64rpx;
height: 64rpx;
margin-right: 16rpx;
}
.name {
font-size: 32rpx;
color: #474747;
}
}
.item:first-of-type {
margin-right: 30rpx;
}
} }
.options-list { .options-list {
margin-top: 32rpx; margin-top: 52rpx;
padding: 16rpx 28rpx; padding: 16rpx 28rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05); box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
@ -178,12 +65,8 @@ page {
margin-right: 16rpx; margin-right: 16rpx;
} }
.icon { .icon {
width: 36rpx;
height: 36rpx;
}
.icon {
width: 40rpx; width: 40rpx;
height: 36rpx; height: 40rpx;
} }
} }
.more { .more {
@ -194,10 +77,15 @@ page {
} }
} }
} }
.switch-doctor { .login-out {
margin-top: 80rpx; margin: 84rpx 40rpx 0;
text-align: center; height: 88rpx;
border-radius: 130rpx 130rpx 130rpx 130rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx; font-size: 32rpx;
color: #484848; color: rgba(105, 104, 110, 1);
background-color: #fff;
} }
} }

1
src/patient/pages/my/index.ts

@ -135,4 +135,5 @@ Page({
url: '/patient/pages/webview/index', url: '/patient/pages/webview/index',
}) })
}, },
handleLoginOut() {},
}) })

127
src/patient/pages/my/index.wxml

@ -1,8 +1,10 @@
<view class="page" style="{{theme === 'DRUG'?'--name:#24d8c8':'--name:#e04775'}}"> <view
class="page"
style="--name: rgba(185, 130, 255, 1); background: url('/images/bg10.png') no-repeat top center/100% 512rpx;padding-top:{{pageTop+22}}px"
>
<navBar color="#364E9E" fixed title="" home="{{false}}"></navBar> <navBar color="#364E9E" fixed title="" home="{{false}}"></navBar>
<image class="bg" src="{{imageUrl}}za-images/1/my-bg.png?t={{Timestamp}}"></image>
<view class="page-container"> <view class="page-container">
<view class="banner" style="margin-top:{{bottom+26}}px"> <view class="banner">
<view class="user"> <view class="user">
<image <image
class="avatar" class="avatar"
@ -12,93 +14,30 @@
data-url="/patient/pages/getUserInfo/index" data-url="/patient/pages/getUserInfo/index"
></image> ></image>
<view class="inner"> <view class="inner">
<!-- <view class="name">Hi,{{zdUserInfo.PatientName}}{{zdUserInfo.RelationType== 2 ? '亲友':''}}</view> --> <view class="name">{{zdUserInfo.PatientName}}</view>
<view class="name">{{today}}</view>
<!-- ignore-prettier --> <!-- ignore-prettier -->
<view class="tip" wx:if="{{zdUserInfo.UserType>=3}}"> <view class="tip">
重症肌无力加油站已伴您走过 TED规关爱中心已伴您走过
<text class="day">{{zdUserInfo.JoinDays}}</text> <text class="day">{{zdUserInfo.JoinDays}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="options" wx:if="{{selfScore.PatientScoreSwitch==='1'}}">
<view class="option">
<image
class="icon"
style="width: 56rpx; height: 54rpx"
src="{{imageUrl}}za-images/2/money.png?t={{Timestamp}}"
></image>
<view class="wrap">
<view class="title">
{{selfScore.score}}
<text class="sub">能量</text>
</view>
<view class="content">
<view bind:tap="routerTo" data-url="/patient/pages/priceDetail/index">能量明细</view>
<text class="line"></text>
<view bind:tap="routerTo" data-url="/patient/pages/scoreRule/index">能量规则</view>
</view>
</view>
</view>
<view class="ver-line"></view>
<view
class="option"
style="width: 54rpx; height: 60rpx"
bind:tap="routerTo"
data-url="/patient/pages/giftList/index"
>
<image
class="icon"
src="{{imageUrl}}za-images/2/gift{{theme === 'DRUG' ? '-drug' : ''}}.png?t={{Timestamp}}"
></image>
<view class="wrap">
<view class="title">礼品中心</view>
<view class="content gift">能量兑换丰厚礼品</view>
</view>
</view>
</view>
<view class="notice" wx:if="{{selfScore.expire.expireStatus===1}}">
<image class="icon" src="{{imageUrl}}za-images/2/notice.png?t={{Timestamp}}"></image>
你有{{selfScore.expire.expireScore}}能量将于6月31日过期
</view>
</view>
<view class="common-operations">
<view bind:tap="handleMyHealthRecord" class="item" data-url="/gift/pages/myHealthRecord/index">
<image
class="icon"
src="{{imageUrl}}za-images/{{theme === 'DRUG'?1.5:1}}/my-common-icon1.png?t={{Timestamp}}"
></image>
<view class="name">健康档案</view>
</view>
<view bind:tap="routerTo" class="item" data-url="/patient/pages/mySave/index">
<image
class="icon"
src="{{imageUrl}}za-images/{{theme === 'DRUG'?1.5:1}}/my-common-icon2.png?t={{Timestamp}}"
></image>
<view class="name">我的收藏</view>
</view>
</view> </view>
<view class="options-list"> <view class="options-list">
<view bind:tap="routerTo" class="row" data-url="/patient/pages/myLive/index"> <view bind:tap="routerTo" class="row" data-url="/patient/pages/myLive/index">
<view class="col"> <view class="col">
<image <image class="icon" src="/images/icon32.png"></image>
class="icon" 我报名的活动
src="{{imageUrl}}za-images/{{theme === 'DRUG'?1.5:1}}/my-list-icon1.png?t={{Timestamp}}"
></image>
我报名的会议
</view> </view>
<view class="more"> <view class="more">
<van-icon name="arrow" /> <van-icon name="arrow" />
</view> </view>
</view> </view>
<view bind:tap="handleFamily" class="row" data-url="/patient/pages/family/index"> <view bind:tap="routerTo" class="row" data-url="/patient/pages/mySave/index">
<view class="col"> <view class="col">
<image <image class="icon" src="/images/icon33.png"></image>
class="icon" 我的收藏
src="{{imageUrl}}za-images/{{theme === 'DRUG'?1.5:1}}/my-list-icon2.png?t={{Timestamp}}"
></image>
我的亲友
</view> </view>
<view class="more"> <view class="more">
<van-icon name="arrow" /> <van-icon name="arrow" />
@ -106,55 +45,25 @@
</view> </view>
<view bind:tap="routerTo" class="row" data-url="/patient/pages/personalInformation/index"> <view bind:tap="routerTo" class="row" data-url="/patient/pages/personalInformation/index">
<view class="col"> <view class="col">
<image <image class="icon" src="/images/icon34.png"></image>
class="icon"
src="{{imageUrl}}za-images/{{theme === 'DRUG'?1.5:1}}/my-list-icon3.png?t={{Timestamp}}"
></image>
个人信息 个人信息
</view> </view>
<view class="more"> <view class="more">
<van-icon name="arrow" /> <van-icon name="arrow" />
</view> </view>
</view> </view>
<view bind:tap="routerTo" class="row" data-url="/patient/pages/storyList/index"> <view bind:tap="routerTo" class="row" data-url="">
<view class="col"> <view class="col">
<image <image class="icon" src="/images/icon35.png"></image>
class="icon" 协议相关
src="{{imageUrl}}za-images/{{theme === 'DRUG'?1.5:1}}/my-list-icon4.png?t={{Timestamp}}"
></image>
我的故事
</view> </view>
<view class="more"> <view class="more">
<van-icon name="arrow" /> <van-icon name="arrow" />
</view> </view>
</view> </view>
<!-- <view bind:tap="handleMiniDoctor" wx:if="{{zdUserInfo.UserType<4}}" class="row"> -->
<!-- <view class="col"> -->
<!-- <image class="icon icon1" src="{{imageUrl}}za-images/1.5/my-list-icon5.png?t={{Timestamp}}"></image> -->
<!-- “有力人生”专属服务 -->
<!-- </view> -->
<!-- <view class="more"> -->
<!-- <van-icon name="arrow" /> -->
<!-- </view> -->
<!-- </view> -->
<view class="row">
<view class="col">
<image
class="icon"
src="{{imageUrl}}za-images/{{theme === 'DRUG'?1.5:1}}/my-list-icon4.png?t={{Timestamp}}"
></image>
ADL提醒
</view>
<view class="more">
<van-switch
checked="{{zdUserInfo.AdlNotifySwitch==1}}"
size="20px"
bind:change="handleAdlChaneg"
></van-switch>
</view>
</view>
</view> </view>
</view> </view>
<view class="login-out" bind:tap="handleLoginOut">退出登录</view>
</view> </view>
<patient-tab-bar></patient-tab-bar> <patient-tab-bar></patient-tab-bar>

3
src/patient/pages/myLive/index.json

@ -1,9 +1,10 @@
{ {
"navigationBarTitleText": "我报名的活动", "navigationBarTitleText": "我报名的活动",
"navigationStyle": "default", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"van-tab": "@vant/weapp/tab/index", "van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index", "van-tabs": "@vant/weapp/tabs/index",
"navbar": "/components/navbar/index",
"van-icon": "@vant/weapp/icon/index" "van-icon": "@vant/weapp/icon/index"
} }
} }

290
src/patient/pages/myLive/index.scss

@ -1,3 +1,6 @@
page {
background-color: rgba(246, 248, 249, 1);
}
.page { .page {
padding-bottom: 120rpx; padding-bottom: 120rpx;
.sticky { .sticky {
@ -20,12 +23,10 @@
.allin-list { .allin-list {
margin: 32rpx 30rpx; margin: 32rpx 30rpx;
.on-list-item { .list-item {
margin-bottom: 20rpx; margin-bottom: 32rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx; border-radius: 24rpx;
border: 2rpx solid #ebecee;
.photo-wrap { .photo-wrap {
position: relative; position: relative;
@ -33,115 +34,48 @@
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx 24rpx 0 0;
display: block; display: block;
width: 100%; width: 100%;
height: 388rpx; height: 328rpx;
} }
.status { .sign {
padding: 6rpx 32rpx;
position: absolute; position: absolute;
top: 0; right: 24rpx;
left: 0; top: 24rpx;
width: 120rpx;
height: 42rpx;
font-size: 24rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background: linear-gradient(90deg, #e5e9f5 0%, #fde4ec 100%); justify-content: center;
border-radius: 24rpx 0rpx 24rpx 0rpx; color: rgba(255, 255, 255, 1);
font-size: 28rpx; background: rgba(0, 0, 0, 0.53);
color: #e04775; border-radius: 74rpx 74rpx 74rpx 74rpx;
.dot {
margin-right: 8rpx;
width: 13rpx;
height: 13rpx;
border-radius: 50%;
background-color: #e04775;
}
&.bad {
color: #484848;
background: #e6e6e6;
.dot {
display: none;
}
}
}
.date {
padding: 18rpx 18rpx 8rpx;
position: absolute;
left: 40rpx;
bottom: 0;
background: #e04775;
border-radius: 11rpx 11rpx 0rpx 0rpx;
text-align: center;
.d-title {
font-size: 22rpx;
color: #ffffff;
font-weight: bold;
}
.ymd {
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
border-bottom: 2rpx solid rgba(255, 255, 255, 0.34);
}
.hm {
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
}
} }
} }
.inner { .inner {
padding: 32rpx 34rpx; padding: 32rpx 34rpx;
background-color: #fff; background-color: #fff;
border-radius: 0 0 24rpx 24rpx; border-radius: 0 0 24rpx 24rpx;
.tag {
margin-bottom: 16rpx;
width: 112rpx;
height: 36rpx;
font-size: 22rpx;
color: #ffffff;
line-height: 36rpx;
text-align: center;
background: #ffc137;
border-radius: 8rpx;
}
.title { .title {
font-size: 32rpx; font-size: 32rpx;
color: #252525; color: rgba(33, 29, 46, 1);
font-weight: bold; font-weight: bold;
.t-tag { line-height: 48rpx;
display: inline-block;
width: 112rpx;
height: 36rpx;
font-size: 22rpx;
color: #ffffff;
line-height: 36rpx;
text-align: center;
background: #e04775;
border-radius: 8rpx;
margin-right: 1em;
}
} }
.content { .labels {
margin-top: 20rpx; margin-top: 16rpx;
display: flex; max-width: 56vw;
justify-content: space-between; font-size: 28rpx;
align-items: center; color: rgba(105, 104, 110, 1);
.labels { white-space: nowrap;
display: flex; text-overflow: ellipsis;
align-items: center; overflow: hidden;
flex-wrap: wrap; .line {
.label { margin: 0 4rpx;
margin-right: 16rpx; vertical-align: baseline;
margin-bottom: 16rpx; display: inline-block;
padding: 2rpx 20rpx; width: 1px;
font-size: 22rpx; height: 24rpx;
color: #e04775; background-color: rgba(105, 104, 110, 0.2);
border-radius: 18rpx;
background-color: rgba(224, 71, 117, 0.13);
word-break: break-all;
}
}
.people {
color: #9e9e9e;
font-size: 22rpx;
} }
} }
.footer { .footer {
@ -149,162 +83,26 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.site { .people {
font-size: 22rpx;
color: #bebebe;
}
.btn {
margin-left: 10rpx;
flex-shrink: 0; flex-shrink: 0;
padding: 4rpx 36rpx; color: rgba(173, 172, 178, 1);
font-size: 28rpx; font-size: 28rpx;
color: #ffffff;
background: #e04775;
border-radius: 24rpx;
&.active {
color: #484848;
background-color: #e7e7e7;
}
.icon {
width: 24rpx;
height: 24rpx;
}
}
}
}
}
.off-list-item {
margin-bottom: 20rpx;
background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx;
border: 2rpx solid #ebecee;
.photo-wrap {
position: relative;
.photo {
border-radius: 24rpx 24rpx 0 0;
display: block;
width: 100%;
height: 388rpx;
}
.status {
padding: 6rpx 32rpx;
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
background: linear-gradient(90deg, #e5e9f5 0%, #fde4ec 100%);
border-radius: 24rpx 0rpx 24rpx 0rpx;
font-size: 28rpx;
color: #e04775;
.dot {
margin-right: 8rpx;
width: 13rpx;
height: 13rpx;
border-radius: 50%;
background-color: #e04775;
}
&.bad {
color: #484848;
background: #e6e6e6;
.dot {
display: none;
}
}
}
.date {
padding: 18rpx 18rpx 8rpx;
position: absolute;
left: 40rpx;
bottom: 0;
background: #e04775;
border-radius: 11rpx 11rpx 0rpx 0rpx;
text-align: center;
.d-title {
font-size: 22rpx;
color: #ffffff;
font-weight: bold;
}
.ymd {
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
border-bottom: 2rpx solid rgba(255, 255, 255, 0.34);
}
.hm {
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
}
}
}
.inner {
padding: 32rpx 34rpx;
background-color: #fff;
border-radius: 0 0 24rpx 24rpx;
.tag {
margin-bottom: 16rpx;
width: 112rpx;
height: 36rpx;
font-size: 22rpx;
color: #ffffff;
line-height: 36rpx;
text-align: center;
background: #ffc137;
border-radius: 8rpx;
}
.title {
font-size: 32rpx;
color: #252525;
font-weight: bold;
}
.content {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
.labels {
display: flex;
align-items: center;
flex-wrap: wrap;
.label {
margin-right: 16rpx;
margin-bottom: 16rpx;
padding: 2rpx 20rpx;
font-size: 22rpx;
color: #e04775;
border-radius: 18rpx;
background-color: rgba(224, 71, 117, 0.13);
word-break: break-all;
}
}
.people {
color: #9e9e9e;
font-size: 22rpx;
}
}
.footer {
margin-top: 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
.site {
font-size: 22rpx;
color: #bebebe;
} }
.btn { .btn {
margin-left: 10rpx; margin-left: 10rpx;
flex-shrink: 0; flex-shrink: 0;
padding: 4rpx 36rpx; padding: 18rpx 36rpx;
font-size: 28rpx; font-size: 30rpx;
line-height: 1;
color: #ffffff; color: #ffffff;
background: #e04775; background: linear-gradient(to right, #c690fd, #d79ffc);
border-radius: 24rpx; border-radius: 80rpx;
min-width: 182rpx;
box-sizing: border-box;
text-align: center;
&.active { &.active {
color: #484848; color: #484848;
background-color: #e7e7e7; background: #e7e7e7;
} }
.icon { .icon {
width: 24rpx; width: 24rpx;

13
src/patient/pages/myLive/index.ts

@ -29,7 +29,7 @@ Page({
dateValue: dayjs().valueOf(), dateValue: dayjs().valueOf(),
}) })
}, 1000) }, 1000)
app.zdWaitLogin().then(() => { app.waitLogin({ type: [1] }).then(() => {
this.getConfig() this.getConfig()
app.getZdUserInfo(this, true) app.getZdUserInfo(this, true)
}) })
@ -103,7 +103,7 @@ Page({
}, },
handleDetail(e) { handleDetail(e) {
const { id } = e.currentTarget.dataset const { id } = e.currentTarget.dataset
const {active} = this.data const { active } = this.data
if (active == 0) { if (active == 0) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTSIGNEDUPACTIVITIESALLLIST' }) app.zdMpBehavior({ PageName: 'BTN_PATIENTSIGNEDUPACTIVITIESALLLIST' })
} }
@ -123,4 +123,13 @@ Page({
this.getList(page + 1) this.getList(page + 1)
} }
}, },
handleBack() {
wx.navigateBack({
fail() {
wx.reLaunch({
url: '/patient/pages/index/index',
})
},
})
},
}) })

204
src/patient/pages/myLive/index.wxml

@ -1,162 +1,62 @@
<view class="page"> <navbar fixed title="我报名的活动" custom-style="background:{{background}}">
<view class="sticky"> <van-icon name="arrow-left" slot="left" color="#000" bind:tap="handleBack" />
<van-tabs </navbar>
wx:if="{{online_open_status==1 && offline_open_status==1}}"
class="navbar" <view
active="{{ active }}" class="page"
bind:change="tabChange" style="background: url('/images/bg10.png') no-repeat top center/100% 410rpx;padding-top:{{pageTop+22}}px;"
title-inactive-color="#9E9E9E" >
title-active-color="#484848"
line-width="{{17}}"
line-height="{{4}}"
color="#E04775"
tab-class="tab"
tab-active-class="tab-active"
>
<van-tab title="全部"></van-tab>
<van-tab title="线上活动"></van-tab>
<van-tab title="线下活动"></van-tab>
</van-tabs>
</view>
<view class="allin-list"> <view class="allin-list">
<block wx:for="{{list}}" wx:key="Id"> <view class="list-item" wx:for="{{list}}" bind:tap="handleDetail" data-id="{{item.Id}}" wx:key="index">
<view class="on-list-item" wx:if="{{item.Type==1}}" bind:tap="handleDetail" data-id="{{item.Id}}"> <view class="photo-wrap">
<view class="photo-wrap"> <image class="photo" mode="aspectFill" src="{{item.IntroductionUrl}}"></image>
<image class="photo" mode="aspectFill" src="{{item.IntroductionUrl}}"></image> <view class="sign" wx:if="{{item.SignUpStatus==2}}">已报名</view>
<view class="status {{item.Status != 2 && 'bad'}}">
<view class="dot"></view>
{{liveStatus[item.Status]}}
</view>
<!-- <view class="date"> -->
<!-- <view class="d-title"> -->
<!-- <van-icon class="icon" name="play" /> -->
<!-- 会议时间 -->
<!-- </view> -->
<!-- <block wx:if="{{item.isDay}}"> -->
<!-- <view class="ymd">{{item.BeginDate}}</view> -->
<!-- <view class="hm">{{item.BeginHm}}-{{item.EndHm}}</view> -->
<!-- </block> -->
<!-- <block wx:else> -->
<!-- <view class="ymd">{{item.BeginTime}}</view> -->
<!-- <view class="hm">{{item.EndTime}}</view> -->
<!-- </block> -->
<!-- </view> -->
</view>
<view class="inner">
<view class="tag" wx:if="{{active==0}}">线上活动</view>
<view class="title">{{item.Name}}</view>
<view class="content">
<view class="labels">
<view class="label" wx:for="{{item.Labels}}" wx:for-item="label" wx:key="index">{{label}}</view>
</view>
<view class="people" wx:if="{{~~item.SignUpPeopleNum}}">{{item.SignUpPeopleNum}}人已报名</view>
</view>
<view class="footer">
<view class="site">{{item.MasterName}} {{item.MasterTitle}}</view>
<view class="btn active" wx:if="{{ item.Status==99}}">已取消</view>
<view class="btn active" wx:elif="{{ item.Status==100}}">已删除</view>
<view class="btn" wx:elif="{{item.Status==3 && item.ReplayVideoUrl}}">看回放</view>
<view class="btn active" wx:elif="{{item.Status==3 && !item.ReplayVideoUrl}}">回放生成中</view>
<block wx:elif="{{item.IsSignUp==1 && zdUserInfo.AuditStatus}}">
<block wx:if="{{zdUserInfo.AuditStatus == 1 || zdUserInfo.AuditStatus == 3 || zdUserInfo.AuditStatus == 4}}">
<view class="btn active" wx:if="{{item.SignUpStatus==1}}">审核中</view>
<block wx:elif="{{item.SignUpStatus==2}}">
<view class="btn" wx:if="{{item.BeginTimeValue * 1 < dateValue * 1}}">参会</view>
<view class="btn active" wx:else>已报名</view>
</block>
<block wx:elif="{{item.SignUpStatus==3}}">
<view
class="btn active"
wx:if="{{item.IsLimitUser==1 && item.SignUpPeopleNum * 1 >= item.LimitPeopleNum * 1}}"
>
已满额
</view>
</block>
</block>
</block>
<block wx:else>
<view
class="btn active"
wx:if="{{item.IsLimitUser==1 && item.SignUpPeopleNum * 1 >= item.LimitPeopleNum * 1}}"
>
已满额
</view>
<view class="btn active" wx:elif="{{item.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view>
<view class="btn" wx:else>报名</view>
</block>
</view>
</view>
</view> </view>
<view class="off-list-item" wx:elif="{{item.Type==2}}" bind:tap="handleDetail" data-id="{{item.Id}}"> <view class="inner">
<view class="photo-wrap"> <view class="title">{{item.Name}}</view>
<image class="photo" mode="aspectFill" src="{{item.IntroductionUrl}}"></image> <view class="labels" wx:if="{{item.doctorName}}">
<view class="status {{item.Status != 2 && 'bad'}}"> {{item.doctorName}}
<view class="dot"></view> <text class="line" wx:if="{{item.MasterHosipital}}"></text>
{{activityStatus[item.Status]}} {{item.MasterHosipital}}
</view>
<!-- <view class="date"> -->
<!-- <view class="d-title"> -->
<!-- <van-icon name="play" /> -->
<!-- 活动时间 -->
<!-- </view> -->
<!-- <block wx:if="{{item.isDay}}"> -->
<!-- <view class="ymd">{{item.BeginDate}}</view> -->
<!-- <view class="hm">{{item.BeginHm}}-{{item.EndHm}}</view> -->
<!-- </block> -->
<!-- <block wx:else> -->
<!-- <view class="ymd">{{item.BeginTime}}</view> -->
<!-- <view class="hm">{{item.EndTime}}</view> -->
<!-- </block> -->
<!-- </view> -->
</view> </view>
<view class="inner"> <view class="footer">
<view class="tag" wx:if="{{active==0}}">线下活动</view> <view class="people" wx:if="{{item.SignUpPeopleNum * 1}}">{{item.SignUpPeopleNum}}人已报名</view>
<view class="title">{{item.Name}}</view> <view class="btn active" wx:if="{{ item.Status==99}}">已取消</view>
<view class="content"> <view class="btn active" wx:elif="{{ item.Status==100}}">已删除</view>
<view class="labels"> <view class="btn" wx:elif="{{item.Status==3 && item.ReplayVideoUrl}}">看回放</view>
<view class="label" wx:for="{{item.Labels}}" wx:for-item="label" wx:key="index">{{label}}</view> <view class="btn active" wx:elif="{{item.Status==3 && !item.ReplayVideoUrl}}">回放生成中</view>
</view> <block wx:elif="{{item.IsSignUp==1 && zdUserInfo.AuditStatus}}">
<view class="people" wx:if="{{~~item.SignUpPeopleNum}}">{{item.SignUpPeopleNum}}人已报名</view> <block
</view> wx:if="{{zdUserInfo.AuditStatus == 1 || zdUserInfo.AuditStatus == 3 || zdUserInfo.AuditStatus == 4}}"
<view class="footer"> >
<view class="site"> <view class="btn active" wx:if="{{item.SignUpStatus==1}}">审核中</view>
<view>{{item.Location}}</view> <block wx:elif="{{item.SignUpStatus==2}}">
<view>{{item.Distance}}</view> <view class="btn" wx:if="{{item.BeginTimeValue * 1 < dateValue * 1}}">参会</view>
</view> <view class="btn active" wx:else>已报名</view>
<view class="btn active" wx:if="{{ item.Status==3}}">已结束</view> </block>
<view class="btn active" wx:elif="{{ item.Status==99}}">已取消</view> <block wx:elif="{{item.SignUpStatus==3}}">
<view class="btn active" wx:elif="{{ item.Status==100}}">已删除</view> <view
<block wx:elif="{{item.IsSignUp==1 && zdUserInfo.AuditStatus}}"> class="btn active"
<block wx:if="{{zdUserInfo.AuditStatus == 1 || zdUserInfo.AuditStatus == 3 || zdUserInfo.AuditStatus == 4}}"> wx:if="{{item.IsLimitUser==1 && item.SignUpPeopleNum * 1 >= item.LimitPeopleNum * 1}}"
<view class="btn active" wx:if="{{item.SignUpStatus==1}}">审核中</view> >
<block wx:elif="{{item.SignUpStatus==2}}"> 已满额
<view class="btn" wx:if="{{item.BeginTimeValue * 1 < dateValue * 1}}">已报名</view> </view>
<view class="btn active" wx:else>已报名</view>
</block>
<block wx:elif="{{item.SignUpStatus==3}}">
<view
class="btn active"
wx:if="{{item.IsLimitUser==1 && item.SignUpPeopleNum * 1 >= item.LimitPeopleNum * 1}}"
>
已满额
</view>
</block>
</block> </block>
</block> </block>
<block wx:else> </block>
<view <block wx:else>
class="btn active" <view
wx:if="{{item.IsLimitUser==1 && item.SignUpPeopleNum * 1 >= item.LimitPeopleNum * 1}}" class="btn active"
> wx:if="{{item.IsLimitUser==1 && item.SignUpPeopleNum * 1 >= item.LimitPeopleNum * 1}}"
已满额 >
</view> 已满额
<view class="btn active" wx:elif="{{item.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view> </view>
<view class="btn" wx:else>报名</view> <view class="btn active" wx:elif="{{item.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view>
</block> <view class="btn" wx:else>报名</view>
</view> </block>
</view> </view>
</view> </view>
</block> </view>
</view> </view>
<pagination pagination="{{pagination}}"></pagination> <pagination pagination="{{pagination}}"></pagination>
</view> </view>

3
src/patient/pages/mySave/index.json

@ -1,9 +1,10 @@
{ {
"navigationBarTitleText": "我的收藏", "navigationBarTitleText": "我的收藏",
"navigationStyle": "default", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"van-tab": "@vant/weapp/tab/index", "van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index", "van-tabs": "@vant/weapp/tabs/index",
"navbar": "/components/navbar/index",
"van-icon": "@vant/weapp/icon/index" "van-icon": "@vant/weapp/icon/index"
} }
} }

254
src/patient/pages/mySave/index.scss

@ -1,3 +1,7 @@
page {
background-color: rgba(246, 248, 249, 1);
}
.page { .page {
padding-bottom: 120rpx; padding-bottom: 120rpx;
.sticky { .sticky {
@ -22,187 +26,54 @@
margin: 32rpx 30rpx; margin: 32rpx 30rpx;
padding: 24rpx; padding: 24rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx; border-radius: 24rpx;
border: 2rpx solid #ebecee;
.list-item { .list-item {
display: flex; display: flex;
margin-bottom: 22rpx; margin-bottom: 22rpx;
border-bottom: 1rpx dotted rgba(39, 58, 101, 0.2);
&:last-of-type{
border: none;
}
.photo { .photo {
width: 232rpx; width: 210rpx;
height: 184rpx; height: 140rpx;
flex-shrink: 0; flex-shrink: 0;
border-radius: 16rpx; border-radius: 16rpx;
border: 1rpx solid #ebecee;
margin-right: 16rpx; margin-right: 16rpx;
} }
.inner { .inner {
flex: 1; flex: 1;
padding-bottom: 20rpx; padding-bottom: 20rpx;
border-bottom: 1rpx solid rgba(182, 183, 186, 0.21);
.title { .title {
font-size: 28rpx; font-size: 32rpx;
color: #252525; color: rgba(33, 29, 46, 1);
font-weight: bold; font-weight: bold;
line-height: 42rpx; line-height: 42rpx;
} }
.date { .date {
margin-top: 10rpx; margin-top: 12rpx;
color: #9e9e9e; color: rgba(173, 172, 178, 1);
font-size: 22rpx; font-size: 28rpx;
}
.labels {
margin-top: 16rpx;
display: flex;
flex-wrap: wrap;
align-items: center;
.label {
margin-right: 16rpx;
margin-bottom: 10rpx;
padding: 2rpx 20rpx;
font-size: 22rpx;
color: #e04775;
word-break: break-all;
border-radius: 18rpx;
background-color: rgba(224, 71, 117, 0.13);
}
}
.footer {
margin-top: 10rpx;
display: flex;
justify-content: flex-end;
.f-item {
display: flex;
align-items: center;
font-size: 22rpx;
color: #b6b7ba;
.icon {
margin-right: 8rpx;
width: 32rpx;
height: 32rpx;
}
&.active {
color: #e04775;
}
&::after {
margin: 18rpx;
content: "";
width: 2rpx;
height: 20rpx;
background-color: #f3f3f4;
}
}
.share {
padding: 0;
background-color: transparent;
margin: 0;
&::after {
border: none;
outline: none;
}
}
}
}
}
}
.video-list {
margin: 32rpx 30rpx;
.list-item {
margin-bottom: 20rpx;
background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx;
border: 2rpx solid #ebecee;
.photo {
position: relative;
border-radius: 24rpx 24rpx 0 0;
display: block;
width: 100%;
height: 388rpx;
overflow: hidden;
.video {
border-radius: inherit;
width: 100%;
height: 100%;
}
.poster {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: inherit;
}
.play {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 104rpx;
height: 104rpx;
}
}
.inner {
padding: 32rpx 34rpx 28rpx;
background-color: #fff;
border-radius: 0 0 24rpx 24rpx;
.title {
font-size: 32rpx;
color: #252525;
font-weight: bold;
}
.content {
margin-top: 22rpx;
padding-bottom: 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #ebecee;
.labels {
display: flex;
flex-wrap: wrap;
align-items: center;
.label {
margin-right: 16rpx;
margin-bottom: 10rpx;
padding: 2rpx 20rpx;
font-size: 22rpx;
color: #e04775;
word-break: break-all;
border-radius: 18rpx;
background-color: rgba(224, 71, 117, 0.13);
}
}
.date {
color: #9e9e9e;
font-size: 22rpx;
}
} }
.footer { .footer {
margin-top: 28rpx; margin-top: 20rpx;
display: flex; display: flex;
justify-content: space-around; gap: 48rpx;
.f-item { .f-item {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 22rpx; gap: 8rpx;
color: #b6b7ba; font-size: 28rpx;
color: rgba(105, 104, 110, 1);
line-height: 1;
.icon { .icon {
margin-right: 8rpx; margin-right: 8rpx;
width: 32rpx; width: 36rpx;
height: 32rpx; height: 36rpx;
} }
&.active { &.active {
color: #e04775; color: #e04775;
} }
&::after {
margin: 18rpx;
content: "";
width: 2rpx;
height: 20rpx;
background-color: #f3f3f4;
}
} }
.share { .share {
padding: 0; padding: 0;
@ -213,80 +84,11 @@
outline: none; outline: none;
} }
} }
} .line {
} margin: 18rpx;
} width: 2rpx;
} height: 20rpx;
background-color: #f3f3f4;
.question-list {
margin: 32rpx 30rpx;
.row {
padding: 38rpx 32rpx;
display: flex;
background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx;
border: 2rpx solid #ebecee;
margin-bottom: 16rpx;
.num {
padding: 0 15rpx;
font-size: 28rpx;
color: #cf5375;
flex-shrink: 0;
height: 40rpx;
background: #ffffff linear-gradient(136deg, #e8ebfd 0%, #fde0ea 100%);
border-radius: 8rpx;
text-align: center;
line-height: 40rpx;
}
.wrap {
flex: 1;
color: #252525;
padding-left: 16rpx;
display: flex;
align-items: center;
justify-content: space-between;
.content {
flex: 1;
.c-title {
font-size: 28rpx;
color: #252525;
font-weight: bold;
}
.footer {
margin-top: 28rpx;
display: flex;
justify-content: flex-end;
.f-item {
display: flex;
align-items: center;
font-size: 22rpx;
color: #b6b7ba;
.icon {
margin-right: 8rpx;
width: 32rpx;
height: 32rpx;
}
&.active {
color: #e04775;
}
&:not(:last-of-type)::after {
margin: 18rpx;
content: "";
width: 2rpx;
height: 20rpx;
background-color: #f3f3f4;
}
}
.share {
padding: 0;
background-color: transparent;
margin: 0;
&::after {
border: none;
outline: none;
}
}
} }
} }
} }

175
src/patient/pages/mySave/index.ts

@ -1,5 +1,5 @@
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
const licia = require('miniprogram-licia'); const licia = require('miniprogram-licia')
Page({ Page({
data: { data: {
@ -23,10 +23,10 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
config: res, config: res,
}); })
this.getConfig(); this.getConfig()
}); })
}); })
}, },
getConfig() { getConfig() {
wx.ajax({ wx.ajax({
@ -38,28 +38,28 @@ Page({
picTextStatus: res.picTextStatus, picTextStatus: res.picTextStatus,
videoStatus: res.videoStatus, videoStatus: res.videoStatus,
active: res.picTextStatus == 0 ? 1 : 0, active: res.picTextStatus == 0 ? 1 : 0,
}); })
this.getList(); this.getList()
}); })
}, },
getList() { getList() {
const { active, pagination } = this.data; const { active, pagination } = this.data
if (active == 0) { if (active == 0) {
this.getInfoList(); this.getInfoList()
} else if (active == 1) { } else if (active == 1) {
this.getVideoList(); this.getVideoList()
} else if (active == 2) { } else if (active == 2) {
this.getQuestionList(); this.getQuestionList()
} }
if (active == 0 && pagination.page == 1) { if (active == 0 && pagination.page == 1) {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_KNOWLEDGEBASE' }); app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_KNOWLEDGEBASE' })
} }
if (active == 1 && pagination.page == 1) { if (active == 1 && pagination.page == 1) {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_VIDEOCLASS' }); app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_VIDEOCLASS' })
} }
if (active == 2 && pagination.page == 1) { if (active == 2 && pagination.page == 1) {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_HEALTHQA' }); app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_HEALTHQA' })
} }
}, },
getInfoList(newPage = 1) { getInfoList(newPage = 1) {
@ -72,9 +72,9 @@ Page({
loading: true, loading: true,
}).then((res) => { }).then((res) => {
res.list = res.list.map((item) => { res.list = res.list.map((item) => {
return item; return item
}); })
const list = res.page == 1 ? res.list : [...this.data.list, ...res.list]; const list = res.page == 1 ? res.list : [...this.data.list, ...res.list]
this.setData({ this.setData({
list, list,
pagination: { pagination: {
@ -82,8 +82,8 @@ Page({
pages: res.pages, pages: res.pages,
count: res.count, count: res.count,
}, },
}); })
}); })
}, },
getVideoList(newPage = 1) { getVideoList(newPage = 1) {
wx.ajax({ wx.ajax({
@ -95,9 +95,9 @@ Page({
loading: true, loading: true,
}).then((res) => { }).then((res) => {
res.list = res.list.map((item) => { res.list = res.list.map((item) => {
return item; return item
}); })
const list = res.page == 1 ? res.list : [...this.data.list, ...res.list]; const list = res.page == 1 ? res.list : [...this.data.list, ...res.list]
this.setData({ this.setData({
list, list,
pagination: { pagination: {
@ -105,8 +105,8 @@ Page({
pages: res.pages, pages: res.pages,
count: res.count, count: res.count,
}, },
}); })
}); })
}, },
getQuestionList(newPage = 1) { getQuestionList(newPage = 1) {
wx.ajax({ wx.ajax({
@ -118,9 +118,9 @@ Page({
loading: true, loading: true,
}).then((res) => { }).then((res) => {
res.list = res.list.map((item) => { res.list = res.list.map((item) => {
return item; return item
}); })
const list = res.page == 1 ? res.list : [...this.data.list, ...res.list]; const list = res.page == 1 ? res.list : [...this.data.list, ...res.list]
this.setData({ this.setData({
list, list,
pagination: { pagination: {
@ -128,11 +128,11 @@ Page({
pages: res.pages, pages: res.pages,
count: res.count, count: res.count,
}, },
}); })
}); })
}, },
handleStar(e) { handleStar(e) {
const { id, index } = e.currentTarget.dataset; const { id, index } = e.currentTarget.dataset
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/pic-text/compliment', url: '?r=zd/pic-text/compliment',
@ -144,11 +144,11 @@ Page({
this.setData({ this.setData({
[`list[${index}].IsCompliment`]: 1, [`list[${index}].IsCompliment`]: 1,
[`list[${index}].ComplimentNum`]: Number(this.data.list[index].ComplimentNum) + 1, [`list[${index}].ComplimentNum`]: Number(this.data.list[index].ComplimentNum) + 1,
}); })
}); })
}, },
handleVideoStar(e: WechatMiniprogram.CustomEvent) { handleVideoStar(e: WechatMiniprogram.CustomEvent) {
const { id, index } = e.currentTarget.dataset; const { id, index } = e.currentTarget.dataset
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/video/compliment', url: '?r=zd/video/compliment',
@ -160,24 +160,24 @@ Page({
this.setData({ this.setData({
[`list[${index}].ComplimentNum`]: Number(this.data.list[index].ComplimentNum) + 1, [`list[${index}].ComplimentNum`]: Number(this.data.list[index].ComplimentNum) + 1,
[`list[${index}].IsCompliment`]: 1, [`list[${index}].IsCompliment`]: 1,
}); })
}); })
}, },
handleVideoPlay(e: WechatMiniprogram.CustomEvent) { handleVideoPlay(e: WechatMiniprogram.CustomEvent) {
const { id, index } = e.currentTarget.dataset; const { id, index } = e.currentTarget.dataset
const { list } = this.data; const { list } = this.data
list.map((item: any, i) => { list.map((item: any, i) => {
if (item.play && i != index) { if (item.play && i != index) {
const ctx = wx.createVideoContext(`video${i}`); const ctx = wx.createVideoContext(`video${i}`)
ctx.pause(); ctx.pause()
this.setData({ this.setData({
[`list[${index}].play`]: false, [`list[${index}].play`]: false,
}); })
} }
}); })
this.setData({ this.setData({
[`list[${index}].play`]: true, [`list[${index}].play`]: true,
}); })
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/video/view', url: '?r=zd/video/view',
@ -187,13 +187,13 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
HistoryId: res.HistoryId, HistoryId: res.HistoryId,
}); })
}); })
}, },
handleVideo(e: WechatMiniprogram.CustomEvent) { handleVideo(e: WechatMiniprogram.CustomEvent) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
const context = wx.createVideoContext(`video${index}`); const context = wx.createVideoContext(`video${index}`)
context.play(); context.play()
}, },
handleVideoTime: licia.throttle(function (e: WechatMiniprogram.CustomEvent) { handleVideoTime: licia.throttle(function (e: WechatMiniprogram.CustomEvent) {
wx.ajax({ wx.ajax({
@ -204,38 +204,38 @@ Page({
WatchDuration: e.detail.currentTime, WatchDuration: e.detail.currentTime,
}, },
}).then((res) => { }).then((res) => {
console.log('res: ', res); console.log('res: ', res)
}); })
}, 5000), }, 5000),
handleVideoPause(e: WechatMiniprogram.CustomEvent) { handleVideoPause(e: WechatMiniprogram.CustomEvent) {
console.log(e); console.log(e)
}, },
handleDetail(e: WechatMiniprogram.CustomEvent) { handleDetail(e: WechatMiniprogram.CustomEvent) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset
if (this.data.config.picTextEbookStatus == 1) { if (this.data.config.picTextEbookStatus == 1) {
const webviewUrl = encodeURIComponent( const webviewUrl = encodeURIComponent(
`${app.globalData.url}/zdcare/#/book?loginState=${app.globalData.loginState}&Id=${id}`, `${app.globalData.url}/zdcare/#/book?loginState=${app.globalData.loginState}&Id=${id}`,
); )
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/webview/index?url=${webviewUrl}`, url: `/patient/pages/webview/index?url=${webviewUrl}`,
}); })
} else { } else {
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/repositoryDetail/index?id=${id}`, url: `/patient/pages/repositoryDetail/index?id=${id}`,
}); })
} }
}, },
handleQuestionDetail(e) { handleQuestionDetail(e) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset
const webviewUrl = encodeURIComponent( const webviewUrl = encodeURIComponent(
`${app.globalData.url}/zdcare/#/info-detail?loginState=${app.globalData.loginState}&Id=${id}`, `${app.globalData.url}/zdcare/#/info-detail?loginState=${app.globalData.loginState}&Id=${id}`,
); )
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/webview/index?url=${webviewUrl}`, url: `/patient/pages/webview/index?url=${webviewUrl}`,
}); })
}, },
handleVideoToggleSave(e: WechatMiniprogram.CustomEvent) { handleVideoToggleSave(e: WechatMiniprogram.CustomEvent) {
const { id, collect, index } = e.currentTarget.dataset; const { id, collect, index } = e.currentTarget.dataset
if (collect == 1) { if (collect == 1) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -248,12 +248,12 @@ Page({
wx.showToast({ wx.showToast({
title: '取消收藏', title: '取消收藏',
icon: 'none', icon: 'none',
}); })
this.setData({ this.setData({
[`list[${index}].IsCollect`]: 0, [`list[${index}].IsCollect`]: 0,
[`list[${index}].CollectionPeopleNum`]: Number(this.data.list[index].CollectionPeopleNum) - 1, [`list[${index}].CollectionPeopleNum`]: Number(this.data.list[index].CollectionPeopleNum) - 1,
}); })
}); })
} else { } else {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -266,22 +266,22 @@ Page({
wx.showToast({ wx.showToast({
title: '收藏成功', title: '收藏成功',
icon: 'none', icon: 'none',
}); })
this.setData({ this.setData({
[`list[${index}].IsCollect`]: 1, [`list[${index}].IsCollect`]: 1,
[`list[${index}].CollectionPeopleNum`]: Number(this.data.list[index].CollectionPeopleNum) + 1, [`list[${index}].CollectionPeopleNum`]: Number(this.data.list[index].CollectionPeopleNum) + 1,
}); })
}); })
} }
}, },
onReachBottom() { onReachBottom() {
const { page, pages } = this.data.pagination; const { page, pages } = this.data.pagination
const { active } = this.data; const { active } = this.data
if (pages > page) { if (pages > page) {
if (active == 0) { if (active == 0) {
this.getInfoList(page + 1); this.getInfoList(page + 1)
} else { } else {
this.getVideoList(page + 1); this.getVideoList(page + 1)
} }
} }
}, },
@ -296,14 +296,23 @@ Page({
pages: 1, pages: 1,
count: 1, count: 1,
}, },
}); })
this.getList(); this.getList()
},
handleBack() {
wx.navigateBack({
fail() {
wx.reLaunch({
url: '/patient/pages/index/index',
})
},
})
}, },
onShareAppMessage(e: any) { onShareAppMessage(e: any) {
if (e.from === 'button') { if (e.from === 'button') {
const { id, index, type } = e.target.dataset; const { id, index, type } = e.target.dataset
const { list } = this.data; const { list } = this.data
const { Title, TitlePicLink, ImageUrl } = list[index]; const { Title, TitlePicLink, ImageUrl } = list[index]
if (type == 'info') { if (type == 'info') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -312,13 +321,13 @@ Page({
}).then(() => { }).then(() => {
this.setData({ this.setData({
[`list[${index}].ShareNum`]: Number(this.data.list[index].ShareNum) + 1, [`list[${index}].ShareNum`]: Number(this.data.list[index].ShareNum) + 1,
}); })
}); })
return { return {
title: Title, title: Title,
path: `/patient/pages/repositoryDetail/index?id=${id}`, path: `/patient/pages/repositoryDetail/index?id=${id}`,
imageUrl: TitlePicLink, imageUrl: TitlePicLink,
}; }
} else { } else {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -327,19 +336,19 @@ Page({
}).then(() => { }).then(() => {
this.setData({ this.setData({
[`list[${index}].ShareNum`]: Number(this.data.list[index].ShareNum) + 1, [`list[${index}].ShareNum`]: Number(this.data.list[index].ShareNum) + 1,
}); })
}); })
return { return {
title: Title, title: Title,
path: `/patient/pages/repository/index?id=${id}&active=1&title=${Title}`, path: `/patient/pages/repository/index?id=${id}&active=1&title=${Title}`,
imageUrl: ImageUrl, imageUrl: ImageUrl,
}; }
} }
} else { } else {
return { return {
title: '知识库', title: '知识库',
path: '/patient/pages/repository/index', path: '/patient/pages/repository/index',
}; }
} }
}, },
}); })

172
src/patient/pages/mySave/index.wxml

@ -1,51 +1,18 @@
<view class="page"> <navbar fixed title="我报名的活动" custom-style="background:{{background}}">
<view class="sticky"> <van-icon name="arrow-left" slot="left" color="#000" bind:tap="handleBack" />
<van-tabs </navbar>
wx:if="{{picTextStatus==1 && videoStatus==1}}"
class="navbar" <view
active="{{ active }}" class="page"
bind:change="tabChange" style="background: url('/images/bg10.png') no-repeat top center/100% 410rpx;padding-top:{{pageTop+12}}px;"
title-inactive-color="#9E9E9E" >
title-active-color="#484848"
line-width="{{17}}"
line-height="{{4}}"
color="#E04775"
tab-class="tab"
tab-active-class="tab-active"
>
<van-tab title="知识库"></van-tab>
<van-tab title="视频课堂"></van-tab>
<van-tab title="健康问答"></van-tab>
</van-tabs>
</view>
<view class="info-list" wx:if="{{active==0 && list.length}}"> <view class="info-list" wx:if="{{active==0 && list.length}}">
<view class="list-item" wx:for="{{list}}" bind:tap="handleDetail" data-id="{{item.Id}}"> <view class="list-item" wx:for="{{list}}" bind:tap="handleDetail" data-id="{{item.Id}}">
<image src="{{item.TitlePicLink}}" class="photo"></image> <image src="{{item.TitlePicLink}}" class="photo"></image>
<view class="inner"> <view class="inner">
<view class="title">{{item.Title}}</view> <view class="title">{{item.Title}}</view>
<view class="date">{{item.UpdatedAt}}</view> <view class="date">{{item.UpdatedAt}}</view>
<view class="labels">
<view class="label" wx:for="{{item.Labels}}" wx:for-item="label">{{label}}</view>
</view>
<view class="footer"> <view class="footer">
<view class="f-item">
<image class="icon" src="{{imageUrl}}za-images/1/view.png?t={{Timestamp}}"></image>
<block wx:if="{{~~item.OpenNum + ~~item.BasicNum}}">{{~~item.OpenNum + ~~item.BasicNum}}</block>
</view>
<view
class="f-item {{item.IsCompliment==1 && 'active'}}"
catch:tap="handleStar"
data-id="{{item.Id}}"
data-index="{{index}}"
>
<image
class="icon"
wx:if="{{item.IsCompliment==1}}"
src="{{imageUrl}}za-images/1/star-active.png?t={{Timestamp}}"
></image>
<image class="icon" wx:else src="{{imageUrl}}za-images/1/star.png?t={{Timestamp}}"></image>
<block wx:if="{{~~item.ComplimentNum}}">{{item.ComplimentNum}}</block>
</view>
<button <button
class="f-item share" class="f-item share"
open-type="share" open-type="share"
@ -54,131 +21,14 @@
data-index="{{index}}" data-index="{{index}}"
catch:tap="handleShare" catch:tap="handleShare"
> >
<image class="icon" src="{{imageUrl}}za-images/1/share.png?t={{Timestamp}}"></image> <image class="icon" src="/images/icon39.png"></image>
<block wx:if="{{~~item.ShareNum}}">{{item.ShareNum}}</block> <block wx:if="{{~~item.ShareNum}}">{{item.ShareNum}}</block>
</button> </button>
</view> <view class="line"></view>
</view>
</view>
</view>
<view class="video-list" wx:elif="{{active==1 && list.length}}">
<view class="list-item" wx:for="{{list}}" wx:key="{{item.Id}}">
<view class="photo">
<video
class="video"
id="video{{index}}"
src="{{item.SrcUrl}}"
bindplay="handleVideoPlay"
bindtimeupdate="handleVideoTime"
data-id="{{item.Id}}"
data-index="{{index}}"
></video>
<block wx:if="{{!item.play}}">
<image class="poster" mode="widthFix" src="{{item.ImageUrl}}"></image>
<image
class="play"
src="{{imageUrl}}za-images/1/video-play.png?t={{Timestamp}}"
bind:tap="handleVideo"
data-index="{{index}}"
></image>
</block>
</view>
<view class="inner">
<view class="title">{{item.Title}}</view>
<view class="content">
<view class="labels">
<view class="label" wx:for="{{item.Labels}}" wx:for-item="label">{{label}}</view>
</view>
<view class="date">{{item.UpdatedAt}}</view>
</view>
<view class="footer">
<view class="f-item"> <view class="f-item">
<image class="icon" src="{{imageUrl}}za-images/1/view.png?t={{Timestamp}}"></image> <image class="icon" src="/images/icon40.png"></image>
<block wx:if="{{~~item.OpenNum + ~~item.BasicNum}}">{{~~item.OpenNum + ~~item.BasicNum}}</block> <block wx:if="{{~~item.OpenNum + ~~item.BasicNum}}">{{~~item.OpenNum + ~~item.BasicNum}}</block>
</view> </view>
<view
class="f-item {{item.IsCompliment==1 && 'active'}}"
catch:tap="handleVideoStar"
data-id="{{item.Id}}"
data-index="{{index}}"
>
<image
class="icon"
wx:if="{{item.IsCompliment==1}}"
src="{{imageUrl}}za-images/1/star-active.png?t={{Timestamp}}"
></image>
<image class="icon" wx:else src="{{imageUrl}}za-images/1/star.png?t={{Timestamp}}"></image>
<block wx:if="{{~~item.ComplimentNum}}">{{item.ComplimentNum}}</block>
</view>
<view
class="f-item {{item.IsCollect == 1 && 'active'}}"
catch:tap="handleVideoToggleSave"
data-id="{{item.Id}}"
data-collect="{{item.IsCollect}}"
data-index="{{index}}"
>
<image
class="icon"
wx:if="{{item.IsCollect == 1}}"
src="{{imageUrl}}za-images/1/save-active-plan.png?t={{Timestamp}}"
></image>
<image class="icon" wx:else src="{{imageUrl}}za-images/1/save.png?t={{Timestamp}}"></image>
<block wx:if="{{~~item.CollectionPeopleNum}}">{{item.CollectionPeopleNum}}</block>
</view>
<button
class="f-item share"
open-type="share"
data-id="{{item.Id}}"
data-type="video"
data-index="{{index}}"
catch:tap="handleShare"
>
<image class="icon" src="{{imageUrl}}za-images/1/share.png?t={{Timestamp}}"></image>
<block wx:if="{{~~item.ShareNum}}">{{item.ShareNum}}</block>
</button>
</view>
</view>
</view>
</view>
<view class="question-list" wx:elif="{{active==2 && list.length}}">
<view class="row" wx:for="{{list}}" wx:key="index" bind:tap="handleQuestionDetail" data-id="{{item.Id}}">
<view class="num">{{item.CateName}}</view>
<view class="wrap">
<view class="content">
<view class="c-title">{{ item.Title }}</view>
<view class="footer">
<view class="f-item">
<image class="icon" src="{{imageUrl}}za-images/1/view.png?t={{Timestamp}}"></image>
<block wx:if="{{~~item.OpenNum + ~~item.BasicNum}}">{{~~item.OpenNum + ~~item.BasicNum}}</block>
</view>
<view
class="f-item {{item.IsCompliment==1 && 'active'}}"
catch:tap="handleVideoStar"
data-id="{{item.Id}}"
data-index="{{index}}"
>
<image
class="icon"
wx:if="{{item.IsCompliment==1}}"
src="{{imageUrl}}za-images/1/star-active.png?t={{Timestamp}}"
></image>
<image class="icon" wx:else src="{{imageUrl}}za-images/1/star.png?t={{Timestamp}}"></image>
<block wx:if="{{~~item.ComplimentNum}}">{{item.ComplimentNum}}</block>
</view>
<!-- <button -->
<!-- class="f-item share" -->
<!-- open-type="share" -->
<!-- data-id="{{item.Id}}" -->
<!-- data-type="video" -->
<!-- data-index="{{index}}" -->
<!-- catch:tap="handleShare" -->
<!-- > -->
<!-- <image class="icon" src="{{imageUrl}}za-images/1/share.png?t={{Timestamp}}"></image> -->
<!-- <block wx:if="{{~~item.ShareNum}}">{{item.ShareNum}}</block> -->
<!-- </button> -->
</view>
</view> </view>
</view> </view>
</view> </view>

4
src/patient/pages/personalInformation/index.json

@ -1,6 +1,6 @@
{ {
"navigationBarTitleText": "治疗记录", "navigationBarTitleText": "个人信息",
"navigationStyle": "custom", "navigationStyle": "default",
"usingComponents": { "usingComponents": {
"navBar": "/components/zd-navBar/navBar", "navBar": "/components/zd-navBar/navBar",
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",

47
src/patient/pages/personalInformation/index.scss

@ -6,10 +6,6 @@
box-sizing: border-box; box-sizing: border-box;
.banner-new { .banner-new {
padding: 38rpx 30rpx;
background-color: #fff;
border-radius: 24rpx;
box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.09);
.row { .row {
margin-top: 48rpx; margin-top: 48rpx;
&:first-of-type { &:first-of-type {
@ -21,8 +17,12 @@
justify-content: space-between; justify-content: space-between;
.label { .label {
font-size: 32rpx; font-size: 32rpx;
color: #283031; color: rgba(33, 29, 46, 1);
font-weight: bold; font-weight: bold;
.sub {
color: rgba(105, 104, 110, 1);
font-weight: normal;
}
} }
.change-phone { .change-phone {
font-size: 32rpx; font-size: 32rpx;
@ -32,10 +32,9 @@
.row-content { .row-content {
padding-top: 24rpx; padding-top: 24rpx;
.input { .input {
padding: 24rpx 28rpx; padding: 24rpx 48rpx;
background-color: #f2f2f2; background-color: rgba(246, 248, 249, 1);
border: 1px solid #ccc; border-radius: 116rpx;
border-radius: 12rpx;
color: #283031; color: #283031;
line-height: 40rpx; line-height: 40rpx;
} }
@ -46,17 +45,22 @@
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 22rpx; gap: 22rpx;
&.radio-btns3 {
grid-template-columns: repeat(3, 1fr);
}
.btn { .btn {
padding: 24rpx; padding: 24rpx;
font-size: 32rpx; font-size: 32rpx;
color: #999999; color: rgba(173, 172, 178, 1);
text-align: center; text-align: center;
line-height: 40rpx; line-height: 40rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx; border-radius: 116rpx;
border: 1px solid #cccccc; border: 1px solid rgba(246, 248, 249, 1);
background-color: rgba(246, 248, 249, 1);
&.active { &.active {
color: #e04775; color: rgba(185, 130, 255, 1);
border-color: #e04775; border-color: rgba(185, 130, 255, 1);
background-color: transparent;
} }
} }
} }
@ -155,14 +159,19 @@
// } // }
.cancellation { .cancellation {
margin-top: 45rpx; margin-top: 58rpx;
height: 80rpx; height: 96rpx;
text-align: center; text-align: center;
line-height: 80rpx; line-height: 96rpx;
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: rgba(195, 148, 255, 1);
background: #b8bfd1;
border-radius: 100rpx 100rpx 100rpx 100rpx; border-radius: 100rpx 100rpx 100rpx 100rpx;
border-top: 1px solid rgba(246, 248, 249, 1);
border-bottom: 1px solid rgba(246, 248, 249, 1);
&:last-of-type{
margin-top: 0;
border: none;
}
} }
} }

176
src/patient/pages/personalInformation/index.ts

@ -1,6 +1,6 @@
import dayjs from 'dayjs'; import dayjs from 'dayjs'
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
const licia = require('miniprogram-licia'); const licia = require('miniprogram-licia')
Page({ Page({
data: { data: {
@ -148,164 +148,164 @@ Page({
return { return {
id: item.id, id: item.id,
value: item.name, value: item.name,
}; }
}), }),
}, },
onShow() { onShow() {
const SystemInfo = app.globalSystemInfo; const SystemInfo = app.globalSystemInfo
if (SystemInfo) { if (SystemInfo) {
const { bottom } = SystemInfo.capsulePosition; const { bottom } = SystemInfo.capsulePosition
this.setData({ this.setData({
bottom, bottom,
}); })
} }
const ageEnd = licia.dateFormat(new Date(), 'yyyy-mm-dd'); const ageEnd = licia.dateFormat(new Date(), 'yyyy-mm-dd')
this.setData({ this.setData({
ageEnd, ageEnd,
}); })
app.waitLogin({ type: [1] }).then(() => { app.waitLogin({ type: [1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTPERSONALINFO' }); app.zdMpBehavior({ PageName: 'PG_PATIENTPERSONALINFO' })
const that = this; const that = this
app.getZdUserInfo(that, true, that.formatUserInfo.bind(that)); app.getZdUserInfo(that, true, that.formatUserInfo.bind(that))
}); })
}, },
formatUserInfo(res) { formatUserInfo(res) {
this.formatBorn(res.Birth); this.formatBorn(res.Birth)
this.handleChaneDiagnosisTime({ detail: { value: res.DiagnosisTime } }, false); this.handleChaneDiagnosisTime({ detail: { value: res.DiagnosisTime } }, false)
const diagnoseTypeValue = this.data.DTList.findIndex((item) => item.id == res.DiagnoseType); const diagnoseTypeValue = this.data.DTList.findIndex((item) => item.id == res.DiagnoseType)
this.handleChangeDiagnoseType({ detail: { value: [diagnoseTypeValue] } }); this.handleChangeDiagnoseType({ detail: { value: [diagnoseTypeValue] } })
this.handleDiagnoseTypeSave(false); this.handleDiagnoseTypeSave(false)
// this.handleTapRT(); // this.handleTapRT();
}, },
formatBorn(Birth) { formatBorn(Birth) {
let bron = ''; let bron = ''
let age = ''; let age = ''
const date = new Date(); const date = new Date()
const year = date.getFullYear(); const year = date.getFullYear()
const month = date.getMonth() + 1; const month = date.getMonth() + 1
if (!Birth) { if (!Birth) {
bron = `${Birth}`; bron = `${Birth}`
age = '岁'; age = '岁'
} else if (Birth && Birth.split('-').length > 1) { } else if (Birth && Birth.split('-').length > 1) {
bron = `${Birth.split('-')[0]}${Birth.split('-')[1]}`; bron = `${Birth.split('-')[0]}${Birth.split('-')[1]}`
age = age =
month - Birth.split('-')[1] >= 0 month - Birth.split('-')[1] >= 0
? `${year - Birth.split('-')[0]}${month - Birth.split('-')[1]}个月` ? `${year - Birth.split('-')[0]}${month - Birth.split('-')[1]}个月`
: `${year - Birth.split('-')[0] - 1}${12 - Birth.split('-')[1] + month}个月`; : `${year - Birth.split('-')[0] - 1}${12 - Birth.split('-')[1] + month}个月`
} else { } else {
bron = `${Birth}`; bron = `${Birth}`
age = `${year - Birth}`; age = `${year - Birth}`
} }
age = age.replace('岁0个月', '岁'); age = age.replace('岁0个月', '岁')
this.setData({ this.setData({
bron, bron,
age, age,
'zdUserInfo.Birth': Birth, 'zdUserInfo.Birth': Birth,
'zdUserInfo.AgeYear': Number(dayjs().format('YYYY')) - Birth.split('-')[0], 'zdUserInfo.AgeYear': Number(dayjs().format('YYYY')) - Birth.split('-')[0],
}); })
}, },
handleChaneAge(e) { handleChaneAge(e) {
const Birth = e.detail.value; const Birth = e.detail.value
this.formatBorn(Birth); this.formatBorn(Birth)
this.updateUserInfo(); this.updateUserInfo()
}, },
handleChaneDiagnosisTime(e, update = true) { handleChaneDiagnosisTime(e, update = true) {
const DiagnosisTime = e.detail.value; const DiagnosisTime = e.detail.value
this.setData({ this.setData({
DiagnosisTime: dayjs(DiagnosisTime).format('YYYY年MM月'), DiagnosisTime: dayjs(DiagnosisTime).format('YYYY年MM月'),
'zdUserInfo.DiagnosisTime': DiagnosisTime, 'zdUserInfo.DiagnosisTime': DiagnosisTime,
}); })
this.updateUserInfo(update); this.updateUserInfo(update)
}, },
handleInput(e) { handleInput(e) {
const { key } = e.currentTarget.dataset; const { key } = e.currentTarget.dataset
this.setData({ this.setData({
[`zdUserInfo.${key}`]: e.detail.value, [`zdUserInfo.${key}`]: e.detail.value,
}); })
}, },
handleChangeRT(e, update = true) { handleChangeRT(e, update = true) {
const value = e.detail.value; const value = e.detail.value
const id = this.data.RTList.filter((_item, index) => index == value)[0]?.id; const id = this.data.RTList.filter((_item, index) => index == value)[0]?.id
this.setData({ this.setData({
rtValue: value, rtValue: value,
'zdUserInfo.RelationType': id, 'zdUserInfo.RelationType': id,
}); })
this.updateUserInfo(update); this.updateUserInfo(update)
}, },
handleChangeGender(e, update = true) { handleChangeGender(e, update = true) {
const value = e.detail.value; const value = e.detail.value
const id = this.data.GenderList.filter((_item, index) => index == value)[0]?.id; const id = this.data.GenderList.filter((_item, index) => index == value)[0]?.id
this.setData({ this.setData({
genderValue: value, genderValue: value,
'zdUserInfo.Gender': id, 'zdUserInfo.Gender': id,
}); })
this.updateUserInfo(update); this.updateUserInfo(update)
}, },
handleChangeTask(e, update = true) { handleChangeTask(e, update = true) {
const value = e.detail ? 0 : 1; const value = e.detail ? 0 : 1
const id = this.data.TaskList.filter((_item, index) => index == value)[0]?.id; const id = this.data.TaskList.filter((_item, index) => index == value)[0]?.id
this.setData({ this.setData({
taskValue: value, taskValue: value,
'zdUserInfo.PatientCanFollowUp': id, 'zdUserInfo.PatientCanFollowUp': id,
}); })
this.updateUserInfo(update); this.updateUserInfo(update)
}, },
handleChangeAgeRange(e, update = true) { handleChangeAgeRange(e, update = true) {
const value = e.detail.value; const value = e.detail.value
const id = this.data.ageRangeList.filter((_item, index) => index == value)[0]?.id; const id = this.data.ageRangeList.filter((_item, index) => index == value)[0]?.id
this.setData({ this.setData({
ageRangeValue: value, ageRangeValue: value,
'zdUserInfo.AgeRange': id, 'zdUserInfo.AgeRange': id,
}); })
this.updateUserInfo(update); this.updateUserInfo(update)
}, },
handleDiagnoseTypeSave(update = true) { handleDiagnoseTypeSave(update = true) {
const rangeIndex = this.data.selectDiagnoseTypeIndex; const rangeIndex = this.data.selectDiagnoseTypeIndex
const id = this.data.DTList.filter((_item, index) => index == rangeIndex)[0]?.id; const id = this.data.DTList.filter((_item, index) => index == rangeIndex)[0]?.id
this.setData({ this.setData({
diagnoseTypeValue: rangeIndex, diagnoseTypeValue: rangeIndex,
'zdUserInfo.DiagnoseType': id, 'zdUserInfo.DiagnoseType': id,
}); })
if (update) { if (update) {
this.handleDiagnoseTypeShow(); this.handleDiagnoseTypeShow()
} }
this.updateUserInfo(update); this.updateUserInfo(update)
}, },
handleRadio(e) { handleRadio(e) {
const { id, key } = e.currentTarget.dataset; const { id, key } = e.currentTarget.dataset
this.setData({ this.setData({
[`zdUserInfo.${key}`]: id, [`zdUserInfo.${key}`]: id,
}); })
this.updateUserInfo(true); this.updateUserInfo(true)
}, },
handleDiagnoseTypeShow() { handleDiagnoseTypeShow() {
this.setData({ this.setData({
diagnoseTypeShow: !this.data.diagnoseTypeShow, diagnoseTypeShow: !this.data.diagnoseTypeShow,
}); })
}, },
handleChangeDiagnoseType(e) { handleChangeDiagnoseType(e) {
const value = e.detail.value[0]; const value = e.detail.value[0]
this.setData({ this.setData({
selectDiagnoseTypeIndex: value, selectDiagnoseTypeIndex: value,
}); })
}, },
handleRedioSelect(e) { handleRedioSelect(e) {
const { key, id } = e.currentTarget.dataset; const { key, id } = e.currentTarget.dataset
this.setData({ this.setData({
[`zdUserInfo.${key}`]: id, [`zdUserInfo.${key}`]: id,
}); })
this.updateUserInfo(); this.updateUserInfo()
}, },
updateUserInfo(update = true) { updateUserInfo(update = true) {
if (!update) return; if (!update) return
const { PatientName, RelationType, Gender, Birth, DiagnosisTime, DiagnoseType, ...zdUserInfo } = const { PatientName, RelationType, Gender, Birth, DiagnosisTime, DiagnoseType, ...zdUserInfo } =
this.data.zdUserInfo; this.data.zdUserInfo
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/account/update-info', url: '?r=zd/account/update-info',
@ -330,51 +330,51 @@ Page({
wx.showToast({ wx.showToast({
title: '修改成功', title: '修改成功',
icon: 'none', icon: 'none',
}); })
app.getZdUserInfo(this, true, this.formatUserInfo.bind(this)); app.getZdUserInfo(this, true, this.formatUserInfo.bind(this))
}) })
.catch((err) => { .catch((err) => {
wx.showToast({ wx.showToast({
title: err.data.msg, title: err.data.msg,
icon: 'none', icon: 'none',
}); })
app.getZdUserInfo(this, true, this.formatUserInfo.bind(this)); app.getZdUserInfo(this, true, this.formatUserInfo.bind(this))
}); })
}, },
handleChangeTel() { handleChangeTel() {
app.zdMpBehavior({ PageName: 'PG_PATIENTPERSONALINFO_CHANGEPHONECLICK' }); app.zdMpBehavior({ PageName: 'PG_PATIENTPERSONALINFO_CHANGEPHONECLICK' })
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/changePhone/index', url: '/patient/pages/changePhone/index',
}); })
}, },
handleChangeUser() { handleChangeUser() {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/changeUser/index', url: '/patient/pages/changeUser/index',
}); })
}, },
handleLogout() { handleLogout() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTPERSONALINFOLOGOUT' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTPERSONALINFOLOGOUT' })
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/cancellation/index', url: '/patient/pages/cancellation/index',
}); })
}, },
handleBack() { handleBack() {
wx.navigateBack(); wx.navigateBack()
}, },
routerTo(e) { routerTo(e) {
const { url } = e.currentTarget.dataset; const { url } = e.currentTarget.dataset
if (url.includes('/doctor/patient/pages/d_login/index')) { if (url.includes('/doctor/patient/pages/d_login/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTPERSONALINFOSWITCHDOCTORPORTAL' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTPERSONALINFOSWITCHDOCTORPORTAL' })
} }
wx.navigateTo({ wx.navigateTo({
url, url,
}); })
}, },
redirectTo(e) { redirectTo(e) {
const { url } = e.currentTarget.dataset; const { url } = e.currentTarget.dataset
wx.redirectTo({ wx.redirectTo({
url, url,
}); })
}, },
}); })

176
src/patient/pages/personalInformation/index.wxml

@ -1,8 +1,4 @@
<view <view class="page">
class="page"
style="background: url({{imageUrl}}za-images//3/userinfo-bg.png?t={{Timestamp}}) no-repeat top center / 100% 1200rpx;padding-top: {{bottom+10}}px;"
>
<navBar back background="{{background}}" fixed bind:back="handleBack" title="个人信息"></navBar>
<view class="page-container"> <view class="page-container">
<view class="banner-new"> <view class="banner-new">
<view class="row"> <view class="row">
@ -24,15 +20,6 @@
</view> </view>
<view class="row"> <view class="row">
<view class="row-header"> <view class="row-header">
<view class="label">手机号</view>
<view class="change-phone" bind:tap="handleChangeTel">修改手机号</view>
</view>
<view class="row-content">
<input class="input" disabled placeholder-class="place-input" type="" value="{{zdUserInfo.Telephone}}" />
</view>
</view>
<view class="row">
<view class="row-header">
<view class="label">身份</view> <view class="label">身份</view>
</view> </view>
<view class="row-content"> <view class="row-content">
@ -52,36 +39,10 @@
</view> </view>
<view class="row"> <view class="row">
<view class="row-header"> <view class="row-header">
<view class="label">出生日期</view>
</view>
<view class="row-content">
<picker
class="r-picker"
bindchange="handleChaneAge"
start="{{ageStart}}"
end="{{ageEnd}}"
fields="month"
mode="date"
value="{{zdUserInfo.Birth}}"
>
<view class="r-picker-content">
<view class="value" data-place="年/月" wx:if="{{bron}}">{{bron}}({{age}})</view>
<view class="value" data-place="年/月" wx:else></view>
<image
class="triangle"
mode="widthFix"
src="{{imageUrl}}za-images//3/triangle-down.png?t={{Timestamp}}"
></image>
</view>
</picker>
</view>
</view>
<view class="row">
<view class="row-header">
<view class="label">年龄范围</view> <view class="label">年龄范围</view>
</view> </view>
<view class="row-content"> <view class="row-content">
<view class="radio-btns"> <view class="radio-btns radio-btns3">
<view <view
class="btn {{zdUserInfo.AgeRange==item.id && 'active'}}" class="btn {{zdUserInfo.AgeRange==item.id && 'active'}}"
wx:for="{{ageRangeList}}" wx:for="{{ageRangeList}}"
@ -97,53 +58,11 @@
</view> </view>
<view class="row"> <view class="row">
<view class="row-header"> <view class="row-header">
<view class="label">性别</view> <view class="label">
</view> 是否有Graves病病史
<view class="row-content"> <text class="sub">(非必填)</text>
<view class="radio-btns">
<view
class="btn {{ zdUserInfo.Gender === item.id && 'active'}}"
wx:for="{{GenderList}}"
wx:key="index"
bind:tap="handleRedioSelect"
data-key="Gender"
data-id="{{item.id}}"
>
{{item.value}}
</view>
</view> </view>
</view> </view>
</view>
<view class="row">
<view class="row-header">
<view class="label">诊断分型</view>
</view>
<view class="row-content">
<picker
class="r-picker"
bindchange="handleChangeDiagnoseType"
mode="selector"
range="{{DTList}}"
range-key="value"
value="{{diagnoseTypeValue}}"
disabled
>
<view class="r-picker-content" bind:tap="handleDiagnoseTypeShow">
<!-- prettier-ignore -->
<view class="value" data-place="请选择分型" >{{DTList[diagnoseTypeValue].value || '' }}</view>
<image
class="triangle"
mode="widthFix"
src="{{imageUrl}}za-images//3/triangle-down.png?t={{Timestamp}}"
></image>
</view>
</picker>
</view>
</view>
<view class="row">
<view class="row-header">
<view class="label">抗体类型</view>
</view>
<view class="row-content"> <view class="row-content">
<view class="radio-btns"> <view class="radio-btns">
<view <view
@ -161,7 +80,7 @@
</view> </view>
<view class="row"> <view class="row">
<view class="row-header"> <view class="row-header">
<view class="label">胸腺异常</view> <view class="label">是否有TED(甲状腺眼突)及其相关眼部手术史(非必填)</view>
</view> </view>
<view class="row-content"> <view class="row-content">
<view class="radio-btns"> <view class="radio-btns">
@ -178,90 +97,9 @@
</view> </view>
</view> </view>
</view> </view>
<view class="row">
<view class="row-header">
<view class="label">既往发生危象</view>
</view>
<view class="row-content">
<view class="radio-btns">
<view
wx:for="{{previousConvulsionRangeList}}"
wx:key="index"
class="btn {{zdUserInfo.PreviousConvulsion + '' === item.id && 'active'}}"
data-key="PreviousConvulsion"
data-id="{{item.id}}"
bind:tap="handleRadio"
>
{{item.value}}
</view>
</view>
</view>
</view>
<view class="row">
<view class="row-header">
<view class="label">传统免疫抑制剂</view>
</view>
<view class="row-content">
<view class="radio-btns">
<view
wx:for="{{traditionalImmunosuppressantRangeList}}"
wx:key="index"
class="btn {{zdUserInfo.TraditionalImmunosuppressant + '' === item.id && 'active'}}"
data-key="TraditionalImmunosuppressant"
data-id="{{item.id}}"
bind:tap="handleRadio"
>
{{item.value}}
</view>
</view>
</view>
</view>
<view class="row">
<view class="row-header">
<view class="label">医保类型</view>
</view>
<view class="row-content">
<view class="radio-btns">
<view
wx:for="{{medicalInsuranceTypeRangeList}}"
wx:key="index"
class="btn {{zdUserInfo.MedicalInsuranceType + '' === item.id && 'active'}}"
data-key="MedicalInsuranceType"
data-id="{{item.id}}"
bind:tap="handleRadio"
>
{{item.value}}
</view>
</view>
</view>
</view>
<!-- <view class="protocol"> -->
<!-- <view class="wrap"> -->
<!-- <view class="name">接受电话随访服务</view> -->
<!-- <view -->
<!-- class="book" -->
<!-- bind:tap="redirectTo" -->
<!-- data-url="/patient/pages/taskAgreement/index?page=/patient/pages/personalInformation/index" -->
<!-- > -->
<!-- 《电话随访知情同意书》 -->
<!-- </view> -->
<!-- </view> -->
<!-- <van-switch -->
<!-- checked="{{zdUserInfo.PatientCanFollowUp==1}}" -->
<!-- active-color="#CF5375" -->
<!-- size="24px" -->
<!-- bind:change="handleChangeTask" -->
<!-- ></van-switch> -->
<!-- </view> -->
</view> </view>
<!-- <view class="footer-new"> -->
<!-- <view class="btn1" wx:if="{{zdUserInfo.IsRootUser==1}}" bind:tap="handleLogout">注销账号</view> -->
<!-- <view class="btn2" bind:tap="routerTo" data-url="/doctor/patient/pages/d_login/index?back=1">切换医生端</view> -->
<!-- <view class="btn3" bind:tap="handleChangeUser">切换账号</view> -->
<!-- </view> -->
<view class="cancellation" bind:tap="handleChangeUser">切换账号</view>
<view class="cancellation" bind:tap="routerTo" data-url="/pages/login/index">切换医生端</view> <view class="cancellation" bind:tap="routerTo" data-url="/pages/login/index">切换医生端</view>
<view wx:if="{{zdUserInfo.IsRootUser==1}}" class="cancellation" bind:tap="handleLogout">注销</view> <view wx:if="{{zdUserInfo.IsRootUser==1}}" class="cancellation" bind:tap="handleLogout">注销账号</view>
</view> </view>
</view> </view>

5
src/patient/pages/repository/index.json

@ -1,10 +1,11 @@
{ {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "default", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"van-tab": "@vant/weapp/tab/index", "van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index", "van-tabs": "@vant/weapp/tabs/index",
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"patient-tab-bar": "/components/patient-tab-bar/index" "patient-tab-bar": "/components/patient-tab-bar/index",
"navbar": "/components/navbar/index"
} }
} }

84
src/patient/pages/repository/index.scss

@ -1,3 +1,6 @@
page {
background-color: rgba(246, 248, 249, 1);
}
.page { .page {
padding-bottom: 120rpx; padding-bottom: 120rpx;
.tab { .tab {
@ -9,42 +12,13 @@
color: #484848; color: #484848;
} }
} }
.search {
margin: 32rpx 30rpx 0;
padding: 18rpx 32rpx;
background: #ffffff;
box-shadow: 0rpx 4rpx 0 0 rpx rgba(0, 0, 0, 0.05);
border-radius: 38rpx;
border: 2rpx solid #ebecee;
display: flex;
align-items: center;
.icon {
width: 40rpx;
height: 40rpx;
}
.input {
flex: 1;
margin: 0 20rpx;
font-size: 28rpx;
}
.placeholder-input {
color: #a8a8a8;
}
.clear {
color: #ccc;
}
}
.sticky { .sticky {
position: sticky; position: sticky;
top: 0; top: 0;
left: 0; left: 0;
z-index: 20; z-index: 20;
padding-bottom: 10rpx; padding-bottom: 10rpx;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
background-color: #fff;
.tags { .tags {
margin-top: 20rpx;
padding-top: 28rpx;
overflow-y: hidden; overflow-y: hidden;
overflow-x: auto; overflow-x: auto;
padding-bottom: 8rpx; padding-bottom: 8rpx;
@ -56,14 +30,14 @@
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
.tag { .tag {
padding: 10rpx 24rpx; padding: 8rpx 24rpx;
margin-right: 16rpx; margin-right: 16rpx;
flex-shrink: 0; flex-shrink: 0;
font-size: 28rpx; font-size: 24rpx;
color: #484848; color: rgba(33, 29, 46, 1);
line-height: 1; line-height: 34rpx;
border-radius: 24rpx; border-radius: 8rpx;
background-color: #f2f2f2; background-color: rgba(255, 255, 255, 1);
&.active { &.active {
color: #fff; color: #fff;
background-color: var(--name); background-color: var(--name);
@ -72,40 +46,25 @@
} }
} }
} }
.swiper {
margin: 32rpx 30rpx 0;
height: 246rpx;
.swiper-item {
width: 100%;
height: 100%;
.img {
width: 100%;
height: 100%;
}
}
}
.info-list { .info-list {
margin: 32rpx 30rpx; margin: 32rpx 30rpx;
padding: 24rpx;
background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx;
border: 2rpx solid #ebecee;
.list-item { .list-item {
padding: 32rpx;
display: flex; display: flex;
margin-bottom: 22rpx; margin-bottom: 24rpx;
background: #ffffff;
border-radius: 24rpx;
.photo { .photo {
position: relative; position: relative;
width: 232rpx; width: 210rpx;
height: 184rpx; height: 140rpx;
flex-shrink: 0; flex-shrink: 0;
border-radius: 16rpx; border-radius: 8rpx;
border: 1rpx solid #ebecee; margin-right: 24rpx;
margin-right: 16rpx;
.photo-img { .photo-img {
width: 232rpx; width: 100%;
height: 184rpx; height: 100%;
border-radius: inherit; border-radius: inherit;
} }
.money { .money {
@ -138,10 +97,9 @@
.inner { .inner {
flex: 1; flex: 1;
padding-bottom: 20rpx; padding-bottom: 20rpx;
border-bottom: 1px solid rgba(182, 183, 186, 0.21);
.title { .title {
font-size: 28rpx; font-size: 32rpx;
color: #252525; color: rgba(33, 29, 46, 1);
font-weight: bold; font-weight: bold;
line-height: 42rpx; line-height: 42rpx;
} }

82
src/patient/pages/repository/index.wxml

@ -1,35 +1,8 @@
<view <view
class="page" class="page"
style="{{theme === 'DRUG'?'--name:#25D9C8;--tag-bg:rgba(37, 217, 200, 0.13)':'--name:#e04775;--tag-bg:rgba(224, 71, 117, 0.13)'}}" style="--name: rgba(185, 130, 255, 1); --tag-bg: rgba(224, 71, 117, 0.13);background: url('/images/bg10.png') no-repeat top center/100% 610rpx;padding-top:{{pageTop+22}}px;"
> >
<van-tabs <navbar fixed title="了解TED" custom-style="background:{{background}}"></navbar>
wx:if="{{picTextStatus==1 && videoStatus==1}}"
class="navbar"
active="{{ active }}"
bind:change="tabChange"
title-inactive-color="#9E9E9E"
title-active-color="#484848"
line-width="{{17}}"
line-height="{{4}}"
color="#E04775"
tab-class="tab"
tab-active-class="tab-active"
>
<van-tab title="知识库"></van-tab>
<van-tab title="视频课堂"></van-tab>
</van-tabs>
<view class="search">
<image class="icon" src="{{imageUrl}}za-images/1/search.png?t={{Timestamp}}"></image>
<input
class="input"
model:value="{{Search}}"
placeholder-class="placeholder-input"
confirm-type="search"
placeholder="搜一搜"
bindconfirm="handleSearch"
/>
<van-icon class="clear extend-via-pseudo-elem" wx:if="{{Search}}" name="clear" bind:tap="handleClear" />
</view>
<view class="sticky"> <view class="sticky">
<view class="tags"> <view class="tags">
<view class="scroll"> <view class="scroll">
@ -59,17 +32,6 @@
</view> </view>
</view> </view>
</view> </view>
<swiper wx:if="{{banner.length}}" class="swiper" autoplay interval="{{3000}}">
<swiper-item
class="swiper-item"
wx:for="{{banner}}"
wx:key="index"
bind:tap="routerTo"
data-path="{{item.linkUrl}}"
>
<image class="img" mode="scaleToFill" src="{{item.img}}"></image>
</swiper-item>
</swiper>
<view class="info-list" wx:if="{{active==0 && list.length}}"> <view class="info-list" wx:if="{{active==0 && list.length}}">
<view <view
class="list-item" class="list-item"
@ -81,49 +43,9 @@
> >
<view class="photo"> <view class="photo">
<image src="{{item.TitlePicLink}}" mode="aspectFill" class="photo-img"></image> <image src="{{item.TitlePicLink}}" mode="aspectFill" class="photo-img"></image>
<image
wx:if="{{item.IsNew==1}}"
class="new-icon"
src="{{imageUrl}}za-images/2/new-label.png?t={{Timestamp}}"
></image>
</view> </view>
<view class="inner"> <view class="inner">
<view class="title">{{item.Title}}</view> <view class="title">{{item.Title}}</view>
<view class="date">{{item.UpdatedAt}}</view>
<view class="labels">
<view class="label" wx:for="{{item.Labels}}" wx:for-item="label" wx:key="index">{{label}}</view>
</view>
<view class="footer">
<view class="f-item">
<image class="icon" src="{{imageUrl}}za-images/1/view.png?t={{Timestamp}}"></image>
<block wx:if="{{~~item.OpenNum + ~~item.BasicNum}}">{{~~item.OpenNum + ~~item.BasicNum}}</block>
</view>
<view
class="f-item {{item.IsCompliment==1 && 'active'}}"
catch:tap="handleStar"
data-id="{{item.Id}}"
data-index="{{index}}"
>
<image
class="icon"
wx:if="{{item.IsCompliment==1}}"
src="{{imageUrl}}za-images/1/star-active.png?t={{Timestamp}}"
></image>
<image class="icon" wx:else src="{{imageUrl}}za-images/1/star.png?t={{Timestamp}}"></image>
<block wx:if="{{~~item.ComplimentNum}}">{{item.ComplimentNum}}</block>
</view>
<button
class="f-item share"
open-type="share"
data-id="{{item.Id}}"
data-type="info"
data-index="{{index}}"
catch:tap="handleShare"
>
<image class="icon" src="{{imageUrl}}za-images/1/share.png?t={{Timestamp}}"></image>
<block wx:if="{{~~item.ShareNum}}">{{item.ShareNum}}</block>
</button>
</view>
</view> </view>
</view> </view>
</view> </view>

13
src/patient/pages/repositoryDetail/index.scss

@ -128,7 +128,7 @@
} }
&:not(:last-of-type)::after { &:not(:last-of-type)::after {
margin: 18rpx; margin: 18rpx;
content: ""; content: '';
width: 2rpx; width: 2rpx;
height: 20rpx; height: 20rpx;
background-color: #f3f3f4; background-color: #f3f3f4;
@ -188,7 +188,7 @@
bottom: -12rpx; bottom: -12rpx;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
content: ""; content: '';
width: 0; width: 0;
height: 0; height: 0;
border-style: solid; border-style: solid;
@ -197,12 +197,13 @@
} }
} }
.f-item { .f-item {
flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 30rpx; font-size: 30rpx;
color: #e04775; color: rgba(33, 29, 46, 1);
margin: 0; margin: 0;
padding: 0; padding-left: 120rpx;
background: transparent; background: transparent;
&::after { &::after {
display: none; display: none;
@ -218,7 +219,7 @@
display: none; display: none;
} }
&.active { &.active {
color: #e04775; color: rgba(33, 29, 46, 1);
.icon { .icon {
display: none; display: none;
} }
@ -230,7 +231,7 @@
.vertical { .vertical {
width: 3rpx; width: 3rpx;
height: 28rpx; height: 28rpx;
background-color: #f3f3f4; background-color: rgba(105, 104, 110, 0.16);
} }
} }
} }

168
src/patient/pages/repositoryDetail/index.ts

@ -1,5 +1,5 @@
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
const licia = require('miniprogram-licia'); const licia = require('miniprogram-licia')
Page({ Page({
data: { data: {
@ -28,32 +28,32 @@ Page({
}, },
onLoad(options) { onLoad(options) {
const { id } = options; const { id } = options
this.setData({ this.setData({
id, id,
}); })
app.zdWaitLogin().then(() => { app.waitLogin({ type: [1] }).then(() => {
this.getDetail(true); this.getDetail(true)
}); })
}, },
onShow() { onShow() {
app.zdMpBehavior({ PageName: 'PG_PATIENTKNOWLEDGEDETAILS' }); app.zdMpBehavior({ PageName: 'PG_PATIENTKNOWLEDGEDETAILS' })
if (this.data.sendShare) { if (this.data.sendShare) {
this.setData({ this.setData({
sendShare: false, sendShare: false,
timeToastType: '9', timeToastType: '9',
}); })
this.handleTimeOut(); this.handleTimeOut()
} }
}, },
onHide() { onHide() {
if (this._time) { if (this._time) {
clearInterval(this._time); clearInterval(this._time)
} }
}, },
onUnload() { onUnload() {
if (this._time) { if (this._time) {
clearInterval(this._time); clearInterval(this._time)
} }
}, },
getDetail(view = false) { getDetail(view = false) {
@ -64,40 +64,40 @@ Page({
Id: this.data.id, Id: this.data.id,
}, },
}).then(async (res) => { }).then(async (res) => {
res.Content = await this.formatVideo(res.Content); res.Content = await this.formatVideo(res.Content)
this.setData({ this.setData({
detail: res, detail: res,
}); })
if (view) { if (view) {
let asideOut = false; let asideOut = false
if (res.CanGetScore) { if (res.CanGetScore) {
asideOut = true; asideOut = true
} }
this.setData({ this.setData({
asideOut, asideOut,
}); })
this.saveView(); this.saveView()
} }
}); })
}, },
formatVideo(Content) { formatVideo(Content) {
return new Promise((reslove) => { return new Promise((reslove) => {
const query = wx.createSelectorQuery(); const query = wx.createSelectorQuery()
query query
.select('#mp-html') .select('#mp-html')
.boundingClientRect((rect) => { .boundingClientRect((rect) => {
const mpWidth = rect.width; const mpWidth = rect.width
const reg = /<video\b([^>]*)width="(.*?)".*?height="(.*?)".*?>/g; const reg = /<video\b([^>]*)width="(.*?)".*?height="(.*?)".*?>/g
Content = Content.replace(reg, (match, otherAttributes, width, height) => { Content = Content.replace(reg, (match, otherAttributes, width, height) => {
if (!isNaN(Number(width)) && !isNaN(Number(height))) { if (!isNaN(Number(width)) && !isNaN(Number(height))) {
return `<video ${otherAttributes} width="${mpWidth}" height="${height * (mpWidth / width)}">`; return `<video ${otherAttributes} width="${mpWidth}" height="${height * (mpWidth / width)}">`
} }
return `<video ${otherAttributes} width="${mpWidth}">`; return `<video ${otherAttributes} width="${mpWidth}">`
}); })
reslove(Content); reslove(Content)
}) })
.exec(); .exec()
}); })
}, },
handleVideoTime: licia.throttle(function (time) { handleVideoTime: licia.throttle(function (time) {
wx.ajax({ wx.ajax({
@ -108,8 +108,8 @@ Page({
WatchDuration: time, WatchDuration: time,
}, },
}).then((res) => { }).then((res) => {
console.log('res: ', res); console.log('res: ', res)
}); })
}, 5000), }, 5000),
saveView() { saveView() {
wx.ajax({ wx.ajax({
@ -121,43 +121,43 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
HistoryId: res.HistoryId, HistoryId: res.HistoryId,
}); })
let time = 0; let time = 0
if (this._time) { if (this._time) {
clearInterval(this._time); clearInterval(this._time)
} }
this._time = setInterval(() => { this._time = setInterval(() => {
time++; time++
this.handleVideoTime(time); this.handleVideoTime(time)
}, 1000); }, 1000)
}); })
}, },
handleDetail(e) { handleDetail(e) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset
this.setData({ this.setData({
id, id,
saveLock: false, saveLock: false,
starLock: false, starLock: false,
shareLock: false, shareLock: false,
sendShare: false, sendShare: false,
}); })
this.getDetail(true); this.getDetail(true)
}, },
handleStar() { handleStar() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSLIKE' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSLIKE' })
this.setData({ this.setData({
starShow: true, starShow: true,
}); })
const header = this.selectComponent('#animate'); const header = this.selectComponent('#animate')
header.start(); header.start()
if (this._timer) { if (this._timer) {
clearInterval(this._timer); clearInterval(this._timer)
} }
this._timer = setTimeout(() => { this._timer = setTimeout(() => {
this.setData({ this.setData({
starShow: false, starShow: false,
}); })
}, 2000); }, 2000)
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/pic-text/compliment', url: '?r=zd/pic-text/compliment',
@ -166,21 +166,21 @@ Page({
}, },
showMsg: false, showMsg: false,
}).then(() => { }).then(() => {
this.getDetail(); this.getDetail()
if (this.data.starLock || this.data.timeToast) return; if (this.data.starLock || this.data.timeToast) return
this.setData({ this.setData({
timeToastType: '8', timeToastType: '8',
starLock: true, starLock: true,
}); })
this.handleTimeOut(); this.handleTimeOut()
}); })
}, },
handleToggleSave() { handleToggleSave() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSFAVORITE' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSFAVORITE' })
const { const {
id, id,
detail: { IsCollect }, detail: { IsCollect },
} = this.data; } = this.data
app.zdPermissionVerification(3, 3, `/patient/pages/repositoryDetail/index?id=${id}`, id).then(() => { app.zdPermissionVerification(3, 3, `/patient/pages/repositoryDetail/index?id=${id}`, id).then(() => {
if (IsCollect == 1) { if (IsCollect == 1) {
wx.ajax({ wx.ajax({
@ -191,12 +191,12 @@ Page({
}, },
loading: true, loading: true,
}).then(() => { }).then(() => {
this.getDetail(); this.getDetail()
wx.showToast({ wx.showToast({
title: '取消收藏', title: '取消收藏',
icon: 'none', icon: 'none',
}); })
}); })
} else { } else {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -206,23 +206,23 @@ Page({
}, },
loading: true, loading: true,
}).then(() => { }).then(() => {
this.getDetail(); this.getDetail()
// wx.showToast({ // wx.showToast({
// title: "收藏成功", // title: "收藏成功",
// icon: "none", // icon: "none",
// }); // });
if (this.data.saveLock || this.data.timeToast) return; if (this.data.saveLock || this.data.timeToast) return
this.setData({ this.setData({
timeToastType: '10', timeToastType: '10',
saveLock: true, saveLock: true,
}); })
this.handleTimeOut(); this.handleTimeOut()
}); })
} }
}); })
}, },
handleBack() { handleBack() {
const { id } = this.data; const { id } = this.data
app app
.zdPermissionVerification(3, 3, `/patient/pages/repositoryDetail/index?id=${id}`, id) .zdPermissionVerification(3, 3, `/patient/pages/repositoryDetail/index?id=${id}`, id)
.then(() => { .then(() => {
@ -230,13 +230,13 @@ Page({
fail() { fail() {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}); })
}, },
}); })
}) })
.catch(() => { .catch(() => {
app.globalData.backPage = false; app.globalData.backPage = false
}); })
}, },
handleShare() { handleShare() {
wx.ajax({ wx.ajax({
@ -246,12 +246,12 @@ Page({
ContentId: this.data.id, ContentId: this.data.id,
}, },
}).then(() => { }).then(() => {
this.getDetail(); this.getDetail()
}); })
}, },
handleTimeOut() { handleTimeOut() {
if (!this.data.timeToastType) { if (!this.data.timeToastType) {
return; return
} }
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -261,48 +261,48 @@ Page({
Id: this.data.detail.Id, Id: this.data.detail.Id,
}, },
}).then((res) => { }).then((res) => {
if (this.data.timeToast) return; if (this.data.timeToast) return
if (!Array.isArray(res)) { if (!Array.isArray(res)) {
this.setData({ this.setData({
timeToast: true, timeToast: true,
timeToastParams: { timeToastParams: {
rewardScore: res.rewardScore, rewardScore: res.rewardScore,
}, },
}); })
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
timeToast: false, timeToast: false,
}); })
}, 3000); }, 3000)
} }
}); })
}, },
onShareAppMessage() { onShareAppMessage() {
this.handleShare(); this.handleShare()
if (!this.data.shareLock) { if (!this.data.shareLock) {
this.setData({ this.setData({
sendShare: true, sendShare: true,
}); })
} }
this.setData({ this.setData({
shareLock: true, shareLock: true,
}); })
return { return {
title: this.data.detail.Title, title: this.data.detail.Title,
path: `/patient/pages/repositoryDetail/index?id=${this.data.id}`, path: `/patient/pages/repositoryDetail/index?id=${this.data.id}`,
imageUrl: this.data.detail.TitlePicLink, imageUrl: this.data.detail.TitlePicLink,
}; }
}, },
onPageScroll(e) { onPageScroll(e) {
if (e.scrollTop > 10) { if (e.scrollTop > 10) {
this.setData({ this.setData({
showTip: false, showTip: false,
}); })
} }
}, },
handleTapShare() { handleTapShare() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSSHARE' }); app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSSHARE' })
}, },
}); })
export {}; export {}

98
src/patient/pages/repositoryDetail/index.wxml

@ -5,75 +5,67 @@
<view class="title">{{detail.Title}}</view> <view class="title">{{detail.Title}}</view>
<view class="banner-footer"> <view class="banner-footer">
<view class="date">{{detail.UpdatedAt}}</view> <view class="date">{{detail.UpdatedAt}}</view>
<view class="time">{{detail.ReadCost}}分钟</view> <!-- <view class="time">{{detail.ReadCost}}分钟</view> -->
<view class="views"> <!-- <view class="views"> -->
<image class="icon" src="{{imageUrl}}za-images/1/view.png?t={{Timestamp}}"></image> <!-- <image class="icon" src="{{imageUrl}}za-images/1/view.png?t={{Timestamp}}"></image> -->
{{~~detail.OpenNum + ~~detail.BasicNum}} <!-- {{~~detail.OpenNum + ~~detail.BasicNum}} -->
</view> <!-- </view> -->
</view>
<view class="tags">
<view class="tag" wx:for="{{detail.Labels}}">{{item}}</view>
</view> </view>
<!-- <view class="tags"> -->
<!-- <view class="tag" wx:for="{{detail.Labels}}">{{item}}</view> -->
<!-- </view> -->
</view> </view>
<view class="container"> <view class="container">
<view class="audio" wx:if="{{detail.AudioLink.url}}"> <!-- <view class="audio" wx:if="{{detail.AudioLink.url}}"> -->
<free-audio audio="{{detail.AudioLink}}"></free-audio> <!-- <free-audio audio="{{detail.AudioLink}}"></free-audio> -->
</view> <!-- </view> -->
<mp-html id="mp-html" class="mp-html" container-style="overflow: visible" content="{{detail.Content}}"></mp-html> <mp-html id="mp-html" class="mp-html" container-style="overflow: visible" content="{{detail.Content}}"></mp-html>
</view> </view>
<view class="other" wx:if="{{detail.Recommends.length}}"> <!-- <view class="other" wx:if="{{detail.Recommends.length}}"> -->
<view class="o-title">其它推荐文章</view> <!-- <view class="o-title">其它推荐文章</view> -->
<view class="other-list"> <!-- <view class="other-list"> -->
<view class="list-item" wx:for="{{detail.Recommends}}" bind:tap="handleDetail" data-id="{{item.Id}}"> <!-- <view class="list-item" wx:for="{{detail.Recommends}}" bind:tap="handleDetail" data-id="{{item.Id}}"> -->
<image src="{{item.TitlePicLink}}" class="photo"></image> <!-- <image src="{{item.TitlePicLink}}" class="photo"></image> -->
<view class="inner"> <!-- <view class="inner"> -->
<view class="title">{{item.Title}}</view> <!-- <view class="title">{{item.Title}}</view> -->
<view class="date">{{item.PublishAt}}</view> <!-- <view class="date">{{item.PublishAt}}</view> -->
<view class="labels"> <!-- <view class="labels"> -->
<view class="label" wx:for="{{item.Labels}}" wx:for-item="label">{{label}}</view> <!-- <view class="label" wx:for="{{item.Labels}}" wx:for-item="label">{{label}}</view> -->
</view> <!-- </view> -->
<view class="o-footer"> <!-- <view class="o-footer"> -->
<view class="f-item"> <!-- <view class="f-item"> -->
<image class="icon" src="{{imageUrl}}za-images/1/view.png?t={{Timestamp}}"></image> <!-- <image class="icon" src="{{imageUrl}}za-images/1/view.png?t={{Timestamp}}"></image> -->
<block wx:if="{{~~item.OpenNum + ~~item.BasicNum}}">{{~~item.OpenNum + ~~item.BasicNum}}</block> <!-- <block wx:if="{{~~item.OpenNum + ~~item.BasicNum}}">{{~~item.OpenNum + ~~item.BasicNum}}</block> -->
</view> <!-- </view> -->
<view class="f-item {{item.IsCompliment==1 && 'active'}}"> <!-- <view class="f-item {{item.IsCompliment==1 && 'active'}}"> -->
<image <!-- <image -->
class="icon" <!-- class="icon" -->
wx:if="{{item.IsCompliment==1}}" <!-- wx:if="{{item.IsCompliment==1}}" -->
src="{{imageUrl}}za-images/1/star-active.png?t={{Timestamp}}" <!-- src="{{imageUrl}}za-images/1/star-active.png?t={{Timestamp}}" -->
></image> <!-- ></image> -->
<image class="icon" wx:else src="{{imageUrl}}za-images/1/star.png?t={{Timestamp}}"></image> <!-- <image class="icon" wx:else src="{{imageUrl}}za-images/1/star.png?t={{Timestamp}}"></image> -->
<block wx:if="{{~~item.ComplimentNum}}">{{item.ComplimentNum}}</block> <!-- <block wx:if="{{~~item.ComplimentNum}}">{{item.ComplimentNum}}</block> -->
</view> <!-- </view> -->
</view> <!-- </view> -->
</view> <!-- </view> -->
</view> <!-- </view> -->
</view> <!-- </view> -->
</view> <!-- </view> -->
</view> </view>
<star id="animate" class="animate {{starShow&&'active'}}"></star>
<view class="footer"> <view class="footer">
<view class="tip" wx:if="{{showTip}}"> <view class="tip" wx:if="{{showTip}}">
<image class="icon" src="{{imageUrl}}za-images/2/money.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}za-images/2/money.png?t={{Timestamp}}"></image>
点赞和分享可获得能量 点赞和分享可获得能量
</view> </view>
<view class="f-item {{detail.IsCollect == 1 && 'active'}}" bind:tap="handleToggleSave"> <view class="f-item {{detail.IsCollect == 1 && 'active'}}" bind:tap="handleToggleSave">
<image class="icon" src="{{imageUrl}}za-images/1/save-active.png?t={{Timestamp}}"></image> <image class="icon" src="/images/icon36.png"></image>
<image class="icon-active" src="{{imageUrl}}za-images/1/save-active-plan.png?t={{Timestamp}}"></image> <image class="icon-active" src="/images/icon36.png"></image>
<block wx:if="{{~~detail.CollectionPeopleNum}}">{{detail.CollectionPeopleNum}}</block> <block wx:if="{{~~detail.CollectionPeopleNum}}">{{detail.CollectionPeopleNum}}</block>
</view> </view>
<view class="vertical"></view> <view class="vertical"></view>
<view class="f-item {{detail.IsCompliment == 1 && 'active'}}" bind:tap="handleStar">
<!-- <image class="animate" wx:if="{{animate}}" src="{{imageUrl}}za-images/1/start.gif?t={{Timestamp}}"></image> -->
<image class="icon" src="{{imageUrl}}za-images/1/star-detail.png?t={{Timestamp}}"></image>
<image class="icon-active" src="{{imageUrl}}za-images/1/star-active.png?t={{Timestamp}}"></image>
<block wx:if="{{~~detail.ComplimentNum}}">{{detail.ComplimentNum}}</block>
</view>
<view class="vertical"></view>
<button class="f-item" open-type="share" bind:tap="handleTapShare"> <button class="f-item" open-type="share" bind:tap="handleTapShare">
<image class="icon" src="{{imageUrl}}za-images/1/share-active.png?t={{Timestamp}}"></image> <image class="icon" src="/images/icon37.png"></image>
<image class="icon-active" src="{{imageUrl}}za-images/1/share-active.png?t={{Timestamp}}"></image> <image class="icon-active" src="/images/icon37.png"></image>
<block wx:if="{{detail.ShareNum}}">{{detail.ShareNum}}</block> <block wx:if="{{detail.ShareNum}}">{{detail.ShareNum}}</block>
</button> </button>
</view> </view>

Loading…
Cancel
Save