Compare commits

..

No commits in common. 'master' and 'lightspot' have entirely different histories.

  1. 5
      README.md
  2. 28
      eslint.config.js
  3. 28
      eslint.config.mjs
  4. 8
      package.json
  5. 2596
      pnpm-lock.yaml
  6. 2
      project.config.json
  7. 20
      project.private.config.json
  8. 2
      src/app.json
  9. 76
      src/app.ts
  10. 202
      src/components/customPoster/index.js
  11. 10
      src/components/pickerArea/index.scss
  12. 7
      src/components/pickerArea/index.wxml
  13. 41
      src/components/popup/index.scss
  14. 12
      src/components/popup/index.wxml
  15. 74
      src/custom-tab-bar/index.scss
  16. 68
      src/custom-tab-bar/index.ts
  17. 23
      src/custom-tab-bar/index.wxml
  18. 9
      src/gift/pages/dtpDurg/index.json
  19. 226
      src/gift/pages/dtpDurg/index.scss
  20. 192
      src/gift/pages/dtpDurg/index.ts
  21. 88
      src/gift/pages/dtpDurg/index.wxml
  22. BIN
      src/images/bg21.png
  23. BIN
      src/images/bg25.png
  24. BIN
      src/images/bg26.png
  25. BIN
      src/images/bg32.png
  26. BIN
      src/images/bg33.png
  27. BIN
      src/images/bg34.png
  28. BIN
      src/images/bg35.png
  29. BIN
      src/images/icon100.png
  30. BIN
      src/images/icon101.png
  31. BIN
      src/images/icon102.png
  32. BIN
      src/images/icon41.png
  33. BIN
      src/images/icon42.png
  34. BIN
      src/images/icon87.png
  35. BIN
      src/images/icon88.png
  36. BIN
      src/images/icon89.png
  37. BIN
      src/images/icon90.png
  38. BIN
      src/images/icon91.png
  39. BIN
      src/images/icon92.png
  40. BIN
      src/images/icon93.png
  41. BIN
      src/images/icon94.png
  42. BIN
      src/images/icon95.png
  43. BIN
      src/images/icon96.png
  44. BIN
      src/images/icon97.png
  45. BIN
      src/images/icon98.png
  46. BIN
      src/images/icon99.png
  47. BIN
      src/images/title10.png
  48. BIN
      src/images/za-images/3/icon-send-date.png
  49. BIN
      src/images/za-images/icon6.png
  50. BIN
      src/images/za-images/live-banner.png
  51. 16
      src/pages/d_interactive/index.scss
  52. 16
      src/pages/d_interactive/index.ts
  53. 2
      src/pages/d_interactive/index.wxml
  54. 3
      src/pages/d_interactiveDoctor/index.json
  55. 110
      src/pages/d_interactiveDoctor/index.scss
  56. 104
      src/pages/d_interactiveDoctor/index.ts
  57. 62
      src/pages/d_interactiveDoctor/index.wxml
  58. 2
      src/pages/d_invite/index.ts
  59. 1
      src/pages/d_invite/index.wxml
  60. 2
      src/pages/d_patient/index.wxml
  61. 16
      src/pages/home/index.ts
  62. 2
      src/pages/home/index.wxml
  63. 2
      src/pages/message/index.wxml
  64. 39
      src/pages/start/index.ts
  65. 258
      src/patient/pages/doctor/index.scss
  66. 166
      src/patient/pages/doctor/index.ts
  67. 147
      src/patient/pages/doctor/index.wxml
  68. 35
      src/patient/pages/enterInfo/index.ts
  69. 2
      src/patient/pages/enterInfo/index.wxml
  70. 117
      src/patient/pages/hospital/index.scss
  71. 71
      src/patient/pages/hospital/index.ts
  72. 40
      src/patient/pages/hospital/index.wxml
  73. 57
      src/patient/pages/index/index.scss
  74. 45
      src/patient/pages/index/index.ts
  75. 37
      src/patient/pages/index/index.wxml
  76. 107
      src/patient/pages/infusionCenter/index.scss
  77. 145
      src/patient/pages/infusionCenter/index.ts
  78. 29
      src/patient/pages/infusionCenter/index.wxml
  79. 3
      src/patient/pages/interactivePatient/index.json
  80. 184
      src/patient/pages/interactivePatient/index.scss
  81. 138
      src/patient/pages/interactivePatient/index.ts
  82. 137
      src/patient/pages/interactivePatient/index.wxml
  83. 3
      src/patient/pages/live/index.wxml
  84. 2
      src/patient/pages/liveDetail/index.scss
  85. 133
      src/patient/pages/liveDetail/index.ts
  86. 21
      src/patient/pages/liveDetail/index.wxml
  87. 19
      src/patient/pages/liveDetailVideo/index.scss
  88. 100
      src/patient/pages/liveDetailVideo/index.ts
  89. 32
      src/patient/pages/liveDetailVideo/index.wxml
  90. 12
      src/patient/pages/liveResult/index.scss
  91. 25
      src/patient/pages/liveResult/index.ts
  92. 19
      src/patient/pages/liveResult/index.wxml
  93. 2
      src/patient/pages/myLive/index.wxml
  94. 8
      src/patient/pages/personalInformation/index.scss
  95. 36
      src/patient/pages/personalInformation/index.ts
  96. 14
      src/patient/pages/personalInformation/index.wxml
  97. 1
      src/patient/pages/repositoryDetail/index.ts
  98. 29
      src/utils/request.ts
  99. 87
      src/utils/util.ts
  100. 3
      typings/index.d.ts

5
README.md

@ -10,14 +10,9 @@ images svn 地址
svn://39.106.86.127:28386/projects/xd/proj_src/shop/frontend/web/xd 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/ svn://39.106.86.127:28386/projects/xd/proj_src/branches/dev_v2.0/shop/frontend/web/xd/
## vscode
(/images/)(\S*(?=["|'])) (/images/)(\S*(?=["|']))
{{imageUrl}}$2?t={{Timestamp}} {{imageUrl}}$2?t={{Timestamp}}
## neovim
(/images/)([^\"|']*)
{{imageUrl}}$2?t={{Timestamp}}
ui问题 ui问题
1. 首页绑定医生弹窗需要重新切图 1. 首页绑定医生弹窗需要重新切图

28
eslint.config.js

@ -1,28 +0,0 @@
import antfu from '@antfu/eslint-config'
export default antfu({
env: {
es6: true,
},
parserOptions: { project: ['./tsconfig.json'] },
globals: {
wx: true,
App: true,
Page: true,
getCurrentPages: true,
getApp: true,
Component: true,
requirePlugin: true,
requireMiniProgram: true,
},
rules: {
'eslint-comments/no-unlimited-disable': 'off',
'ts/no-require-imports': 'off',
eqeqeq: 'off',
},
formatters: {
css: 'prettier',
html: 'prettier',
markdown: 'prettier',
},
})

28
eslint.config.mjs

@ -0,0 +1,28 @@
// eslint.config.mjs
import antfu from '@antfu/eslint-config'
import prettierConfig from 'eslint-config-prettier'
export default antfu(
{
env: {
es6: true,
},
stylistic: false,
parserOptions: { project: ['./tsconfig.json'] },
globals: {
wx: true,
App: true,
Page: true,
getCurrentPages: true,
getApp: true,
Component: true,
requirePlugin: true,
requireMiniProgram: true,
},
rules: {
'eslint-comments/no-unlimited-disable': 'off',
'ts/no-require-imports': 'off',
},
},
prettierConfig,
)

8
package.json

@ -18,10 +18,10 @@
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^6.2.0", "@antfu/eslint-config": "^3.7.3",
"eslint": "^9.38.0", "eslint": "^9.12.0",
"eslint-plugin-format": "^1.0.2", "eslint-config-prettier": "^9.1.0",
"miniprogram-api-typings": "^4.1.0", "miniprogram-api-typings": "^4.0.1",
"prettier": "3.3.3" "prettier": "3.3.3"
} }
} }

2596
pnpm-lock.yaml

File diff suppressed because it is too large Load Diff

2
project.config.json

@ -71,5 +71,5 @@
} }
] ]
}, },
"appid": "wx71ac9c27c3c3e3f4" "appid": "wxf9ce8010f1ad24aa"
} }

20
project.private.config.json

@ -3,7 +3,7 @@
"projectname": "xinda-miniprogram", "projectname": "xinda-miniprogram",
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true,
"urlCheck": false, "urlCheck": true,
"coverView": false, "coverView": false,
"lazyloadPlaceholderEnable": false, "lazyloadPlaceholderEnable": false,
"skylineRenderEnable": true, "skylineRenderEnable": true,
@ -23,25 +23,11 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "药房",
"pathName": "gift/pages/dtpDurg/index",
"query": "id=10",
"launchMode": "default",
"scene": null
},
{
"name": "就诊地图",
"pathName": "patient/pages/doctor/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "patient/pages/liveDetail/index", "name": "patient/pages/liveDetail/index",
"pathName": "patient/pages/liveDetail/index", "pathName": "patient/pages/liveDetail/index",
"query": "id=33", "query": "id=33",
"launchMode": "default", "scene": null,
"scene": null "launchMode": "default"
}, },
{ {
"name": "患者-个人信息", "name": "患者-个人信息",

2
src/app.json

@ -83,6 +83,7 @@
}, },
{ {
"root": "gift", "root": "gift",
"independent": true,
"pages": [ "pages": [
"pages/giftList/index", "pages/giftList/index",
"pages/conformOrder/index", "pages/conformOrder/index",
@ -167,7 +168,6 @@
}, },
"componentFramework": "glass-easel", "componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json", "sitemapLocation": "sitemap.json",
"requiredPrivateInfos": ["getFuzzyLocation"],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"requiredBackgroundModes": ["audio"] "requiredBackgroundModes": ["audio"]
} }

76
src/app.ts

@ -1,10 +1,10 @@
import dayjs from 'dayjs'
import licia from 'miniprogram-licia'
import component from '@/utils/component' import component from '@/utils/component'
import relativeTime from '@/utils/dayjs/relativeTime.js' import relativeTime from '@/utils/dayjs/relativeTime.js'
import page from '@/utils/page' import page from '@/utils/page'
import { request } from '@/utils/request' import { request } from '@/utils/request'
import { parseScene } from './utils/util' import { parseScene } from './utils/util'
const dayjs = require('dayjs')
const licia = require('miniprogram-licia')
require('/utils/dayjs/day-zh-cn.js') require('/utils/dayjs/day-zh-cn.js')
@ -16,15 +16,15 @@ App<IAppOption>({
// 测试号 wx2b0bb13edf717c1d // 测试号 wx2b0bb13edf717c1d
// dev // dev
// appid:wxf9ce8010f1ad24aa // appid:wxf9ce8010f1ad24aa
// url: 'https://m.xd.hbraas.com', url: 'https://m.xd.hbraas.com',
// upFileUrl: 'https://m.xd.hbraas.com/', upFileUrl: 'https://m.xd.hbraas.com/',
// imageUrl: 'https://m.xd.hbraas.com/xd/', imageUrl: 'https://m.xd.hbraas.com/xd/',
// pro // pro
// appid:wx71ac9c27c3c3e3f4 // appid:wx71ac9c27c3c3e3f4
url: 'https://m.xd.hbsaas.com', // url: 'https://m.xd.hbsaas.com',
upFileUrl: 'https://m.xd.hbsaas.com/', // upFileUrl: 'https://m.xd.hbsaas.com/',
imageUrl: 'https://m.xd.hbsaas.com/api/xd/', // imageUrl: 'https://m.xd.hbsaas.com/api/xd/',
loginState: '', loginState: '',
isLogin: 0, isLogin: 0,
@ -97,11 +97,6 @@ App<IAppOption>({
99: '取消', 99: '取消',
100: '已删除', 100: '已删除',
}, },
liveSubscribe: {
sub: false,
tmplIds: [],
},
}, },
onLaunch() { onLaunch() {
Page = page as WechatMiniprogram.Page.Constructor Page = page as WechatMiniprogram.Page.Constructor
@ -119,8 +114,7 @@ App<IAppOption>({
onShow(options) { onShow(options) {
if (options.query.scene) { if (options.query.scene) {
this.globalData.scene = parseScene(options.query.scene) this.globalData.scene = parseScene(options.query.scene)
} } else if (options.query.proMethodId) {
else if (options.query.proMethodId) {
this.globalData.scene.proMethodId = options.query.proMethodId this.globalData.scene.proMethodId = options.query.proMethodId
} }
}, },
@ -241,7 +235,7 @@ App<IAppOption>({
data: {}, data: {},
}) as Promise<never> }) as Promise<never>
}, },
mpBehavior(data: { doctor?: boolean, PageName: string }) { mpBehavior(data: { doctor?: boolean; PageName: string }) {
let url = '?r=zd/mp-behavior/add' let url = '?r=zd/mp-behavior/add'
if (data.doctor) { if (data.doctor) {
url = '?r=zd/doctor/mp-behavior/add' url = '?r=zd/doctor/mp-behavior/add'
@ -273,10 +267,9 @@ App<IAppOption>({
}) })
}, },
// zd相关函数 // zd相关函数
zdMpBehavior(data: { PageName: string, doctor?: boolean }) { zdMpBehavior(data: { PageName: string; doctor?: boolean }) {
const { loginType } = this.globalData const { loginType } = this.globalData
if (loginType === 0) if (loginType === 0) return
return
let url = '?r=zd/mp-behavior/add' let url = '?r=zd/mp-behavior/add'
if (data.doctor) { if (data.doctor) {
url = '?r=zd/doctor/mp-behavior/add' url = '?r=zd/doctor/mp-behavior/add'
@ -303,15 +296,13 @@ App<IAppOption>({
if (this.zdVerifySys(pub)) { if (this.zdVerifySys(pub)) {
if (this.globalData.loginType === 1) { if (this.globalData.loginType === 1) {
this.zdRegistrationVerification(() => resolve(), loginPage) this.zdRegistrationVerification(() => resolve(), loginPage)
} } else {
else {
resolve() resolve()
} }
} }
} }
const unRegFun = (resolve) => { const unRegFun = (resolve) => {
if (!this.zdVerifySys(pub)) if (!this.zdVerifySys(pub)) return
return
resolve() resolve()
} }
return new Promise((resolve: (value?) => void) => { return new Promise((resolve: (value?) => void) => {
@ -369,14 +360,11 @@ App<IAppOption>({
let urlKey = '' let urlKey = ''
if (!PatientId) { if (!PatientId) {
urlKey = 'enterInfo' urlKey = 'enterInfo'
} } else if (AuditStatus == 0) {
else if (AuditStatus == 0) {
urlKey = 'noCert' urlKey = 'noCert'
} } else if (AuditStatus == 1) {
else if (AuditStatus == 1) {
urlKey = isFollow ? 'nopending' : 'pending' urlKey = isFollow ? 'nopending' : 'pending'
} } else if (AuditStatus == 2) {
else if (AuditStatus == 2) {
urlKey = 'reject' urlKey = 'reject'
} }
const navUrl = { const navUrl = {
@ -427,8 +415,7 @@ App<IAppOption>({
}) })
return false return false
} }
if (ignorePath.includes(url)) if (ignorePath.includes(url)) return true
return true
if (loginType === 1) { if (loginType === 1) {
if (url.includes('doctor/pages')) { if (url.includes('doctor/pages')) {
@ -436,16 +423,14 @@ App<IAppOption>({
url: '/pages/index/index', url: '/pages/index/index',
}) })
return false return false
} } else {
else {
return true return true
} }
} }
if (loginType === 2 && !pub) { if (loginType === 2 && !pub) {
if (url.includes('doctor/pages')) { if (url.includes('doctor/pages')) {
return true return true
} } else {
else {
const params = Object.entries(options) const params = Object.entries(options)
.map(([key, value]) => `${key}=${value}`) .map(([key, value]) => `${key}=${value}`)
.join('&') .join('&')
@ -470,8 +455,7 @@ App<IAppOption>({
url: '/patient/pages/login/index', url: '/patient/pages/login/index',
}) })
isReject = true isReject = true
} } else if (!isNewReg) {
else if (!isNewReg) {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/enterInfo/index', url: '/patient/pages/enterInfo/index',
}) })
@ -480,7 +464,7 @@ App<IAppOption>({
} }
if (isReject) { if (isReject) {
that.globalData.backPage = backPage that.globalData.backPage = backPage
reject(new Error('非登录用户拦截')) reject(null)
return return
} }
resolve(null) resolve(null)
@ -534,20 +518,4 @@ App<IAppOption>({
callback(res) callback(res)
}) })
}, },
setTabbarNoticeMessage() {
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/message-interact/get-unread-count',
data: {},
}).then((res) => {
if (res > 0) {
wx.setTabBarBadge({
index: 2,
text: res > 99 ? '99+' : res,
})
return
}
wx.removeTabBarBadge({ index: 2 })
})
},
}) })

202
src/components/customPoster/index.js

@ -1,101 +1,101 @@
import Wxml2Canvas from "./wxml2canvas/index.js"; // 根据具体路径修改,node_modules会被忽略 import Wxml2Canvas from "./wxml2canvas/index.js"; // 根据具体路径修改,node_modules会被忽略
Component({ Component({
properties: { properties: {
params: { params: {
type: Object, type: Object,
observer(newVal, _olVal) { observer(newVal, _olVal) {
if (Object.keys(newVal).length > 0) { if (Object.keys(newVal).length > 0) {
this.paramsFormat(newVal); this.paramsFormat(newVal);
this.setData({ this.setData({
width: newVal.body.width, width: newVal.body.width,
height: newVal.body.height, height: newVal.body.height,
bgImg: newVal.body.bgImg, bgImg: newVal.body.bgImg,
elementsMp: newVal.elements, elementsMp: newVal.elements,
}); });
this.drawImage(); this.drawImage1();
} }
}, },
}, },
}, },
data: { data: {
imgUrl: "", imgUrl: "",
width: "", width: "",
height: "", height: "",
imgheight: "", imgheight: "",
bgImg: "", bgImg: "",
elementsMp: [], elementsMp: [],
}, },
lifetimes: { lifetimes: {
attached() {}, attached() {},
}, },
methods: { methods: {
paramsFormat(params) { paramsFormat(params) {
params.elements.forEach((item) => { params.elements.forEach((item) => {
if (item.type === 0) { if (item.type === 0) {
// 图片居中 // 图片居中
if (item.halign === "center") { if (item.halign === "center") {
item.left = (params.body.width - item.width) / 2; item.left = (params.body.width - item.width) / 2;
} }
} else { } else {
item.text = item.text.replace(/[\r\n]/g, ""); item.text = item.text.replace(/[\r\n]/g, "");
// 文字居中(使文字标签宽度等于画布宽度,文字加上居中的className) // 文字居中(使文字标签宽度等于画布宽度,文字加上居中的className)
if (item.halign === "center") { if (item.halign === "center") {
item.width = item.width || params.body.width; item.width = item.width || params.body.width;
item.left = (params.body.width - item.width) / 2; item.left = (params.body.width - item.width) / 2;
} }
if (item.halign === "right") { if (item.halign === "right") {
item.width = params.body.width; item.width = params.body.width;
} }
if (item.id === "shareText" && item.text.length > 30) { if (item.id === "shareText" && item.text.length > 30) {
item.text = item.text.slice(0, 30) + "..."; item.text = item.text.slice(0, 30) + "...";
} }
if (item.id === "note-title" && item.text.length > 28) { if (item.id === "note-title" && item.text.length > 28) {
item.text = item.text.slice(0, 28) + "..."; item.text = item.text.slice(0, 28) + "...";
} }
if (item.id === "note-content" && item.text.length > 90) { if (item.id === "note-content" && item.text.length > 90) {
item.text = item.text.slice(0, 90) + "..."; item.text = item.text.slice(0, 90) + "...";
} }
let len = params.elements.some((x) => x.id === "note-title" && x.text.length); let len = params.elements.some((x) => x.id === "note-title" && x.text.length);
if (len && item.id === "note-summary" && item.text.length > 62) { if (len && item.id === "note-summary" && item.text.length > 62) {
item.text = item.text.slice(0, 62) + "..."; item.text = item.text.slice(0, 62) + "...";
} else if (item.id === "note-summary" && item.text.length > 76) { } else if (item.id === "note-summary" && item.text.length > 76) {
item.text = item.text.slice(0, 76) + "..."; item.text = item.text.slice(0, 76) + "...";
} }
} }
}); });
}, },
drawImage() { drawImage1() {
let self = this; let self = this;
this.drawImage1 = new Wxml2Canvas({ this.drawImage1 = new Wxml2Canvas({
obj: self, obj: self,
width: this.data.width, // 宽, 以iphone6为基准,传具体数值,其它机型自动适配 width: this.data.width, // 宽, 以iphone6为基准,传具体数值,其它机型自动适配
height: this.data.height, // 高 height: this.data.height, // 高
element: "canvas1", element: "canvas1",
background: "transparent", background: "transparent",
progress(percent) {}, progress(percent) {},
finish(url) { finish(url) {
self.setData({ self.setData({
imgUrl: url, imgUrl: url,
}); });
self.triggerEvent("finish", url); self.triggerEvent("finish", url);
}, },
error(res) {}, error(res) {},
}); });
let data = { let data = {
list: [ list: [
{ {
type: "wxml", type: "wxml",
class: "#canvas-bill-body-mp .draw_canvas", class: "#canvas-bill-body-mp .draw_canvas",
limit: "#canvas-bill-body-mp", limit: "#canvas-bill-body-mp",
x: 0, x: 0,
y: 0, y: 0,
}, },
], ],
}; };
this.drawImage1.draw(data); this.drawImage1.draw(data);
}, },
}, },
}); });

10
src/components/pickerArea/index.scss

@ -41,7 +41,7 @@
padding: 18rpx 30rpx; padding: 18rpx 30rpx;
box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(0, 0, 0, 0.11); box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(0, 0, 0, 0.11);
border-radius: 12rpx 12rpx 12rpx 12rpx; border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #B982FF; border: 2rpx solid #e04775;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -69,7 +69,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: linear-gradient( 197deg, #FFBCF9 0%, #B982FF 100%); background: #e04775;
border-radius: 12rpx 12rpx 12rpx 12rpx; border-radius: 12rpx 12rpx 12rpx 12rpx;
} }
} }
@ -91,7 +91,7 @@
background: #f7f8f9; background: #f7f8f9;
&.active { &.active {
color: #fff; color: #fff;
background-color: #B982FF; background-color: rgba(224, 71, 117, 1);
} }
} }
} }
@ -118,9 +118,9 @@
height: 36rpx; height: 36rpx;
} }
&.active { &.active {
color: #B982FF; color: rgba(224, 71, 117, 1);
.word { .word {
color: #B982FF; color: rgba(224, 71, 117, 1);
} }
} }
} }

7
src/components/pickerArea/index.wxml

@ -4,8 +4,7 @@
<view class="popup"> <view class="popup">
<van-icon catch:tap="handleClose" class="close" name="cross" /> <van-icon catch:tap="handleClose" class="close" name="cross" />
<view class="p-header"> <view class="p-header">
<view class="title" wx:if="{{active===1}}">选择您的地区</view> <view class="title">选择省份和地区</view>
<view class="title" wx:else>选择您的省份</view>
<!-- <view class="tip">对方打开后自动定位此地区</view> --> <!-- <view class="tip">对方打开后自动定位此地区</view> -->
<view class="area"> <view class="area">
<view class="item" bind:tap="handleProvince"> <view class="item" bind:tap="handleProvince">
@ -37,7 +36,7 @@
data-name="{{item.label}}" data-name="{{item.label}}"
> >
<view class="left">{{item.label}}</view> <view class="left">{{item.label}}</view>
<image wx:if="{{item.value === CityId}}" class="icon" src="{{imageUrl}}icon102.png?t={{Timestamp}}"></image> <image wx:if="{{item.value === CityId}}" class="icon" src="{{imageUrl}}icon7.png?t={{Timestamp}}"></image>
</view> </view>
</scroll-view> </scroll-view>
</block> </block>
@ -77,7 +76,7 @@
<image <image
wx:if="{{item.code=== ProvinceId}}" wx:if="{{item.code=== ProvinceId}}"
class="icon" class="icon"
src="{{imageUrl}}icon102.png?t={{Timestamp}}" src="{{imageUrl}}icon7.png?t={{Timestamp}}"
></image> ></image>
</view> </view>
</block> </block>

41
src/components/popup/index.scss

@ -129,19 +129,10 @@
.popup6 { .popup6 {
width: 590rpx; width: 590rpx;
height: 880rpx; height: 880rpx;
position: relative;
.p-img { .p-img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.code {
position: absolute;
top: 350rpx;
left: 50%;
transform: translateX(-50%);
width: 290rpx;
height: 290rpx;
}
} }
.popup7 { .popup7 {
@ -196,7 +187,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.code { .code{
position: absolute; position: absolute;
top: 372rpx; top: 372rpx;
left: 50%; left: 50%;
@ -207,36 +198,6 @@
} }
} }
.popup9 {
padding: 32rpx;
width: 530rpx;
height: 452rpx;
box-sizing: border-box;
background-color: #fff;
text-align: center;
.icon {
width: 128rpx;
height: 128rpx;
}
.title {
margin-top: 24rpx;
font-size: 38rpx;
color: #211d2e;
font-weight: bold;
line-height: 56rpx;
}
.btn {
margin: 36rpx auto 0;
width: 418rpx;
height: 88rpx;
line-height: 88rpx;
font-size: 32rpx;
color: #FFFFFF;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
border-radius: 100rpx 100rpx 100rpx 100rpx;
}
}
.close { .close {
margin: 48rpx auto 0; margin: 48rpx auto 0;
display: block; display: block;

12
src/components/popup/index.wxml

@ -55,8 +55,7 @@
</view> </view>
</view> </view>
<view class="popup6" wx:if="{{type==='popup6'}}"> <view class="popup6" wx:if="{{type==='popup6'}}">
<image class="p-img" src="{{imageUrl}}bg32.png?t={{Timestamp}}"></image> <image class="p-img" src="{{imageUrl}}bg20.png?t={{Timestamp}}" show-menu-by-longpress></image>
<image class="code" src="{{params.qrCode}}" show-menu-by-longpress></image>
</view> </view>
<view class="popup7" wx:if="{{type==='popup7'}}"> <view class="popup7" wx:if="{{type==='popup7'}}">
<image class="badge" src="{{imageUrl}}icon78.png?t={{Timestamp}}"></image> <image class="badge" src="{{imageUrl}}icon78.png?t={{Timestamp}}"></image>
@ -72,15 +71,6 @@
<image class="p-img" src="{{imageUrl}}bg23.png?t={{Timestamp}}"></image> <image class="p-img" src="{{imageUrl}}bg23.png?t={{Timestamp}}"></image>
<image class="code" src="{{params.subscribe_img}}" show-menu-by-longpress></image> <image class="code" src="{{params.subscribe_img}}" show-menu-by-longpress></image>
</view> </view>
<view class="popup9" wx:if="{{type==='popup9'}}">
<image class="icon" src="{{imageUrl}}icon100.png?t={{Timestamp}}"></image>
<view class="title">
文字包含不合规内容
<view></view>
请修改后重新提交
</view>
<view class="btn" bind:tap="handleOk">知道了</view>
</view>
<image <image
wx:if="{{params.close}}" wx:if="{{params.close}}"

74
src/custom-tab-bar/index.scss

@ -4,6 +4,76 @@
justify-content: space-between; justify-content: space-between;
background-color: #fff; background-color: #fff;
box-shadow: 0rpx 3rpx 27rpx 0rpx rgba(40, 48, 49, 0.1); box-shadow: 0rpx 3rpx 27rpx 0rpx rgba(40, 48, 49, 0.1);
.custom {
flex-shrink: 0;
position: relative;
width: 94rpx;
height: 64rpx;
.add {
position: absolute;
top: -42rpx;
width: 94rpx;
height: 94rpx;
}
.popup-tip {
padding: 20rpx 34rpx 28rpx;
position: absolute;
top: -60rpx;
left: 50%;
transform: translate(-50%, -100%);
border-radius: 16rpx;
background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%);
box-shadow: 0 4rpx 11rpx rgba(0, 0, 0, 0.08);
.close {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 40rpx;
height: 40rpx;
}
.content {
text-align: center;
font-size: 32rpx;
color: #fff;
white-space: nowrap;
line-height: 48rpx;
.plus {
color: #fff;
font-size: 48rpx;
font-weight: bold;
}
}
.pt-footer {
margin-top: 16rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 24rpx;
white-space: nowrap;
.ok {
padding: 16rpx 42rpx;
font-size: 24rpx;
color: #00b4c5;
font-size: 32rpx;
line-height: 32rpx;
border-radius: 120rpx;
background: #fff;
}
}
&::after {
position: absolute;
content: "";
bottom: -10rpx;
left: 50%;
transform: translateX(-50%);
width: 0;
height: 0;
border-style: solid;
border-width: 12rpx 12rpx 0 12rpx;
border-color: #56cabb transparent transparent transparent;
}
}
}
.tab-item { .tab-item {
position: relative; position: relative;
padding-top: 10rpx; padding-top: 10rpx;
@ -40,7 +110,7 @@
.name { .name {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 22rpx; font-size: 22rpx;
color: #69686E; color: rgba(20, 21, 21, 1);
line-height: 21rpx; line-height: 21rpx;
} }
&.active { &.active {
@ -53,7 +123,7 @@
} }
} }
.name { .name {
color: #211D2E; color: rgba(0, 180, 197, 1);
} }
} }
} }

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

@ -1,4 +1,4 @@
const _app = getApp<IAppOption>() const _app = getApp<IAppOption>();
// pages/story/a.ts // pages/story/a.ts
Component({ Component({
@ -16,33 +16,37 @@ Component({
notice: false, notice: false,
tabbar: [ tabbar: [
{ {
path: '/pages/home/index', path: "/pages/home/index",
name: '首页', name: "首页",
icon: 'tab1.png', icon: "tab1.png",
iconActive: 'tab-active1.png', iconActive: "tab-active1.png",
activeIndex: 0,
},
{
path: '/pages/information/index',
name: '资料库',
icon: 'tab2.png',
iconActive: 'tab-active2.png',
activeIndex: 1, activeIndex: 1,
}, },
{ {
path: '/pages/d_interactive/index', path: "/pages/cases/index",
name: '互动', name: "病历",
icon: 'tab3.png', icon: "tab2.png",
iconActive: 'tab-active3.png', iconActive: "tab-active2.png",
activeIndex: 2, activeIndex: 2,
}, },
{ {
path: '/pages/my/index', custom: true,
name: '我的', path: "/module1/pages/entryCases/index",
icon: 'tab4.png', },
iconActive: 'tab-active4.png', {
path: "/pages/chatRoomList/index",
name: "学习窗",
icon: "tab3.png",
iconActive: "tab-active3.png",
activeIndex: 3, activeIndex: 3,
}, },
{
path: "/pages/my/index",
name: "我的",
icon: "tab4.png",
iconActive: "tab-active4.png",
activeIndex: 4,
},
], ],
userInfo: {}, userInfo: {},
}, },
@ -51,16 +55,20 @@ Component({
*/ */
methods: { methods: {
handleTab(e: any) { handleTab(e: any) {
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset;
const tab = this.data.tabbar[index] const tab = this.data.tabbar[index];
this.setData({ if (tab.custom) {
active: tab.activeIndex, this.handleClsoeCaseTip();
}) wx.navigateTo({
wx.switchTab({ url: tab.path,
url: tab.path, });
}) } else {
wx.switchTab({
url: tab.path,
});
}
}, },
}, },
}) });
export {} export {};

23
src/custom-tab-bar/index.wxml

@ -1,6 +1,27 @@
<view class="tabbar"> <view class="tabbar">
<block wx:for="{{tabbar}}" wx:key="index"> <block wx:for="{{tabbar}}" wx:key="index">
<view class="tab-item {{active==item.activeIndex && 'active'}}" bind:tap="handleTab" data-index="{{index}}"> <view class="custom" wx:if="{{item.custom && userInfo.DoctorLevel<3}}" bind:tap="handleTab" data-index="{{index}}">
<image class="add" src="{{imageUrl}}tabbar/add.png?t={{Timestamp}}"></image>
<view class="popup-tip" wx:if="{{showEntryCase}}">
<image class="close" catch:tap="handleClsoeCaseTip" src="{{imageUrl}}icon-close-white.png?t={{Timestamp}}"></image>
<view class="content">
点击
<text class="plus">+</text>
,可录入病历
<view></view>
邀约合作医生一起讨论哦
</view>
<view class="pt-footer">
<view class="ok">去录入</view>
</view>
</view>
</view>
<view
class="tab-item {{active===item.activeIndex && 'active'}}"
wx:elif="{{!item.custom}}"
bind:tap="handleTab"
data-index="{{index}}"
>
<view class="icon-wrap"> <view class="icon-wrap">
<view class="dot" wx:if="{{notice && index===3}}"></view> <view class="dot" wx:if="{{notice && index===3}}"></view>
<image class="icon" src="{{imageUrl}}tabbar/{{item.icon}}?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}tabbar/{{item.icon}}?t={{Timestamp}}"></image>

9
src/gift/pages/dtpDurg/index.json

@ -1,5 +1,4 @@
{ {
"navigationBarTitleText": "药房", "navigationBarTitleText": "双通道药房",
"navigationStyle": "default", "usingComponents": {}
"usingComponents": {} }
}

226
src/gift/pages/dtpDurg/index.scss

@ -1,98 +1,128 @@
.page { .page {
position: relative; position: relative;
.banner { .banner {
width: 100%; width: 100%;
min-height: 374rpx; min-height: 344rpx;
} }
.container { .container {
padding: 48rpx 40rpx; padding: 48rpx 40rpx;
position: absolute; position: absolute;
top: 348rpx; top: 316rpx;
left: 0; left: 0;
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx 24rpx 0 0;
background-color: #ffffff; background-color: #fafafa;
box-sizing: border-box; box-sizing: border-box;
.title { .title {
font-size: 36rpx; font-size: 36rpx;
color: #211d2e; color: #484848;
font-weight: bold; font-weight: bold;
} }
.content { .tags {
margin-top: 32rpx; margin-top: 16rpx;
margin-bottom: 20rpx; display: flex;
display: flex; .tag {
justify-content: space-between; margin-right: 16rpx;
.inner { padding-right: 8rpx;
.site { font-size: 22rpx;
font-size: 32rpx; color: #e04775;
color: #211d2e; line-height: 1;
} border-radius: 8rpx;
.tel { background-color: #f5dfe6;
font-size: 32rpx; display: flex;
color: #211d2e; align-items: center;
} .icon {
} margin-right: 8rpx;
} padding: 4rpx;
.options { width: 24rpx;
margin-top: 40rpx; max-height: 24rpx;
display: flex; background-color: #e04775;
align-items: center; border-radius: 8rpx;
justify-content: center; }
gap: 30rpx; }
.phone { }
flex: 1; .content {
line-height: 70rpx; margin-top: 32rpx;
font-size: 32rpx; margin-bottom: 20rpx;
color: #b982ff; display: flex;
border-radius: 60rpx 60rpx 60rpx 60rpx; justify-content: space-between;
border: 1px solid #b982ff; .inner {
display: flex; .site {
align-items: center; font-size: 28rpx;
justify-content: center; color: #9e9e9e;
.icon { }
margin-right: 8rpx; .tel {
display: inline-block; font-size: 28rpx;
width: 36rpx; color: #9b9ea6;
height: 36rpx; }
} }
} .options {
.site { flex-shrink: 0;
flex: 1; display: flex;
line-height: 76rpx; .option {
font-size: 32rpx; margin-left: 30rpx;
color: #ffffff; .phone {
border-radius: 60rpx; width: 48rpx;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); height: 48rpx;
display: flex; border-radius: 50%;
align-items: center; display: flex;
justify-content: center; align-items: center;
.icon { justify-content: center;
margin-right: 8rpx; background-color: #fff;
display: inline-block; box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.1);
width: 32rpx; &-img {
height: 32rpx; width: 24rpx;
} height: 24rpx;
} }
} }
.name {
.remark { margin-top: 8rpx;
margin-top: 56rpx; font-size: 24rpx;
padding: 32rpx; color: #484848;
border-radius: 24rpx; }
background-color: #fafafa; }
.r-title { }
font-size: 32rpx; }
color: #211d2e;
font-weight: bold; .card {
} margin-bottom: 16rpx;
.r-content { padding: 32rpx 30rpx;
margin-top: 20rpx; border-radius: 24rpx;
font-size: 28rpx; background-color: #fff;
color: #69686e; .c-title {
word-break: break-all; font-size: 32rpx;
} font-weight: bold;
} color: #484848;
} display: flex;
} align-items: center;
.c-icon {
margin-right: 16rpx;
width: 36rpx;
height: 36rpx;
}
}
.c-content{
margin-top: 24rpx;
font-size: 28rpx;
color: #9E9E9E;
}
}
.remark{
padding: 32rpx;
border-radius: 24rpx;
background-color: #fff;
.r-title{
font-size: 32rpx;
color: #484848;
font-weight: bold;
}
.r-content{
margin-top: 20rpx;
font-size: 28rpx;
color: #9E9E9E;
}
}
}
}

192
src/gift/pages/dtpDurg/index.ts

@ -1,140 +1,52 @@
const app = getApp<IAppOption>() const app = getApp<IAppOption>();
Page({ Page({
data: { data: {
id: '', id: "",
detail: {} as any, detail: {} as any,
},
LNG: '' as number | string, onLoad(options) {
LAT: '' as number | string, this.setData({
}, id: options.id,
onLoad(options) { });
this.setData({ app.waitLogin().then(() => {
id: options.id, this.getDetail();
}) });
app.waitLogin({ type: [0, 1] }).then(() => { },
this.handleToggleSite()
}) getDetail() {
}, wx.ajax({
handleToggleSite() { method: "GET",
if (!this.data.LNG) { url: "?r=zd/dtp-pharmacy/detail",
wx.getSetting({ data: {
success: (res) => { Id: this.data.id,
if ( },
res.authSetting['scope.userFuzzyLocation'] != undefined }).then((res) => {
&& res.authSetting['scope.userFuzzyLocation'] == true this.setData({
) { detail: res,
// 获取当前位置 });
this.getFuzzyLocation() });
} },
else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { handleSite() {
// 获取当前位置 const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail;
this.getFuzzyLocation() wx.openLocation({
} latitude: LAT,
else { longitude: LNG,
wx.showModal({ name: Name,
title: '请求授权当前位置', address: `${ProvinceName}${CityName}${CountyName}${Address}`,
content: '需要获取您的地理位置,请确认授权', });
confirmColor: '#8c75d0', },
success: (res) => { handlePhone() {
if (res.cancel) { const tel = this.data.detail.Telephone;
// 取消授权 if (!tel) {
wx.showToast({ wx.showToast({
title: '拒绝授权', icon: "none",
icon: 'none', title: "电话暂未开通",
duration: 1000, });
}) return;
this.getDetail() }
} wx.makePhoneCall({
else if (res.confirm) { phoneNumber: tel,
// 确定授权,通过wx.openSetting发起授权请求 });
wx.openSetting({ },
success: (res) => { });
if (res.authSetting['scope.userFuzzyLocation'] == true) {
wx.showToast({
title: '授权成功',
icon: 'success',
duration: 1000,
})
// 再次授权,调用wx.getLocation的API
this.getFuzzyLocation()
}
else {
wx.showToast({
title: '授权失败',
icon: 'none',
duration: 1000,
})
this.getDetail()
}
},
})
}
},
})
}
},
})
}
else {
this.setData({
LNG: '',
LAT: '',
})
this.getDetail()
}
},
getFuzzyLocation() {
wx.getFuzzyLocation({
success: (res) => {
this.setData({
LNG: res.longitude,
LAT: res.latitude,
})
this.getDetail()
},
fail: () => {
this.getDetail()
},
})
},
getDetail() {
wx.ajax({
method: 'GET',
url: '?r=zd/dtp-pharmacy/detail',
data: {
Id: this.data.id,
lng: this.data.LNG,
lat: this.data.LAT,
},
}).then((res) => {
this.setData({
detail: res,
})
})
},
handleSite() {
const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail
wx.openLocation({
latitude: LAT,
longitude: LNG,
name: Name,
address: `${ProvinceName}${CityName}${CountyName}${Address}`,
})
},
handlePhone() {
const tel = this.data.detail.Telephone
if (!tel) {
wx.showToast({
icon: 'none',
title: '电话暂未开通',
})
return
}
wx.makePhoneCall({
phoneNumber: tel,
})
},
})
export {}

88
src/gift/pages/dtpDurg/index.wxml

@ -1,27 +1,61 @@
<view class="page"> <view class="page">
<!-- <image wx:if="{{detail.ImgUrl}}" class="banner" mode="widthFix" src="{{detail.ImgUrl}}"></image> --> <image wx:if="{{detail.ImgUrl}}" class="banner" mode="widthFix" src="{{detail.ImgUrl}}"></image>
<image class="banner" mode="widthFix" src="{{imageUrl}}bg34.png?t={{Timestamp}}"></image> <image wx:else class="banner" mode="widthFix" src="{{imageUrl}}za-images//nrdl/dtp-durg.png"></image>
<view class="container"> <view class="container">
<view class="title">{{detail.Name}}</view> <view class="title">{{detail.Name}}</view>
<view class="content"> <view class="tags">
<view class="inner"> <view class="tag" wx:if="{{detail.IsOwnInfusionCenter==1}}">
<view class="site">{{detail.ProvinceName}}{{detail.CityName}}{{detail.CountyName}}{{detail.Address}}</view> <image class="icon" mode="widthFix" src="{{imageUrl}}za-images//nrdl/inject.png"></image>
<view class="tel">{{detail.Telephone}}</view> <!-- {{detail.OwnInfusionCenterName}} -->
</view> 自有输注中心
</view> </view>
<view class="options"> <view class="tag" wx:if="{{detail.IsCooperationInfusionCenter==1}}">
<view class="phone" bind:tap="handlePhone"> <image class="icon" mode="widthFix" src="{{imageUrl}}za-images//nrdl/cooperate.png"></image>
<image class="icon" src="{{imageUrl}}icon95.png?t={{Timestamp}}"></image> <!-- {{detail.CooperationInfusionCenterName}} -->
电话 合作输注中心
</view> </view>
<view class="site" bind:tap="handleSite" wx:if="{{detail.Address}}"> </view>
<image class="icon" src="{{imageUrl}}icon96.png?t={{Timestamp}}"></image> <view class="content">
地址{{detail.dist}} <view class="inner">
</view> <view class="site">{{detail.ProvinceName}}{{detail.CityName}}{{detail.CountyName}}{{detail.Address}}</view>
</view> <view class="tel">{{detail.Telephone}}</view>
<view class="remark" wx:if="{{detail.Remark}}"> </view>
<view class="r-title">备注</view> <view class="options">
<view class="r-content">{{detail.Remark}}</view> <view class="option" bind:tap="handleSite" wx:if="{{detail.Address}}">
</view> <view class="phone">
</view> <image class="phone-img" src="{{imageUrl}}za-images//nrdl/site.png"></image>
</view> </view>
<view class="name">地址</view>
</view>
<view class="option" bind:tap="handlePhone">
<view class="phone">
<image class="phone-img" src="{{imageUrl}}za-images//nrdl/phone.png"></image>
</view>
<view class="name">电话</view>
</view>
</view>
</view>
<view class="card" wx:if="{{detail.IsOwnInfusionCenter==1}}">
<view class="c-title">
<image
class="c-icon"
src="{{imageUrl}}za-images//nrdl/cooperate-1.png"
style="width: 32rpx; height: 30rpx; margin-right: 18rpx"
></image>
自有输注中心
</view>
<view class="c-content">{{detail.OwnInfusionCenterName}}</view>
</view>
<view class="card" wx:if="{{detail.IsCooperationInfusionCenter==1}}">
<view class="c-title">
<image class="c-icon" src="{{imageUrl}}za-images//nrdl/inject-1.png" style="width: 36rpx; height: 36rpx"></image>
合作输注中心
</view>
<view class="c-content">{{detail.CooperationInfusionCenterName}}</view>
</view>
<view class="remark" wx:if="{{detail.Remark}}">
<view class="r-title">备注</view>
<view class="r-content">{{detail.Remark}}</view>
</view>
</view>
</view>

BIN
src/images/bg21.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 247 KiB

BIN
src/images/bg25.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

BIN
src/images/bg26.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

BIN
src/images/bg32.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

BIN
src/images/bg33.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 KiB

BIN
src/images/bg34.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 KiB

BIN
src/images/bg35.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 647 KiB

BIN
src/images/icon100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
src/images/icon101.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/icon102.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 B

BIN
src/images/icon41.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/icon42.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/images/icon87.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 B

BIN
src/images/icon88.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/images/icon89.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon90.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon91.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon92.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon93.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon94.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon95.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

BIN
src/images/icon96.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

BIN
src/images/icon97.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 945 B

BIN
src/images/icon98.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

BIN
src/images/icon99.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 877 B

BIN
src/images/title10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

BIN
src/images/za-images/3/icon-send-date.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/za-images/icon6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 283 B

BIN
src/images/za-images/live-banner.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 KiB

After

Width:  |  Height:  |  Size: 634 KiB

16
src/pages/d_interactive/index.scss

@ -62,18 +62,12 @@ page {
.dot { .dot {
position: absolute; position: absolute;
top: 0; top: 0;
right: 10rpx; right: 0;
transform: translateX(50%); width: 18rpx;
padding: 0 5rpx; height: 18rpx;
min-width: 32rpx;
height: 32rpx;
text-align: center;
font-size: 20rpx;
color: #ffffff;
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
border-radius: 16rpx; border-radius: 50%;
background: #ef3939; background: #d76c6c;
box-sizing: border-box;
} }
} }
.wrap { .wrap {

16
src/pages/d_interactive/index.ts

@ -14,13 +14,12 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin({ type: [2] }).then((_res) => { app.waitLogin({ type: [2] }).then((_res) => {
app.mpBehavior({ doctor: true, PageName: 'PG_DoctorIMList' }) app.mpBehavior({ doctor:true, PageName: 'PG_DoctorIMList' })
app.setTabbarNoticeMessage()
this.getList() this.getList()
}) })
}, },
handleTapSearch() { handleTapSearch() {
app.mpBehavior({ doctor: true, PageName: 'BTN_DoctorIMListSearch' }) app.mpBehavior({ doctor:true, PageName: 'BTN_DoctorIMListSearch' })
}, },
handleSearch() { handleSearch() {
this.setData({ this.setData({
@ -41,6 +40,13 @@ Page({
this.getList() this.getList()
}, },
getList(newPage = 1) { getList(newPage = 1) {
const { active } = this.data
if (active == '' && newPage == 1) {
}
if (active == '1' && newPage == 1) {
}
if (active == '2' && newPage == 1) {
}
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/doctor/message-interact/get-interact-patient-list', url: '?r=zd/doctor/message-interact/get-interact-patient-list',
@ -69,7 +75,7 @@ Page({
} }
}, },
handleDetail(e) { handleDetail(e) {
app.mpBehavior({ doctor: true, PageName: 'BTN_DoctorIMList' }) app.mpBehavior({ doctor:true, PageName: 'BTN_DoctorIMList' })
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
const { list } = this.data const { list } = this.data
const listItem: any = list[index] const listItem: any = list[index]
@ -106,7 +112,7 @@ Page({
}), }),
}) })
const header = this.selectComponent('#tabbar') const header = this.selectComponent('#tabbar')
header.getList() // 子组件的方法 header.getList() //子组件的方法
}) })
} }
}, },

2
src/pages/d_interactive/index.wxml

@ -33,7 +33,7 @@
<view class="list-item" wx:for="{{list}}" wx:key="index" bind:tap="handleDetail" data-index="{{index}}"> <view class="list-item" wx:for="{{list}}" wx:key="index" bind:tap="handleDetail" data-index="{{index}}">
<view class="avatar"> <view class="avatar">
<image class="a-img" src="{{item.userAvatar}}"></image> <image class="a-img" src="{{item.userAvatar}}"></image>
<view class="dot" wx:if="{{item.unReadCount>0}}">{{item.unReadCount> 99 ? '99+' : item.unReadCount}}</view> <view class="dot" wx:if="{{item.msgReadStatus==='2'}}"></view>
</view> </view>
<view class="wrap"> <view class="wrap">
<view class="w-header"> <view class="w-header">

3
src/pages/d_interactiveDoctor/index.json

@ -4,7 +4,6 @@
"usingComponents": { "usingComponents": {
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"navbar": "/components/navbar/index", "navbar": "/components/navbar/index",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index"
"popup": "/components/popup/index"
} }
} }

110
src/pages/d_interactiveDoctor/index.scss

@ -468,42 +468,13 @@ page {
padding: 32rpx 30rpx calc(32rpx + env(safe-area-inset-bottom)); padding: 32rpx 30rpx calc(32rpx + env(safe-area-inset-bottom));
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
gap: 20rpx; gap: 28rpx;
border-radius: 32rpx 32rpx 0 0; border-radius: 32rpx 32rpx 0 0;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04); box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
background-color: #fff; background-color: #fff;
.send { .send {
flex: 1; flex: 1;
padding: 0 12rpx 0 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
border-radius: 98rpx;
background-color: #f6f8f9;
.content {
padding: 10rpx 0;
flex: 1;
color: #adacb2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.btn {
flex-shrink: 0;
width: 188rpx;
height: 64rpx;
line-height: 64rpx;
font-size: 32rpx;
color: #ffffff;
text-align: center;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
border-radius: 111rpx 111rpx 111rpx 111rpx;
}
}
.short-send {
flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -520,7 +491,6 @@ page {
} }
} }
.send-date { .send-date {
text-align: center;
flex-shrink: 0; flex-shrink: 0;
font-size: 24rpx; font-size: 24rpx;
color: #283031; color: #283031;
@ -533,80 +503,6 @@ page {
} }
} }
.custom-input {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 30rpx;
box-sizing: border-box;
border-radius: 32rpx 32rpx 0 0;
background-color: #fff;
.icon {
position: relative;
width: 36rpx;
height: 36rpx;
overflow: visible;
&::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60rpx;
height: 60rpx;
background-color: transparent;
}
}
.wrap {
margin-top: 14rpx;
position: relative;
padding: 32rpx 32rpx 24rpx;
border-radius: 24rpx;
background-color: #f6f8f9;
.textarea {
width: 100%;
display: block;
height: 300rpx;
box-sizing: border-box;
padding-bottom: 80rpx;
background-color: transparent;
font-size: 32rpx;
.ka-container {
padding: 30rpx 62rpx;
display: flex;
align-items: center;
justify-content: space-between;
background-color: transparent;
.stat {
font-size: 28rpx;
color: #adacb2;
&.red {
color: #ef3939;
}
}
.send-btn {
width: 128rpx;
height: 64rpx;
text-align: center;
line-height: 64rpx;
font-size: 32rpx;
color: #ffffff;
background: #b982ff linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
border-radius: 111rpx 111rpx 111rpx 111rpx;
}
}
}
}
&.custom-input-max {
.wrap {
.textarea {
height: 43vh;
}
}
}
}
.popup-message { .popup-message {
padding: 30rpx; padding: 30rpx;
background-color: rgba(242, 244, 245, 1); background-color: rgba(242, 244, 245, 1);
@ -630,7 +526,7 @@ page {
background-color: #fff; background-color: #fff;
&.active { &.active {
color: #fff; color: #fff;
background-color: #b982ff; background-color: #B982FF;
} }
} }
} }
@ -641,7 +537,7 @@ page {
font-size: 36rpx; font-size: 36rpx;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-weight: bold; font-weight: bold;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); background: linear-gradient( 197deg, #FFBCF9 0%, #B982FF 100%);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

104
src/pages/d_interactiveDoctor/index.ts

@ -4,7 +4,7 @@ const app = getApp<IAppOption>()
interface IMessageItem { interface IMessageItem {
msgId: string msgId: string
msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息 msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息
msgContent: any msgContent: any
msgVisitTime: string msgVisitTime: string
msgVisitTimeType?: string msgVisitTimeType?: string
@ -13,7 +13,6 @@ interface IMessageItem {
msgCreateTime: string // 消息创建时间 msgCreateTime: string // 消息创建时间
msgCreateTimeName?: string // 消息创建时间 msgCreateTimeName?: string // 消息创建时间
showTime?: boolean showTime?: boolean
msgCustomSendStatus?: number | string
} }
interface Item { interface Item {
@ -23,20 +22,12 @@ interface Item {
Page({ Page({
data: { data: {
popupShow: false,
popupType: 'popup9',
popupParams: {} as any,
doctor: {} as any, doctor: {} as any,
patientId: '', patientId: '',
messageListShow: false, messageListShow: false,
patientDetail: {}, patientDetail: {},
inputShow: false,
maxTextArea: false,
focus: false,
isLoad: false, isLoad: false,
isFinish: false, isFinish: false,
scrollTop: 0, scrollTop: 0,
@ -49,8 +40,6 @@ Page({
week: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], week: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
timeDay: { 1: '上午', 2: '下午' }, timeDay: { 1: '上午', 2: '下午' },
customMessage: '',
}, },
innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null, innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null,
@ -108,8 +97,7 @@ Page({
}) })
}, },
getMessageList() { getMessageList() {
if (this.data.isLoad || this.data.isFinish) if (this.data.isLoad || this.data.isFinish) return
return
this.setData({ this.setData({
isLoad: true, isLoad: true,
}) })
@ -248,17 +236,6 @@ Page({
messageListShow: false, messageListShow: false,
}) })
}, },
handleInputShow() {
this.setData({
inputShow: true,
focus: true,
})
},
toggleMaxTextarea() {
this.setData({
maxTextArea: !this.data.maxTextArea,
})
},
handleWord(e) { handleWord(e) {
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
this.setData({ this.setData({
@ -348,14 +325,11 @@ Page({
let msgCreateTimeName = '' let msgCreateTimeName = ''
if (dayjs().format('YYYY-MM-DD') === dayjs(date).format('YYYY-MM-DD')) { if (dayjs().format('YYYY-MM-DD') === dayjs(date).format('YYYY-MM-DD')) {
msgCreateTimeName = dayjs(date).format('HH:mm') msgCreateTimeName = dayjs(date).format('HH:mm')
} } else if (dayjs().format('YYYY-MM-DD') === dayjs(date).add(1, 'day').format('YYYY-MM-DD')) {
else if (dayjs().format('YYYY-MM-DD') === dayjs(date).add(1, 'day').format('YYYY-MM-DD')) {
msgCreateTimeName = `昨天 ${dayjs(date).format('HH:mm')}` msgCreateTimeName = `昨天 ${dayjs(date).format('HH:mm')}`
} } else if (dayjs().diff(date, 'day') < 7) {
else if (dayjs().diff(date, 'day') < 7) {
msgCreateTimeName = dayjs(date).format(`dddd HH:mm`) msgCreateTimeName = dayjs(date).format(`dddd HH:mm`)
} } else {
else {
msgCreateTimeName = dayjs(date).format('YYYY-MM-DD HH:mm') msgCreateTimeName = dayjs(date).format('YYYY-MM-DD HH:mm')
} }
return msgCreateTimeName return msgCreateTimeName
@ -370,8 +344,7 @@ Page({
item.showTime = true item.showTime = true
preTime = dayjs(item.msgCreateTime).valueOf() preTime = dayjs(item.msgCreateTime).valueOf()
item.msgCreateTimeName = this.formatTime(item.msgCreateTime) item.msgCreateTimeName = this.formatTime(item.msgCreateTime)
} } else {
else {
const curTime = dayjs(item.msgCreateTime).valueOf() const curTime = dayjs(item.msgCreateTime).valueOf()
if (curTime - preTime > gapTime) { if (curTime - preTime > gapTime) {
item.showTime = true item.showTime = true
@ -470,71 +443,6 @@ Page({
}, },
}) })
}, },
handleHideKeyboard() {
if (this.data.inputShow) {
this.setData({
inputShow: false,
focus: false,
})
}
},
handleConfirm() {
const { customMessage } = this.data
this.handleHideKeyboard()
this.handleSendCustomMessage(customMessage)
},
handleSendCustomMessage(customMessage: string) {
if (!customMessage)
return
const { messageList, patientId } = this.data
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/message-interact/send-text-message',
data: {
text: customMessage,
patientId,
},
loading: true,
loadingText: '发送中...',
}).then((res) => {
if (res.errcode == 10001) {
this.setData({
popupShow: true,
popupType: 'popup9',
popupParams: {
message: res.errmsg,
},
})
return
}
const pushMessage: IMessageItem[] = [
{
msgId: '',
msgContentType: '12',
msgContent: customMessage,
msgVisitTime: '',
msgFromType: '2',
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
]
this.setData({
customMessage: '',
messageList: [...messageList, ...pushMessage],
})
this.filterCreateTime()
this.handleView()
})
},
handlePopupOk() {
this.setData({
popupShow: false,
})
},
handlePopupCancel() {
this.setData({
popupShow: false,
})
},
handleBack() { handleBack() {
wx.navigateBack() wx.navigateBack()
}, },

62
src/pages/d_interactiveDoctor/index.wxml

@ -4,7 +4,6 @@
<view <view
class="page" class="page"
style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+21}}px;" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;padding-top:{{pageTop+21}}px;"
bind:tap="handleHideKeyboard"
> >
<view class="page-header"> <view class="page-header">
<view class="user"> <view class="user">
@ -45,9 +44,7 @@
<image class="a-img" src="{{patientDetail.userAvatar}}"></image> <image class="a-img" src="{{patientDetail.userAvatar}}"></image>
</view> </view>
<view class="p-container"> <view class="p-container">
<block wx:if="{{message.msgContentType==='1' || message.msgContentType==='11'}}"> <view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
<view class="message">{{message.msgContent}}</view>
</block>
<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>
@ -83,11 +80,7 @@
</view> </view>
</view> </view>
</view> </view>
<block <view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
wx:elif="{{message.msgContentType==='1'|| message.msgContentType==='11' || message.msgContentType==='12'}}"
>
<view class="message">{{message.msgContent}}</view>
</block>
<view class="week" wx:elif="{{message.msgContentType==='2'}}"> <view class="week" wx:elif="{{message.msgContentType==='2'}}">
<view class="w-title">以下是我的出诊时间</view> <view class="w-title">以下是我的出诊时间</view>
<view class="w-container"> <view class="w-container">
@ -153,51 +146,14 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="page-footer"> <view class="page-footer">
<view class="send" wx:if="{{doctor.IsOpenOneToOne==1}}"> <view class="send" bind:tap="handleSendShow">发送消息</view>
<view class="content" catch:tap="handleInputShow">{{customMessage || '输入文字'}}</view>
<view class="btn" catch:tap="handleSendShow">快捷回复</view>
</view>
<view wx:else class="short-send" bind:tap="handleSendShow">发送消息</view>
<view class="send-date" bind:tap="handleSendDate"> <view class="send-date" bind:tap="handleSendDate">
<image class="icon" src="{{imageUrl}}za-images/3/icon-send-date.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}za-images/3/icon-send-date.png?t={{Timestamp}}"></image>
<view>出诊时间</view> <view>我的出诊时间</view>
</view> </view>
</view> </view>
</view> </view>
<view wx:if="{{inputShow}}" class="custom-input {{maxTextArea && 'custom-input-max'}}">
<image
wx:if="{{maxTextArea}}"
class="icon"
src="{{imageUrl}}icon98.png?t={{Timestamp}}"
catch:tap="toggleMaxTextarea"
></image>
<image wx:else class="icon" src="{{imageUrl}}icon97.png?t={{Timestamp}}" catch:tap="toggleMaxTextarea"></image>
<view class="wrap" catch:tap="catchFooterInput">
<textarea
class="textarea"
model:value="{{customMessage}}"
focus="{{focus}}"
hold-keyboard
disable-default-padding
confirm-type="send"
adjust-keyboard-to="bottom"
maxlength="{{500}}"
placeholder="输入文字"
bind:blur="bindblur"
bindconfirm="handleConfirm"
>
<keyboard-accessory class="ka" hold-keyboard="{{true}}" style="background-color: #fff;">
<cover-view class="ka-container">
<cover-view class="stat {{customMessage.length==500 && 'red'}}">{{customMessage.length}}/500</cover-view>
<cover-view class="send-btn" bind:tap="handleConfirm">发送</cover-view>
</cover-view>
</keyboard-accessory>
</textarea>
<view class="w-footer"></view>
</view>
</view>
<van-popup <van-popup
show="{{ messageListShow }}" show="{{ messageListShow }}"
style="--popup-close-icon-color: #283031" style="--popup-close-icon-color: #283031"
@ -207,7 +163,7 @@
closeable closeable
> >
<view class="popup-message"> <view class="popup-message">
<view class="title">快捷回复</view> <view class="title">发送消息</view>
<view class="list"> <view class="list">
<view <view
class="l-item {{wordIndex===index && 'active'}}" class="l-item {{wordIndex===index && 'active'}}"
@ -222,11 +178,3 @@
<view class="submit" bind:tap="handleSendWord">发送</view> <view class="submit" bind:tap="handleSendWord">发送</view>
</view> </view>
</van-popup> </van-popup>
<popup
show="{{popupShow}}"
type="{{popupType}}"
params="{{popupParams}}"
bind:ok="handlePopupOk"
bind:cancel="handlePopupCancel"
></popup>

2
src/pages/d_invite/index.ts

@ -18,7 +18,7 @@ Page({
}) })
} }
app.waitLogin().then((_res) => { app.waitLogin().then((_res) => {
app.mpBehavior({ doctor: true, PageName: 'PG_DoctorCode' }) app.mpBehavior({ doctor:true, PageName: 'PG_DoctorCode' })
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
}) })

1
src/pages/d_invite/index.wxml

@ -4,4 +4,3 @@
</view> </view>
<customPoster params="{{params}}" bind:finish="handlePosterFinish"></customPoster> <customPoster params="{{params}}" bind:finish="handlePosterFinish"></customPoster>

2
src/pages/d_patient/index.wxml

@ -35,7 +35,7 @@
<view class="edc" wx:if="{{item.IsEDC==1}}">EDC患者</view> <view class="edc" wx:if="{{item.IsEDC==1}}">EDC患者</view>
</view> </view>
</view> </view>
<view class="replay-date">邀约时间:{{item.InviteTime}}</view> <view class="replay-date">注册时间:{{item.BecomePatientTime}}</view>
</view> </view>
<view class="send" catch:tap="handleSend" data-index="{{index}}">消息</view> <view class="send" catch:tap="handleSend" data-index="{{index}}">消息</view>
</view> </view>

16
src/pages/home/index.ts

@ -42,7 +42,6 @@ Page({
onShow() { onShow() {
app.waitLogin({ type: [2] }).then(() => { app.waitLogin({ type: [2] }).then(() => {
app.mpBehavior({ doctor: true, PageName: 'PG_DoctorHome' }) app.mpBehavior({ doctor: true, PageName: 'PG_DoctorHome' })
app.setTabbarNoticeMessage()
this.getNotice() this.getNotice()
this.getBanner() this.getBanner()
this.getList() this.getList()
@ -60,7 +59,6 @@ Page({
}) })
}) })
}, },
getNoticeNum() {},
getTab() { getTab() {
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
@ -138,8 +136,7 @@ Page({
}) })
}, },
}) })
} } else {
else {
this.handleNotice() this.handleNotice()
} }
}, },
@ -170,8 +167,7 @@ Page({
handleBanner(e) { handleBanner(e) {
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
const { LinkUrl } = this.data.bannerList[index] const { LinkUrl } = this.data.bannerList[index]
if (!LinkUrl) if (!LinkUrl) return
return
wx.navigateTo({ wx.navigateTo({
url: LinkUrl, url: LinkUrl,
fail() { fail() {
@ -271,8 +267,7 @@ Page({
if (params.ContentType === '5' && params.FileList[0]) { if (params.ContentType === '5' && params.FileList[0]) {
app.oldMpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string }) app.oldMpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string })
this.handleFile(params.FileList[0]) this.handleFile(params.FileList[0])
} } else {
else {
wx.navigateTo({ wx.navigateTo({
url: `/pages/informationDetail/index?id=${id}`, url: `/pages/informationDetail/index?id=${id}`,
}) })
@ -298,8 +293,7 @@ Page({
wx.hideLoading() wx.hideLoading()
}, },
}) })
} } else {
else {
wx.hideLoading() wx.hideLoading()
wx.showToast({ wx.showToast({
title: '下载文件失败', title: '下载文件失败',
@ -363,7 +357,7 @@ Page({
4: '根据GO-QOL变化情况激素用量情况,判断筛选的不达标需干预的患者。', 4: '根据GO-QOL变化情况激素用量情况,判断筛选的不达标需干预的患者。',
}[question] }[question]
wx.showModal({ wx.showModal({
content, content: content,
confirmColor: '#8c75d0', confirmColor: '#8c75d0',
showCancel: false, showCancel: false,
confirmText: '知道了', confirmText: '知道了',

2
src/pages/home/index.wxml

@ -68,7 +68,7 @@
<view class="wrap"> <view class="wrap">
<view class="num-line"> <view class="num-line">
{{item.Composite}} {{item.Composite}}
<view class="sub">入组</view> <view class="sub">入组</view>
</view> </view>
<image wx:if="{{item.Url}}" class="icon" src="{{imageUrl}}icon23.png?t={{Timestamp}}"></image> <image wx:if="{{item.Url}}" class="icon" src="{{imageUrl}}icon23.png?t={{Timestamp}}"></image>
</view> </view>

2
src/pages/message/index.wxml

@ -18,7 +18,7 @@
<view class="num-wrap"> <view class="num-wrap">
<view class="num-line"> <view class="num-line">
{{item.Composite}} {{item.Composite}}
<view class="sub">入组</view> <view class="sub">入组</view>
</view> </view>
<image wx:if="{{item.Url}}" class="icon" src="{{imageUrl}}icon23.png?t={{Timestamp}}"></image> <image wx:if="{{item.Url}}" class="icon" src="{{imageUrl}}icon23.png?t={{Timestamp}}"></image>
</view> </view>

39
src/pages/start/index.ts

@ -1,54 +1,47 @@
const app = getApp<IAppOption>() const app = getApp<IAppOption>();
Page({ Page({
data: {}, data: {},
onLoad() { onLoad() {
app.waitLogin().then(() => { app.waitLogin().then(() => {
const { isLogin, isNewReg, loginType, scene } = app.globalData const { isLogin, isNewReg, loginType } = app.globalData;
if (isLogin === 0) { if (isLogin === 0) {
// 未登录用户,扫医生邀请码,重定向到患者登录页
if (scene?.doctorId) {
wx.reLaunch({
url: '/patient/pages/login/index',
})
return
}
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}) });
return return;
} }
if (loginType === 0) { if (loginType === 0) {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}) });
return return;
} }
if (loginType === 1) { if (loginType === 1) {
if (isNewReg === 1) { if (isNewReg === 1) {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}) });
return return;
} }
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/enterInfo/index', url: '/patient/pages/enterInfo/index',
}) });
return return;
} }
if (loginType === 2) { if (loginType === 2) {
if (isNewReg === 1) { if (isNewReg === 1) {
wx.reLaunch({ wx.reLaunch({
url: '/pages/home/index', url: '/pages/home/index',
}) });
return return;
} }
wx.reLaunch({ wx.reLaunch({
url: '/pages/login/index', url: '/pages/login/index',
}) });
} }
}) });
}, },
}) });
export {} export {};

258
src/patient/pages/doctor/index.scss

@ -1,12 +1,13 @@
page { page {
background-color: #f6f8f9; background-color: #fafafa;
} }
.page { .page {
padding-bottom: 200rpx; padding-bottom: 200rpx;
.page-header { .page-header {
margin-bottom: 30rpx; margin-bottom: 30rpx;
padding: 10rpx 32rpx 0; padding: 40rpx 32rpx 0;
background-color: #fff;
.site-line { .site-line {
padding: 30rpx 0 0; padding: 30rpx 0 0;
display: flex; display: flex;
@ -23,7 +24,7 @@ page {
} }
.name { .name {
font-size: 32rpx; font-size: 32rpx;
color: #211d2e; color: rgba(46, 45, 45, 1);
} }
.triangle { .triangle {
width: 0; width: 0;
@ -37,7 +38,7 @@ page {
width: 172rpx; width: 172rpx;
height: 60rpx; height: 60rpx;
font-size: 32rpx; font-size: 32rpx;
color: #adacb2; color: rgba(46, 45, 45, 0.6);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -61,7 +62,7 @@ page {
font-size: 28rpx; font-size: 28rpx;
} }
.place-input { .place-input {
color: #adacb2; color: rgba(168, 168, 168, 1);
} }
} }
.tabs { .tabs {
@ -78,7 +79,7 @@ page {
.van-tabs__line { .van-tabs__line {
width: 34rpx !important; width: 34rpx !important;
height: 8rpx; height: 8rpx;
background: #b982ff; background: #e04775;
border-radius: 4rpx; border-radius: 4rpx;
} }
} }
@ -101,7 +102,7 @@ page {
right: 0; right: 0;
width: 112rpx; width: 112rpx;
height: 42rpx; height: 42rpx;
background: #b982ff; background: #e04775;
border-radius: 0rpx 24rpx 0rpx 24rpx; border-radius: 0rpx 24rpx 0rpx 24rpx;
border: 2rpx solid #ebecee; border: 2rpx solid #ebecee;
font-size: 24rpx; font-size: 24rpx;
@ -125,22 +126,24 @@ page {
.wrap { .wrap {
flex: 1; flex: 1;
.title { .title {
display: flex;
align-items: center;
.name { .name {
margin-right: 12rpx;
font-size: 32rpx; font-size: 32rpx;
color: #211d2e; color: #484848;
word-break: break-all; word-break: break-all;
line-height: 48rpx; line-height: 48rpx;
} }
.tag { .tag {
flex-shrink: 0; flex-shrink: 0;
display: inline-block; display: inline-block;
vertical-align: 2rpx; vertical-align: middle;
margin-left: 12rpx;
padding: 6rpx 12rpx; padding: 6rpx 12rpx;
font-size: 22rpx; font-size: 22rpx;
line-height: 1; line-height: 1;
color: #ffffff; color: #ffffff;
background: #ffa300; background: #ffc137;
border-radius: 8rpx; border-radius: 8rpx;
} }
} }
@ -153,12 +156,12 @@ page {
.site { .site {
flex: 1; flex: 1;
font-size: 24rpx; font-size: 24rpx;
color: #adacb2; color: #9b9ea6;
} }
.site-num { .site-num {
flex-shrink: 0; flex-shrink: 0;
font-size: 24rpx; font-size: 24rpx;
color: #adacb2; color: #9b9ea6;
} }
.icon { .icon {
flex-shrink: 0; flex-shrink: 0;
@ -171,19 +174,19 @@ page {
margin-top: 16rpx; margin-top: 16rpx;
margin-right: 22rpx; margin-right: 22rpx;
display: inline-block; display: inline-block;
padding: 4rpx 16rpx 4rpx 16rpx; padding: 4rpx 16rpx 6rpx 16rpx;
line-height: 1; line-height: 1;
font-size: 22rpx; font-size: 22rpx;
color: #b982ff; color: #e04775;
border-radius: 8rpx; border-radius: 8rpx;
border: 1rpx solid #b982ff; border: 1rpx solid #e04775;
} }
.drug { .drug {
vertical-align: middle; vertical-align: middle;
padding-right: 8rpx; padding-right: 8rpx;
display: inline-block; display: inline-block;
font-size: 22rpx; font-size: 22rpx;
color: #b982ff; color: #e04775;
line-height: 1; line-height: 1;
border-radius: 8rpx; border-radius: 8rpx;
background-color: #f5dfe6; background-color: #f5dfe6;
@ -193,7 +196,7 @@ page {
padding: 8rpx 10rpx; padding: 8rpx 10rpx;
width: 16rpx; width: 16rpx;
height: 20rpx; height: 20rpx;
background-color: #b982ff; background-color: #e04775;
} }
} }
} }
@ -202,7 +205,7 @@ page {
} }
.dtp { .dtp {
padding: 0 30rpx; padding: 32rpx 30rpx 0;
.dtp-item { .dtp-item {
margin-bottom: 24rpx; margin-bottom: 24rpx;
padding: 32rpx; padding: 32rpx;
@ -224,9 +227,32 @@ page {
padding-left: 16rpx; padding-left: 16rpx;
.title { .title {
font-size: 32rpx; font-size: 32rpx;
color: #211d2e; color: #484848;
font-weight: bold; font-weight: bold;
} }
.tags {
margin-top: 16rpx;
display: flex;
.tag {
margin-right: 16rpx;
padding-right: 8rpx;
font-size: 22rpx;
color: #e04775;
line-height: 1;
border-radius: 8rpx;
background-color: #f5dfe6;
display: flex;
align-items: center;
.icon {
margin-right: 8rpx;
padding: 4rpx;
width: 24rpx;
max-height: 24rpx;
background-color: #e04775;
border-radius: 8rpx;
}
}
}
.content { .content {
margin-top: 32rpx; margin-top: 32rpx;
display: flex; display: flex;
@ -234,42 +260,37 @@ page {
.inner { .inner {
.site { .site {
font-size: 24rpx; font-size: 24rpx;
color: #adacb2; color: #9e9e9e;
} }
.tel { .tel {
font-size: 24rpx; font-size: 24rpx;
color: #adacb2; color: #9b9ea6;
} }
} }
.options { .phone {
margin-left: 20rpx;
flex-shrink: 0;
width: 48rpx;
height: 48rpx;
border-radius: 50%;
display: flex; display: flex;
align-items: center; align-items: center;
.phone-icon { justify-content: center;
margin-left: 16rpx; background-color: #fff;
flex-shrink: 0; box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.1);
width: 44rpx; &-img {
height: 44rpx; width: 24rpx;
} height: 24rpx;
.map-icon {
margin-left: 16rpx;
flex-shrink: 0;
width: 44rpx;
height: 44rpx;
} }
} }
} }
} }
} }
} }
.infusion-center {
margin-top: 20rpx; .module {
margin-top: 64rpx;
padding: 0 30rpx; padding: 0 30rpx;
.tip {
font-size: 28rpx;
color: #d0d0d0;
text-align: center;
margin-bottom: 40rpx;
}
.card { .card {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 32rpx; padding: 32rpx;
@ -282,54 +303,141 @@ page {
.avatar { .avatar {
margin-right: 18rpx; margin-right: 18rpx;
flex-shrink: 0; flex-shrink: 0;
width: 136rpx; width: 140rpx;
height: 136rpx; height: 140rpx;
border-radius: 16rpx; border-radius: 16rpx;
} }
.wrap { .wrap {
flex: 1;
position: relative; position: relative;
padding-right: 120rpx;
flex: 1;
.name { .name {
max-width: 15em; font-size: 44rpx;
font-size: 32rpx; color: #484848;
color: #211d2e; }
font-weight: bold; .title {
.name {
margin-left: 12rpx;
font-size: 28rpx;
color: #484848;
word-break: break-all;
line-height: 42rpx;
}
.tag {
flex-shrink: 0;
display: inline-block;
vertical-align: middle;
padding: 4rpx 12rpx;
font-size: 22rpx;
line-height: 1;
color: #ffffff;
background: #ffc137;
border-radius: 8rpx;
}
} }
.w-content { .w-content {
margin-top: 20rpx; margin-top: 16rpx;
display: flex;
align-items: center;
.inner { .inner {
flex: 1; flex: 1;
display: flex;
justify-content: space-between;
.site { .site {
flex: 1; flex: 1;
font-size: 24rpx; font-size: 24rpx;
line-height: 32rpx; color: #9b9ea6;
color: #adacb2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
.tel { .site-box {
margin-top: 8rpx; position: absolute;
font-size: 24rpx; right: 0;
line-height: 32rpx; top: 70rpx;
color: #adacb2; text-align: center;
.site-num {
flex-shrink: 0;
font-size: 24rpx;
color: #9b9ea6;
}
.icon {
flex-shrink: 0;
margin-left: 14rpx;
width: 36rpx;
height: 36rpx;
}
} }
} }
.site-box { }
margin-left: 16rpx; }
flex-shrink: 0; }
display: flex; .content {
gap: 16rpx; margin-top: 6rpx;
.icon { padding-left: 158rpx;
flex-shrink: 0; .row {
width: 44rpx; margin-top: 16rpx;
height: 44rpx; display: flex;
border-radius: 50%; align-items: flex-start;
} flex-wrap: wrap;
// .tag {
// margin-right: 16rpx;
// flex-shrink: 0;
// padding: 8rpx 16rpx;
// font-size: 24rpx;
// color: #e04775;
// line-height: 1;
// background: #fcf2f6;
// border-radius: 8rpx;
// border: 2rpx solid #e04775;
// }
.p {
font-size: 24rpx;
line-height: 38rpx;
color: #9da0a8;
&.ellipsis {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
.tag {
margin-right: 16rpx;
margin-bottom: 10rpx;
width: 120rpx;
height: 32rpx;
background: #ffe6ee;
border-radius: 8rpx;
display: flex;
.week {
flex: 1;
font-size: 20rpx;
line-height: 32rpx;
color: #ffffff;
background-color: #e66c8e;
text-align: center;
border-radius: 8rpx 0 8rpx 8rpx;
}
.value {
flex: 1;
font-size: 20rpx;
color: #e04775;
text-align: center;
line-height: 32rpx;
}
}
.week-name {
flex: 1;
padding: 20rpx 24rpx;
background-color: rgba(253, 244, 247, 1);
border-radius: 16rpx;
font-size: 24rpx;
color: rgba(157, 160, 168, 1);
line-height: 40rpx;
.label {
margin-right: 12rpx;
display: inline-block;
font-size: 20rpx;
color: rgba(255, 255, 255, 1);
line-height: 32rpx;
padding: 0 8rpx;
background: #e04775;
border-radius: 8rpx 8rpx 8rpx 8rpx;
} }
} }
} }

166
src/patient/pages/doctor/index.ts

@ -1,5 +1,3 @@
import licia from 'miniprogram-licia'
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
Page({ Page({
@ -10,7 +8,6 @@ Page({
HosList: [], HosList: [],
DoctortList: [], DoctortList: [],
dtpList: [], dtpList: [],
infusionCenterList: [],
pagination: { pagination: {
page: 1, page: 1,
pages: 1, pages: 1,
@ -33,14 +30,13 @@ Page({
areaShow: false, areaShow: false,
toastShow: false, toastShow: false,
// toastType: 'dtpDrug', // toastType: 'dtpDrug',// TODO:已销毁
toastType: 'siteConform', toastType: 'siteConform',
toastParams: {} as any, toastParams: {} as any,
es: '', es: '',
locationName: '重新定位', locationName: '重新定位',
atvs: {},
}, },
onLoad(options) { onLoad(options) {
const SystemInfo = app.globalSystemInfo const SystemInfo = app.globalSystemInfo
@ -50,33 +46,21 @@ Page({
bottom, bottom,
}) })
} }
app.waitLogin({ type: [0, 1] }).then(() => { app.zdWaitLogin().then((_res) => {
this.getConfig(options) if (options.es === '201504') {
}) app.globalData.IsAliQiWei = 1
},
getConfig(options) { this.setData({
wx.ajax({ es: options.es,
method: 'GET',
url: '?r=zd/mini-conf/get-config',
data: {
userType: 3,
code: 'serviceConf',
},
}).then((res) => {
const atvs = { length: 0 }
res[0].subList
.filter(item => item.showStatus == 1)
.forEach((item: any) => {
atvs[licia.getUrlParam('active', item.linkUrl) || 0] = true
}) })
atvs.length = Object.keys(atvs).length }
this.setData({
atvs, if (options.active && ['1', '2'].includes(options.active)) {
})
if (options.active && ['1', '2'].includes(options.active) && Object.keys(atvs).includes(options.active)) {
this.setData({ this.setData({
tabActive: Number(options.active), tabActive: Number(options.active),
}) })
} else {
} }
if (options.pid) { if (options.pid) {
this.setData({ this.setData({
@ -86,62 +70,58 @@ Page({
CityId: options.cid || '', CityId: options.cid || '',
}) })
this.getList() this.getList()
} } else {
else {
this.handleToggleSite() this.handleToggleSite()
} }
}) })
}, },
handleToggleSite() { handleToggleSite() {
const that = this
if (!this.data.LNG) { if (!this.data.LNG) {
wx.getSetting({ wx.getSetting({
success: (res) => { success(res) {
if ( if (
res.authSetting['scope.userFuzzyLocation'] != undefined res.authSetting['scope.userFuzzyLocation'] != undefined &&
&& res.authSetting['scope.userFuzzyLocation'] == true res.authSetting['scope.userFuzzyLocation'] == true
) { ) {
// 获取当前位置 //获取当前位置
this.getFuzzyLocation() that.getFuzzyLocation()
} } else if (res.authSetting['scope.userFuzzyLocation'] == undefined) {
else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { //获取当前位置
// 获取当前位置 that.getFuzzyLocation()
this.getFuzzyLocation() } else {
}
else {
wx.showModal({ wx.showModal({
title: '请求授权当前位置', title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权', content: '需要获取您的地理位置,请确认授权',
confirmColor: '#8c75d0', confirmColor: '#8c75d0',
success: (res) => { success(res) {
if (res.cancel) { if (res.cancel) {
// 取消授权 //取消授权
wx.showToast({ wx.showToast({
title: '拒绝授权', title: '拒绝授权',
icon: 'none', icon: 'none',
duration: 1000, duration: 1000,
}) })
this.getList() that.getList()
} } else if (res.confirm) {
else if (res.confirm) { //确定授权,通过wx.openSetting发起授权请求
// 确定授权,通过wx.openSetting发起授权请求
wx.openSetting({ wx.openSetting({
success: (res) => { success(res) {
if (res.authSetting['scope.userFuzzyLocation'] == true) { if (res.authSetting['scope.userFuzzyLocation'] == true) {
wx.showToast({ wx.showToast({
title: '授权成功', title: '授权成功',
icon: 'success', icon: 'success',
duration: 1000, duration: 1000,
}) })
// 再次授权,调用wx.getLocation的API //再次授权,调用wx.getLocation的API
this.getFuzzyLocation() that.getFuzzyLocation()
} } else {
else {
wx.showToast({ wx.showToast({
title: '授权失败', title: '授权失败',
icon: 'none', icon: 'none',
duration: 1000, duration: 1000,
}) })
this.getList() that.getList()
} }
}, },
}) })
@ -151,9 +131,8 @@ Page({
} }
}, },
}) })
} } else {
else { that.setData({
this.setData({
LNG: '', LNG: '',
LAT: '', LAT: '',
}) })
@ -161,20 +140,23 @@ Page({
} }
}, },
getFuzzyLocation() { getFuzzyLocation() {
const that = this
wx.getFuzzyLocation({ wx.getFuzzyLocation({
success: (res) => { success(res) {
this.setData({ that.setData({
LNG: res.longitude, LNG: res.longitude,
LAT: res.latitude, LAT: res.latitude,
}) })
this.getLocationInfo() that.getLocationInfo()
}, },
fail: (err) => { fail() {
console.log('DEBUGPRINT[99]: index.ts:147: err=', err) that.getList()
this.getList()
}, },
}) })
}, },
handleTapSite() {
},
handleChangeSite(e: WechatMiniprogram.CustomEvent) { handleChangeSite(e: WechatMiniprogram.CustomEvent) {
const detail = e.detail const detail = e.detail
this.setData({ this.setData({
@ -186,7 +168,14 @@ Page({
this.getList() this.getList()
}, },
onChange(e: WechatMiniprogram.CustomEvent) { onChange(e: WechatMiniprogram.CustomEvent) {
const index = e.detail.name const index = e.detail.index
if (index == 0) {
} else if (index == 1) {
} else if (index == 2) {
}
this.setData({ this.setData({
tabActive: index, tabActive: index,
}) })
@ -223,12 +212,10 @@ Page({
} }
if (tabActive == 0) { if (tabActive == 0) {
this.getHosList() this.getHosList()
} } else if (tabActive == 1) {
else if (tabActive == 1) {
this.getDtpList() this.getDtpList()
} } else if (tabActive == 2) {
else if (tabActive == 2) { this.getDoctorList()
this.getInfusionCenter()
} }
}, },
getHosList() { getHosList() {
@ -253,11 +240,11 @@ Page({
}) })
}) })
}, },
getDtpList() { getDoctorList() {
const { Name, LNG, LAT, ProvinceId, CityId } = this.data const { Name, LNG, LAT, ProvinceId, CityId } = this.data
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/dtp-pharmacy/list', url: '?r=zd/doctor/list',
data: { data: {
lng: LNG, lng: LNG,
lat: LAT, lat: LAT,
@ -267,16 +254,33 @@ Page({
}, },
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
dtpList: res.list,
locationName: '重新定位', locationName: '重新定位',
DoctortList: res.map((item: { Clinic: string }) => {
let weekName = ''
if (item.ClinicType == 2) {
weekName = item.Clinic
} else {
weekName = (JSON.parse(item.Clinic) ? JSON.parse(item.Clinic) : []).map(
(subItem: { weekday: string | number; timeType: string | number }) => {
const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
const timeDay = { 1: '上午', 2: '下午' }
return { week: week[Number(subItem.weekday) - 1], timeDay: timeDay[subItem.timeType] }
},
)
}
return {
weekName,
...item,
}
}),
}) })
}) })
}, },
getInfusionCenter() { getDtpList() {
const { Name, LNG, LAT, ProvinceId, CityId } = this.data const { Name, LNG, LAT, ProvinceId, CityId } = this.data
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=xd/infusion-center/list', url: '?r=zd/dtp-pharmacy/list',
data: { data: {
lng: LNG, lng: LNG,
lat: LAT, lat: LAT,
@ -286,7 +290,7 @@ Page({
}, },
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
infusionCenterList: Array.isArray(res) ? res : res.list, dtpList: res.list,
locationName: '重新定位', locationName: '重新定位',
}) })
}) })
@ -314,6 +318,14 @@ Page({
}, },
handleDetail(e: WechatMiniprogram.CustomEvent) { handleDetail(e: WechatMiniprogram.CustomEvent) {
const { url } = e.currentTarget.dataset const { url } = e.currentTarget.dataset
const { tabActive } = this.data
if (tabActive == 0) {
} else if (tabActive == 1) {
} else if (tabActive == 2) {
}
wx.navigateTo({ wx.navigateTo({
url, url,
}) })
@ -389,8 +401,7 @@ Page({
}) })
}, },
handleDefultLocation() { handleDefultLocation() {
if (this.data.locationName === '定位中') if (this.data.locationName === '定位中') return
return
this.setData({ this.setData({
locationName: '定位中', locationName: '定位中',
}) })
@ -417,9 +428,8 @@ Page({
return { return {
title: '【就诊地图】帮您快速找到医生和医院', title: '【就诊地图】帮您快速找到医生和医院',
imageUrl: `${app.globalData.imageUrl}5/share1.png?t=${app.globalData.Timestamp}`,
path, path,
} }
}, },
}) })
export {}

147
src/patient/pages/doctor/index.wxml

@ -1,7 +1,10 @@
<page-meta page-style="{{ areaShow || toastShow ? 'overflow: hidden;' : '' }}" /> <page-meta page-style="{{ areaShow || toastShow ? 'overflow: hidden;' : '' }}" />
<view class="page" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx;"> <view class="page">
<view class="page-header"> <view
class="page-header"
style="background: url({{imageUrl}}za-images//bg1.png?t={{Timestamp}}) no-repeat top center / 100% 444rpx;"
>
<navBar background="{{background}}" title="就诊地图" back bind:back="handleBack"></navBar> <navBar background="{{background}}" title="就诊地图" back bind:back="handleBack"></navBar>
<view class="site-line"> <view class="site-line">
<pickerArea <pickerArea
@ -9,14 +12,13 @@
pid="{{ProvinceId}}" pid="{{ProvinceId}}"
cid="{{CityId}}" cid="{{CityId}}"
cname="{{CityName}}" cname="{{CityName}}"
bind:tap="handleTapSite"
bind:ok="handleChangeSite" bind:ok="handleChangeSite"
bind:show="handleSiteShareShow" bind:show="handleSiteShareShow"
> >
<view class="area"> <view class="area">
<image class="icon" src="{{imageUrl}}icon88.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}za-images//1.5/n-site.png"></image>
<view class="name" wx:if="{{ProvinceName}}"> <view class="name" wx:if="{{ProvinceName}}">{{ProvinceName}}{{ProvinceName == CityName ? '' : CityName}}</view>
{{ProvinceName}}{{ProvinceName == CityName ? '' : CityName}}
</view>
<view class="name" wx:else>请选择省市</view> <view class="name" wx:else>请选择省市</view>
<view class="triangle"></view> <view class="triangle"></view>
</view> </view>
@ -24,7 +26,7 @@
<view class="btn" bind:tap="handleDefultLocation">{{locationName}}</view> <view class="btn" bind:tap="handleDefultLocation">{{locationName}}</view>
</view> </view>
<view class="search"> <view class="search">
<image class="icon" src="{{imageUrl}}icon89.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}za-images//1.5/search.png"></image>
<input <input
class="input" class="input"
model:value="{{Name}}" model:value="{{Name}}"
@ -34,19 +36,19 @@
bind:blur="handleBlur" bind:blur="handleBlur"
/> />
</view> </view>
<view class="tabs" style="top:{{bottom}}px;" wx:if="{{atvs.length>2}}"> <view class="tabs" style="top:{{bottom}}px;background:{{background}}">
<van-tabs <van-tabs
active="{{ tabActive }}" active="{{ tabActive }}"
title-active-color="#211D2E" title-active-color="#484848"
title-inactive-color="#ADACB2" title-inactive-color="#9E9E9E"
color="#B982FF" color="#E04775"
tab-class="tab-class" tab-class="tab-class"
tab-active-class="tab-active-class" tab-active-class="tab-active-class"
bind:change="onChange" bind:change="onChange"
> >
<van-tab name="{{0}}" wx:if="{{atvs[0]}}" title="查询医院"></van-tab> <van-tab title="查询医院"></van-tab>
<van-tab name="{{1}}" wx:if="{{atvs[1]}}" title="查询药房"></van-tab> <van-tab title="查询药房"></van-tab>
<van-tab name="{{2}}" wx:if="{{atvs[2]}}" title="输注中心"></van-tab> <!-- <van-tab title="就诊医生"></van-tab> -->
</van-tabs> </van-tabs>
</view> </view>
</view> </view>
@ -81,7 +83,7 @@
data-lng="{{item.LNG}}" data-lng="{{item.LNG}}"
data-address="{{item.ProvinceName}}{{item.CityName}}{{item.CountyName}}{{item.Address}}" data-address="{{item.ProvinceName}}{{item.CityName}}{{item.CountyName}}{{item.Address}}"
data-name="{{item.Name}}" data-name="{{item.Name}}"
src="{{imageUrl}}icon90.png?t={{Timestamp}}" src="{{imageUrl}}za-images//1.5/site-circle.png"
></image> ></image>
</view> </view>
<view class="tag" wx:if="{{item.DoctorNum>0}}">{{item.DoctorNum}}名医生</view> <view class="tag" wx:if="{{item.DoctorNum>0}}">{{item.DoctorNum}}名医生</view>
@ -99,7 +101,7 @@
<view <view
class="dtp-item" class="dtp-item"
bind:tap="handleDetail" bind:tap="handleDetail"
data-url="/gift/pages/dtpDurg/index?id={{item.Id}}" data-url="/patient/pages/dtpDurg/index?id={{item.Id}}"
wx:for="{{dtpList}}" wx:for="{{dtpList}}"
wx:key="index" wx:key="index"
> >
@ -109,27 +111,23 @@
</view> </view>
<view class="wrap"> <view class="wrap">
<view class="title">{{item.Name}}</view> <view class="title">{{item.Name}}</view>
<view class="tags">
<view class="tag" wx:if="{{item.IsOwnInfusionCenter==1}}">
<image class="icon" mode="widthFix" src="{{imageUrl}}za-images//nrdl/inject.png"></image>
自有输注中心
</view>
<view class="tag" wx:if="{{item.IsCooperationInfusionCenter==1}}">
<image class="icon" mode="widthFix" src="{{imageUrl}}za-images//nrdl/cooperate.png"></image>
合作输注中心
</view>
</view>
<view class="content"> <view class="content">
<view class="inner"> <view class="inner">
<view class="site">{{item.ProvinceName}}{{item.CityName}}{{item.CountyName}}{{item.Address}}</view> <view class="site">{{item.ProvinceName}}{{item.CityName}}{{item.CountyName}}{{item.Address}}</view>
<view class="tel">{{item.Telephone}}</view> <view class="tel">{{item.Telephone}}</view>
</view> </view>
<view class="options"> <view class="phone extend-via-pseudo-elem" catch:tap="handleDtpPhone" data-tel="{{item.Telephone}}">
<image <image class="phone-img" src="{{imageUrl}}za-images//nrdl/phone.png"></image>
class="phone-icon"
catch:tap="handleDtpPhone"
data-tel="{{item.Telephone}}"
src="{{imageUrl}}icon93.png?t={{Timestamp}}"
></image>
<image
class="map-icon"
catch:tap="handleOpenMap"
data-lat="{{item.LAT}}"
data-lng="{{item.LNG}}"
data-address="{{item.ProvinceName}}{{item.CityName}}{{item.CountyName}}{{item.Address}}"
data-name="{{item.Name}}"
src="{{imageUrl}}icon94.png?t={{Timestamp}}"
></image>
</view> </view>
</view> </view>
</view> </view>
@ -137,45 +135,66 @@
<pagination wx:if="{{!dtpList.length}}" pagination="{{pagination}}"></pagination> <pagination wx:if="{{!dtpList.length}}" pagination="{{pagination}}"></pagination>
</view> </view>
<view class="infusion-center" wx:if="{{tabActive==2}}"> <view class="module" wx:if="{{tabActive==2}}">
<view <view
class="card" class="card"
wx:for="{{infusionCenterList}}" wx:for="{{DoctortList}}"
wx:key="index" wx:key="index"
bind:tap="handleDoctor"
bind:tap="handleDetail" bind:tap="handleDetail"
data-url="/patient/pages/infusionCenter/index?id={{item.Id}}" data-url="/patient/pages/doctorDetail/index?id={{item.Id}}"
> >
<view class="c-header"> <view class="c-header">
<image class="avatar" mode="aspectFill" src="{{item.ImgUrl}}"></image> <image class="avatar" mode="aspectFill" src="{{item.Img}}"></image>
<view class="wrap"> <view class="wrap">
<view class="name">{{item.Name}}</view> <view class="name">{{item.Name}}</view>
<view class="title">
<view class="tag" wx:if="{{item.hospital.HospitalClassificationName || item.hospital.HospitalLevelName}}">
{{item.hospital.HospitalClassificationName}}{{item.hospital.HospitalLevelName}}
</view>
<text class="name">{{item.hospital.Name}}</text>
</view>
<view class="w-content"> <view class="w-content">
<view class="inner"> <view class="inner">
<view class="site">{{item.ProvinceName}}{{item.CityName}}{{item.CountyName}}{{item.Address}}</view> <view class="site">
<view class="tel">{{item.Telephone}}</view> {{item.hospital.ProvinceName}}{{item.hospital.CityName}}{{item.hospital.CountyName}}{{item.hospital.Address}}
</view> </view>
<view class="site-box"> <view class="site-box">
<image <image
class="icon" class="icon"
catch:tap="handleDtpPhone" catch:tap="handleOpenMap"
data-tel="{{item.Telephone}}" data-lat="{{item.hospital.LAT}}"
src="{{imageUrl}}icon93.png?t={{Timestamp}}" data-lng="{{item.hospital.LNG}}"
></image> data-address="{{item.hospital.ProvinceName}}{{item.hospital.CityName}}{{item.hospital.CountyName}}{{item.hospital.Address}}"
<image data-name="{{item.hospital.Name}}"
class="icon" src="{{imageUrl}}za-images//1.5/site-circle.png"
catch:tap="handleOpenMap" ></image>
data-lat="{{item.LAT}}" <view class="site-num">{{item.hospital.dist}}</view>
data-lng="{{item.LNG}}" </view>
data-address="{{item.ProvinceName}}{{item.CityName}}{{item.CountyName}}{{item.Address}}"
data-name="{{item.Name}}"
src="{{imageUrl}}icon94.png?t={{Timestamp}}"
></image>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="content">
<view class="row">
<!-- <view class="tag">医生简介</view> -->
<view class="p ellipsis">{{item.Introduce}}</view>
</view>
<view class="row" wx:if="{{item.weekName}}">
<!-- prettier-ignore -->
<view wx:if="{{item.ClinicType==2}}" class="week-name pre-line">
<view class="label">出诊时间</view>{{item.weekName}}
</view>
<block wx:else>
<view class="tag" wx:for="{{item.weekName}}" wx:for-item="wItem" wx:for-index="wIndex" wx:key="wIndex">
<view class="week">{{wItem.week}}</view>
<view class="value">{{wItem.timeDay}}</view>
</view>
</block>
</view>
</view>
</view> </view>
<pagination wx:if="{{!infusionCenterList.length}}" pagination="{{pagination}}"></pagination> <pagination wx:if="{{!DoctortList.length}}" pagination="{{pagination}}"></pagination>
</view> </view>
</view> </view>
@ -195,11 +214,11 @@
params="{{toastParams}}" params="{{toastParams}}"
></toast> ></toast>
<!-- <siteShare --> <siteShare
<!-- pname="{{ProvinceName}}" --> pname="{{ProvinceName}}"
<!-- pid="{{ProvinceId}}" --> pid="{{ProvinceId}}"
<!-- cid="{{CityId}}" --> cid="{{CityId}}"
<!-- cname="{{CityName}}" --> cname="{{CityName}}"
<!-- bind:ok="handleSiteShare" --> bind:ok="handleSiteShare"
<!-- bind:show="handleSiteShareShow" --> bind:show="handleSiteShareShow"
<!-- ></siteShare> --> ></siteShare>

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

@ -1,5 +1,4 @@
import dayjs from 'dayjs' import dayjs from 'dayjs'
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
Page({ Page({
@ -114,8 +113,7 @@ Page({
}, },
handleSubmit() { handleSubmit() {
app.mpBehavior({ PageName: 'BTN_PatientInfoComfirm' }) app.mpBehavior({ PageName: 'BTN_PatientInfoComfirm' })
if (this.data.submiting) if (this.data.submiting) return
return
const { const {
name, name,
@ -133,20 +131,17 @@ Page({
let toast = '' let toast = ''
// if (!diagnosisTime) toast = "确诊时间不能为空"; // if (!diagnosisTime) toast = "确诊时间不能为空";
// if (!birth) toast = "出生日期不能为空"; // if (!birth) toast = "出生日期不能为空";
if (!gender) if (!gender) toast = '请选择性别'
toast = '请选择性别' if (!ageRange) toast = '请选择年龄范围'
if (!ageRange) if (!name) toast = '姓名不能为空'
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,
@ -195,11 +190,6 @@ Page({
}, },
handleVisitors() { handleVisitors() {
app.mpBehavior({ PageName: 'BTN_PatientInfoSkip' }) app.mpBehavior({ PageName: 'BTN_PatientInfoSkip' })
const backPage = app.globalData.backPage
const navUrl
= typeof backPage === 'string' && backPage.includes('liveResult')
? backPage.replace('liveResult', 'liveDetail')
: '/patient/pages/index/index?visitors=1'
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/login/reg-logout', url: '?r=zd/login/reg-logout',
@ -208,18 +198,7 @@ Page({
}).then(() => { }).then(() => {
app.startLogin(() => { app.startLogin(() => {
wx.reLaunch({ wx.reLaunch({
url: navUrl, url: '/patient/pages/index/index?visitors=1',
success() {
app.globalData.backPath = ''
if (navUrl.includes('liveDetail')) {
setTimeout(() => {
wx.showToast({
title: '注册后可享平台完整服务',
icon: 'none',
})
}, 1000)
}
},
}) })
}) })
}) })

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

@ -1,5 +1,5 @@
<view class="page"> <view class="page">
<navbar fixed title="注册信息" custom-style="background:{{background}}"></navbar> <navbar fixed title="录入信息" custom-style="background:{{background}}"></navbar>
<image class="bg" src="{{imageUrl}}bg10.png?t={{Timestamp}}"></image> <image class="bg" src="{{imageUrl}}bg10.png?t={{Timestamp}}"></image>
<view class="page-container" style="padding-top:{{pageTop+24}}px;"> <view class="page-container" style="padding-top:{{pageTop+24}}px;">
<view class="content"> <view class="content">

117
src/patient/pages/hospital/index.scss

@ -1,12 +1,12 @@
.scroll-view { .scroll-view{
height: 100vh; height: 100vh;
} }
.page { .page {
background-color: #fafafa; background-color: #fafafa;
min-height: 70vh;
.banner { .banner {
padding: 44rpx 30rpx 0; padding: 44rpx 30rpx 0;
display: flex; display: flex;
align-items: center;
.hosttipat-img { .hosttipat-img {
flex-shrink: 0; flex-shrink: 0;
width: 180rpx; width: 180rpx;
@ -27,9 +27,8 @@
align-items: center; align-items: center;
.name { .name {
font-size: 36rpx; font-size: 36rpx;
color: #211d2e; color: #484848;
word-break: break-all; word-break: break-all;
font-weight: bold;
} }
.tag { .tag {
flex-shrink: 0; flex-shrink: 0;
@ -38,35 +37,31 @@
font-size: 22rpx; font-size: 22rpx;
line-height: 1; line-height: 1;
color: #ffffff; color: #ffffff;
background: #ffa300; background: #ffc137;
border-radius: 8rpx; border-radius: 8rpx;
} }
} }
.content { .content {
margin-top: 18rpx; margin-top: 28rpx;
display: flex;
align-items: center;
justify-content: space-between;
.inner { .inner {
.site { .site {
margin-bottom: 16rpx; font-size: 24rpx;
font-size: 32rpx; color: #9b9ea6;
color: #211d2e;
.icon {
margin-right: 10rpx;
width: 36rpx;
height: 36rpx;
vertical-align: -8rpx;
}
} }
.site-num { .site-num {
font-size: 24rpx; font-size: 24rpx;
color: #adacb2; color: #9b9ea6;
} }
} }
.options { .options {
flex-shrink: 0; flex-shrink: 0;
.icon { .icon {
margin-left: 20rpx; margin-left: 44rpx;
width: 48rpx; width: 30rpx;
height: 48rpx; height: 30rpx;
background-color: #edeeef; background-color: #edeeef;
border-radius: 50%; border-radius: 50%;
padding: 6rpx; padding: 6rpx;
@ -75,47 +70,6 @@
} }
} }
} }
.options {
margin: 60rpx 30rpx 0;
display: flex;
align-items: center;
justify-content: center;
gap: 30rpx;
.phone {
flex: 1;
line-height: 70rpx;
font-size: 32rpx;
color: #b982ff;
border-radius: 60rpx 60rpx 60rpx 60rpx;
border: 1px solid #b982ff;
display: flex;
align-items: center;
justify-content: center;
.icon {
margin-right: 8rpx;
display: inline-block;
width: 36rpx;
height: 36rpx;
}
}
.site {
flex: 1;
line-height: 76rpx;
font-size: 32rpx;
color: #ffffff;
border-radius: 60rpx;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
display: flex;
align-items: center;
justify-content: center;
.icon {
margin-right: 8rpx;
display: inline-block;
width: 32rpx;
height: 32rpx;
}
}
}
.module { .module {
margin-top: 64rpx; margin-top: 64rpx;
padding: 0 30rpx; padding: 0 30rpx;
@ -126,13 +80,33 @@
border-radius: 24rpx; border-radius: 24rpx;
.m-title { .m-title {
position: relative; position: relative;
margin-bottom: 48rpx;
height: 88rpx; height: 88rpx;
background-color: #fff;
background: #ffeff4;
box-shadow: inset 0rpx 2rpx 12rpx 0rpx rgba(255, 255, 255, 0);
border-radius: 24rpx 24rpx 0rpx 0rpx;
border: 1rpx solid #efeff1;
display: flex;
align-items: center;
justify-content: center;
.m-title-img { .m-title-img {
width: 166rpx;
height: 42rpx;
}
.m-icon1 {
position: absolute; position: absolute;
top: -20rpx; top: -20rpx;
left: 0; left: 64rpx;
width: 100%; width: 20rpx;
height: 108rpx; height: 64rpx;
}
.m-icon2 {
position: absolute;
top: -20rpx;
right: 64rpx;
width: 20rpx;
height: 64rpx;
} }
} }
} }
@ -151,20 +125,13 @@
padding-left: 20rpx; padding-left: 20rpx;
.name { .name {
font-size: 32rpx; font-size: 32rpx;
color: #211d2e; color: #484848;
font-weight: bold; font-weight: bold;
.icon {
margin-left: 8rpx;
display: inline-block;
width: 32rpx;
height: 32rpx;
vertical-align: -6rpx;
}
} }
.p { .p {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 24rpx; font-size: 24rpx;
color: #adacb2; color: #9da0a8;
&.ellipsis { &.ellipsis {
min-width: 0; min-width: 0;
overflow: hidden; overflow: hidden;
@ -183,7 +150,7 @@
margin-bottom: 10rpx; margin-bottom: 10rpx;
width: 120rpx; width: 120rpx;
height: 32rpx; height: 32rpx;
background: #faf6ff; background: #ffe6ee;
border-radius: 8rpx; border-radius: 8rpx;
display: flex; display: flex;
.week { .week {
@ -191,14 +158,14 @@
font-size: 20rpx; font-size: 20rpx;
line-height: 32rpx; line-height: 32rpx;
color: #ffffff; color: #ffffff;
background-color: #b982ff; background-color: #e66c8e;
text-align: center; text-align: center;
border-radius: 8rpx 0 8rpx 8rpx; border-radius: 8rpx 0 8rpx 8rpx;
} }
.value { .value {
flex: 1; flex: 1;
font-size: 20rpx; font-size: 20rpx;
color: #b982ff; color: #e04775;
text-align: center; text-align: center;
line-height: 32rpx; line-height: 32rpx;
} }

71
src/patient/pages/hospital/index.ts

@ -28,55 +28,52 @@ Page({
}) })
}, },
handleToggleSite() { handleToggleSite() {
const that = this
if (!this.data.LNG) { if (!this.data.LNG) {
wx.getSetting({ wx.getSetting({
success: (res) => { success(res) {
if ( if (
res.authSetting['scope.userFuzzyLocation'] != undefined res.authSetting['scope.userFuzzyLocation'] != undefined &&
&& res.authSetting['scope.userFuzzyLocation'] == true res.authSetting['scope.userFuzzyLocation'] == true
) { ) {
// 获取当前位置 //获取当前位置
this.getFuzzyLocation() that.getFuzzyLocation()
} } else if (res.authSetting['scope.userFuzzyLocation'] == undefined) {
else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { //获取当前位置
// 获取当前位置 that.getFuzzyLocation()
this.getFuzzyLocation() } else {
}
else {
wx.showModal({ wx.showModal({
title: '请求授权当前位置', title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权', content: '需要获取您的地理位置,请确认授权',
confirmColor: '#8c75d0', confirmColor: '#8c75d0',
success: (res) => { success(res) {
if (res.cancel) { if (res.cancel) {
// 取消授权 //取消授权
wx.showToast({ wx.showToast({
title: '拒绝授权', title: '拒绝授权',
icon: 'none', icon: 'none',
duration: 1000, duration: 1000,
}) })
this.getDetail() that.getDetail()
} } else if (res.confirm) {
else if (res.confirm) { //确定授权,通过wx.openSetting发起授权请求
// 确定授权,通过wx.openSetting发起授权请求
wx.openSetting({ wx.openSetting({
success: (res) => { success(res) {
if (res.authSetting['scope.userFuzzyLocation'] == true) { if (res.authSetting['scope.userFuzzyLocation'] == true) {
wx.showToast({ wx.showToast({
title: '授权成功', title: '授权成功',
icon: 'success', icon: 'success',
duration: 1000, duration: 1000
}) })
// 再次授权,调用wx.getLocation的API // 再次授权,调用wx.getLocation的API
this.getFuzzyLocation() that.getFuzzyLocation()
} } else {
else {
wx.showToast({ wx.showToast({
title: '授权失败', title: '授权失败',
icon: 'none', icon: 'none',
duration: 1000, duration: 1000
}) })
this.getDetail() that.getDetail()
} }
}, },
}) })
@ -86,9 +83,8 @@ Page({
} }
}, },
}) })
} } else {
else { that.setData({
this.setData({
LNG: '', LNG: '',
LAT: '', LAT: '',
}) })
@ -96,16 +92,18 @@ Page({
} }
}, },
getFuzzyLocation() { getFuzzyLocation() {
const that = this
wx.getFuzzyLocation({ wx.getFuzzyLocation({
success: (res) => { success(res) {
this.setData({ console.log(res)
that.setData({
LNG: res.longitude, LNG: res.longitude,
LAT: res.latitude, LAT: res.latitude,
}) })
this.getDetail() that.getDetail()
}, },
fail: () => { fail() {
this.getDetail() that.getDetail()
}, },
}) })
}, },
@ -125,14 +123,13 @@ Page({
this.setData({ this.setData({
detail: { detail: {
...res, ...res,
doctors: res.doctors?.map((item: any) => { doctors: res.doctors.map((item: any) => {
let weekName = '' let weekName = ''
if (item.ClinicType == 2) { if (item.ClinicType == 2) {
weekName = item.Clinic weekName = item.Clinic
} } else {
else {
weekName = (JSON.parse(item.Clinic) ? JSON.parse(item.Clinic) : []).map( weekName = (JSON.parse(item.Clinic) ? JSON.parse(item.Clinic) : []).map(
(subItem: { weekday: string | number, timeType: string | number }) => { (subItem: { weekday: string | number; timeType: string | number }) => {
const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
const timeDay = { 1: '上午', 2: '下午' } const timeDay = { 1: '上午', 2: '下午' }
return { week: week[Number(subItem.weekday) - 1], timeDay: timeDay[subItem.timeType] } return { week: week[Number(subItem.weekday) - 1], timeDay: timeDay[subItem.timeType] }
@ -198,5 +195,3 @@ Page({
}, },
onPageScroll() {}, onPageScroll() {},
}) })
export {}

40
src/patient/pages/hospital/index.wxml

@ -1,5 +1,8 @@
<scroll-view class="scroll-view" enhanced scroll-y show-scrollbar="{{false}}"> <scroll-view class="scroll-view" enhanced scroll-y show-scrollbar="{{false}}">
<view class="page" style="background: url('{{imageUrl}}bg10.png?t={{Timestamp}}') no-repeat top center/100% 610rpx"> <view
class="page"
style="background: url({{imageUrl}}za-images//1.5/hostipal.png?t={{Timestamp}}) no-repeat top center / 100% 520rpx;padding-top:{{bottom}}px"
>
<navBar background="{{background}}" title="医院介绍" back bind:back="handleBack"></navBar> <navBar background="{{background}}" title="医院介绍" back bind:back="handleBack"></navBar>
<view class="banner"> <view class="banner">
<view class="hosttipat-img"> <view class="hosttipat-img">
@ -14,32 +17,22 @@
</view> </view>
<view class="content"> <view class="content">
<view class="inner"> <view class="inner">
<view class="site" bind:tap="handleOpenMap"> <view class="site">{{detail.ProvinceName}}{{detail.CityName}}{{detail.CountyName}}{{detail.Address}}</view>
<image class="icon" src="{{imageUrl}}icon41.png?t={{Timestamp}}" bind:tap="handleOpenMap"></image> <view class="site-num">{{detail.dist}}</view>
{{detail.ProvinceName}}{{detail.CityName}}{{detail.CountyName}}{{detail.Address}} </view>
</view> <view class="options">
<view class="site" bind:tap="handlePhone" wx:if="{{detail.Telephone}}"> <image class="icon" src="{{imageUrl}}za-images//1.5/site.png" bind:tap="handleOpenMap"></image>
<image class="icon" src="{{imageUrl}}icon42.png?t={{Timestamp}}" bind:tap="handleOpenMap"></image> <image class="icon" src="{{imageUrl}}za-images//1.5/phone.png" bind:tap="handlePhone"></image>
{{detail.Telephone}}
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="options"> <view class="module">
<view class="phone" bind:tap="handlePhone" wx:if="{{detail.Telephone}}">
<image class="icon" src="{{imageUrl}}icon95.png?t={{Timestamp}}"></image>
电话
</view>
<view class="site" bind:tap="handleOpenMap" wx:if="{{detail.Address}}">
<image class="icon" src="{{imageUrl}}icon96.png?t={{Timestamp}}"></image>
地址 {{detail.dist}}
</view>
</view>
<view class="module" wx:if="{{detail.doctors && detail.doctors.length}}">
<view class="module-container"> <view class="module-container">
<view class="m-title"> <view class="m-title">
<image class="m-title-img" src="{{imageUrl}}title10.png?t={{Timestamp}}"></image> <image class="m-title-img" src="{{imageUrl}}za-images//1.5/hos-title.png"></image>
<image class="m-icon1" src="{{imageUrl}}za-images//1.5/hos-icon1.png"></image>
<image class="m-icon2" src="{{imageUrl}}za-images//1.5/hos-icon1.png"></image>
</view> </view>
<view <view
class="new-card" class="new-card"
@ -50,10 +43,7 @@
> >
<image class="avatar" mode="aspectFill" src="{{item.Img}}"></image> <image class="avatar" mode="aspectFill" src="{{item.Img}}"></image>
<view class="content"> <view class="content">
<view class="name"> <view class="name">{{item.Name}}</view>
{{item.Name}}
<image class="icon" wx:if="{{item.IsLively==1}}" src="{{imageUrl}}icon101.png?t={{Timestamp}}"></image>
</view>
<view class="p ellipsis">{{item.Introduce}}</view> <view class="p ellipsis">{{item.Introduce}}</view>
<view class="row" wx:if="{[item.weekName]}"> <view class="row" wx:if="{[item.weekName]}">
<!-- prettier-ignore --> <!-- prettier-ignore -->

57
src/patient/pages/index/index.scss

@ -21,6 +21,7 @@ page {
background: linear-gradient(195deg, #ffe3fc 0%, #ecddff 100%); background: linear-gradient(195deg, #ffe3fc 0%, #ecddff 100%);
.container { .container {
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
border-radius: 21rpx; border-radius: 21rpx;
.avatar { .avatar {
@ -78,19 +79,19 @@ page {
} }
} }
} }
}
.content {
margin-top: 16rpx;
font-size: 32rpx;
line-height: 38rpx;
color: #211d2e;
.icon { .icon {
vertical-align: -4rpx; margin-left: 4rpx;
display: inline-block; display: inline-block;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
} }
} }
.content {
margin-top: 16rpx;
font-size: 26rpx;
line-height: 38rpx;
color: rgba(51, 51, 51, 1);
}
.hostipal { .hostipal {
margin-top: 16rpx; margin-top: 16rpx;
font-size: 28rpx; font-size: 28rpx;
@ -103,7 +104,7 @@ page {
} }
.tag { .tag {
display: inline-block; display: inline-block;
padding: 6rpx 12rpx 4rpx; padding: 4rpx 12rpx;
font-size: 22rpx; font-size: 22rpx;
line-height: 1; line-height: 1;
color: #ffffff; color: #ffffff;
@ -281,7 +282,7 @@ page {
} }
.labels { .labels {
margin-top: 16rpx; margin-top: 16rpx;
max-width: 64vw; max-width: 56vw;
font-size: 28rpx; font-size: 28rpx;
color: rgba(173, 172, 178, 1); color: rgba(173, 172, 178, 1);
white-space: nowrap; white-space: nowrap;
@ -461,44 +462,6 @@ page {
} }
} }
} }
.new-server {
margin: $page-margin;
.title {
font-size: 36rpx;
color: #211d2e;
font-weight: bold;
line-height: 40rpx;
}
.one-card {
margin-top: -20rpx;
display: block;
width: 100%;
height: 214rpx;
}
.list {
margin-top: 24rpx;
padding: 32rpx;
border-radius: 24rpx;
display: flex;
align-items: center;
gap: 20rpx;
background: linear-gradient(183deg, #f7f1ff 0%, #ffffff 100%);
.item {
flex: 1;
text-align: center;
.icon {
display: inline-block;
width: 104rpx;
height: 104rpx;
}
.name {
margin-top: 8rpx;
font-size: 32rpx;
color: #211d2e;
}
}
}
}
} }
.reg { .reg {
position: fixed; position: fixed;

45
src/patient/pages/index/index.ts

@ -1,5 +1,4 @@
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')
@ -308,8 +307,7 @@ Page({
}, },
routerTo(e) { routerTo(e) {
let { url, active, code } = e.currentTarget.dataset let { url, active, code } = e.currentTarget.dataset
if (!url) if (!url) return
return
if (code === 'doctor') { if (code === 'doctor') {
app.mpBehavior({ PageName: 'BTN_PatientHomeDoctorCard' }) app.mpBehavior({ PageName: 'BTN_PatientHomeDoctorCard' })
} }
@ -401,8 +399,7 @@ Page({
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',
@ -414,8 +411,7 @@ Page({
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: '工程师正在努力建设中,敬请期待!',
@ -427,31 +423,26 @@ Page({
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',
url: '?r=zd/popup/close-popup', url: '?r=zd/popup/close-popup',
@ -464,8 +455,7 @@ Page({
}) })
}) })
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,
}) })
@ -475,15 +465,14 @@ Page({
data: {}, data: {},
}) })
this.handleToastCancel(null, false) this.handleToastCancel(null, false)
} } else if (toastType === 'drug-guide') {
else if (toastType === 'drug-guide') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/add-record', url: '?r=zd/popup/add-record',
data: { type: 1 }, data: { type: 1 },
}).then(() => { }).then(() => {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/personalInformation/index?bottom=1&submit=1', url: '/patient/pages/personalInformation/index?bottom=1',
}) })
}) })
this.handleToastCancel(null, false) this.handleToastCancel(null, false)
@ -499,8 +488,7 @@ Page({
Type: 5, Type: 5,
}, },
}) })
} } else if (toastType === 'dedicatedDoctor' && sure) {
else if (toastType === 'dedicatedDoctor' && sure) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/close-popup', url: '?r=zd/popup/close-popup',
@ -508,15 +496,13 @@ Page({
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: {},
}) })
} } else if (toastType === 'drug-guide' && sure) {
else if (toastType === 'drug-guide' && sure) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/add-record', url: '?r=zd/popup/add-record',
@ -584,8 +570,7 @@ Page({
infoList: list, infoList: list,
}) })
}) })
} } else {
else {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/pic-text/collection', url: '?r=zd/pic-text/collection',

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

@ -22,12 +22,10 @@
<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}}/icon31.png?t={{Timestamp}}"></image>
</view> </view>
</view> </view>
<view class="content" wx:if="{{unreadCount}}"> <view class="content" wx:if="{{unreadCount}}">医生给您留言了,记得查看!</view>
医生给您留言了,记得查看!
<image class="icon" src="{{imageUrl}}/icon31.png?t={{Timestamp}}"></image>
</view>
<view class="hostipal" wx:else> <view class="hostipal" wx:else>
<view class="h-content">{{zdUserInfo.ExclusiveDoctorHospitalName}}</view> <view class="h-content">{{zdUserInfo.ExclusiveDoctorHospitalName}}</view>
<view <view
@ -101,16 +99,10 @@
<view <view
class="l-banner" class="l-banner"
bind:tap="routerTo" bind:tap="routerTo"
data-url="{{card.configLinkUrl || '/patient/pages/live/index?index=0'}}" data-url="/patient/pages/live/index?index=0"
data-code="{{card.code}}" data-code="{{card.code}}"
> >
<image wx:if="{{card.configImg}}" class="live-img" mode="aspectFill" src="{{card.configImg}}"></image> <image class="live-img" mode="aspectFill" src="{{imageUrl}}za-images/live-banner.png?t={{Timestamp}}"></image>
<image
wx:else
class="live-img"
mode="aspectFill"
src="{{imageUrl}}za-images/live-banner.png?t={{Timestamp}}"
></image>
</view> </view>
<view class="list" wx:if="{{liveList.length}}"> <view class="list" wx:if="{{liveList.length}}">
<view <view
@ -135,7 +127,7 @@
<view class="date">{{item.BeginTime}}</view> <view class="date">{{item.BeginTime}}</view>
<view class="btn"> <view class="btn">
<image class="icon" src="{{imageUrl}}icon30.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon30.png?t={{Timestamp}}"></image>
{{item.Status==2?'点此进入':'查看'}} {{item.Status==2?'点此参加':'查看'}}
</view> </view>
</view> </view>
</view> </view>
@ -209,25 +201,6 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<view class="new-server" wx:if="{{card.code == 'serviceConf' && card.showStatus == 1}}">
<view class="title" wx:if="{{card.name}}">{{card.name}}</view>
<image
class="one-card"
wx:if="{{card.subList.length==1}}"
src="{{card.subList[0].img}}"
bind:tap="routerTo"
data-url="{{card.subList[0].linkUrl}}"
data-code="{{card.subList[0].code}}"
></image>
<view class="list" wx:else>
<block wx:for="{{card.subList}}" wx:key="index">
<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>
</block> </block>
</view> </view>

107
src/patient/pages/infusionCenter/index.scss

@ -1,98 +1,9 @@
.page { .page {
position: relative; display: block;
.banner { width: 100%;
width: 100%; }
min-height: 374rpx; .page-title {
} margin-top: -120rpx;
.container { text-align: center;
padding: 48rpx 40rpx; color: #fea8b7;
position: absolute; }
top: 348rpx;
left: 0;
width: 100%;
min-height: 100vh;
border-radius: 24rpx 24rpx 0 0;
background-color: #fff;
box-sizing: border-box;
.title {
font-size: 36rpx;
color: #211d2e;
font-weight: bold;
}
.content {
margin-top: 32rpx;
margin-bottom: 20rpx;
display: flex;
justify-content: space-between;
.inner {
.site {
font-size: 32rpx;
color: #211D2E;
}
.tel {
font-size: 32rpx;
color: #211D2E;
}
}
}
.options {
margin-top: 40rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 30rpx;
.phone {
flex: 1;
line-height: 70rpx;
font-size: 32rpx;
color: #b982ff;
border-radius: 60rpx 60rpx 60rpx 60rpx;
border: 1px solid #b982ff;
display: flex;
align-items: center;
justify-content: center;
.icon {
margin-right: 8rpx;
display: inline-block;
width: 36rpx;
height: 36rpx;
}
}
.site {
flex: 1;
line-height: 76rpx;
font-size: 32rpx;
color: #ffffff;
border-radius: 60rpx;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
display: flex;
align-items: center;
justify-content: center;
.icon {
margin-right: 8rpx;
display: inline-block;
width: 32rpx;
height: 32rpx;
}
}
}
.remark {
margin-top: 56rpx;
padding: 32rpx;
border-radius: 24rpx;
background-color: #fafafa;
.r-title {
font-size: 32rpx;
color: #211d2e;
font-weight: bold;
}
.r-content {
margin-top: 20rpx;
font-size: 28rpx;
color: #69686e;
word-break: break-all;
}
}
}
}

145
src/patient/pages/infusionCenter/index.ts

@ -1,139 +1,6 @@
const app = getApp<IAppOption>() const _app = getApp<IAppOption>();
Page({ Page({
data: { data: {},
id: '', onLoad() { },
detail: {} as any, })
LNG: '' as number | string,
LAT: '' as number | string,
},
onLoad(options) {
this.setData({
id: options.id,
})
app.waitLogin({ type: [0, 1] }).then(() => {
this.handleToggleSite()
})
},
handleToggleSite() {
if (!this.data.LNG) {
wx.getSetting({
success: (res) => {
if (
res.authSetting['scope.userFuzzyLocation'] != undefined
&& res.authSetting['scope.userFuzzyLocation'] == true
) {
// 获取当前位置
this.getFuzzyLocation()
}
else if (res.authSetting['scope.userFuzzyLocation'] == undefined) {
// 获取当前位置
this.getFuzzyLocation()
}
else {
wx.showModal({
title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权',
confirmColor: '#8c75d0',
success: (res) => {
if (res.cancel) {
// 取消授权
wx.showToast({
title: '拒绝授权',
icon: 'none',
duration: 1000,
})
this.getDetail()
}
else if (res.confirm) {
// 确定授权,通过wx.openSetting发起授权请求
wx.openSetting({
success: (res) => {
if (res.authSetting['scope.userFuzzyLocation'] == true) {
wx.showToast({
title: '授权成功',
icon: 'success',
duration: 1000,
})
// 再次授权,调用wx.getLocation的API
this.getFuzzyLocation()
}
else {
wx.showToast({
title: '授权失败',
icon: 'none',
duration: 1000,
})
this.getDetail()
}
},
})
}
},
})
}
},
})
}
else {
this.setData({
LNG: '',
LAT: '',
})
this.getDetail()
}
},
getFuzzyLocation() {
wx.getFuzzyLocation({
success: (res) => {
this.setData({
LNG: res.longitude,
LAT: res.latitude,
})
this.getDetail()
},
fail: () => {
this.getDetail()
},
})
},
getDetail() {
wx.ajax({
method: 'GET',
url: '?r=xd/infusion-center/detail',
data: {
Id: this.data.id,
lng: this.data.LNG,
lat: this.data.LAT,
},
}).then((res) => {
this.setData({
detail: res,
})
})
},
handleSite() {
const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail
wx.openLocation({
latitude: LAT,
longitude: LNG,
name: Name,
address: `${ProvinceName}${CityName}${CountyName}${Address}`,
})
},
handlePhone() {
const tel = this.data.detail.Telephone
if (!tel) {
wx.showToast({
icon: 'none',
title: '电话暂未开通',
})
return
}
wx.makePhoneCall({
phoneNumber: tel,
})
},
})
export {}

29
src/patient/pages/infusionCenter/index.wxml

@ -1,27 +1,2 @@
<view class="page"> <image class="page" mode="widthFix" src="{{imageUrl}}za-images//infusionCenter.png?t={{Timestamp}}"></image>
<!-- <image wx:if="{{detail.ImgUrl}}" class="banner" mode="widthFix" src="{{detail.ImgUrl}}"></image> --> <view class="page-title">即将上线,敬请期待!</view>
<image class="banner" mode="widthFix" src="{{imageUrl}}bg33.png?t={{Timestamp}}"></image>
<view class="container">
<view class="title">{{detail.Name}}</view>
<view class="content">
<view class="inner">
<view class="site">{{detail.ProvinceName}}{{detail.CityName}}{{detail.CountyName}}{{detail.Address}}</view>
<view class="tel">{{detail.Telephone}}</view>
</view>
</view>
<view class="options">
<view class="phone" bind:tap="handlePhone">
<image class="icon" src="{{imageUrl}}icon95.png?t={{Timestamp}}"></image>
电话
</view>
<view class="site" bind:tap="handleSite" wx:if="{{detail.Address}}">
<image class="icon" src="{{imageUrl}}icon96.png?t={{Timestamp}}"></image>
地址{{detail.dist}}
</view>
</view>
<view class="remark" wx:if="{{detail.Remark}}">
<view class="r-title">备注</view>
<view class="r-content">{{detail.Remark}}</view>
</view>
</view>
</view>

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

@ -5,7 +5,6 @@
"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", "navbar": "/components/navbar/index"
"popup": "/components/popup/index"
} }
} }

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

@ -13,6 +13,7 @@ page {
margin: 0 30rpx; margin: 0 30rpx;
padding: 30rpx; padding: 30rpx;
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
border-radius: 24rpx; border-radius: 24rpx;
background-color: #fff; background-color: #fff;
@ -31,12 +32,13 @@ page {
} }
.content { .content {
margin-top: 8rpx; margin-top: 8rpx;
.c-name { font-size: 28rpx;
font-size: 28rpx; color: rgba(173, 172, 178, 1);
color: rgba(173, 172, 178, 1); display: flex;
margin-right: 10rpx; gap: 8rpx;
} align-items: center;
.tag { .tag {
margin-left: 10rpx;
display: inline-block; display: inline-block;
font-size: 24rpx; font-size: 24rpx;
line-height: 28rpx; line-height: 28rpx;
@ -67,7 +69,6 @@ page {
padding: 15rpx 30rpx; padding: 15rpx 30rpx;
display: flex; display: flex;
.avatar { .avatar {
position: relative;
padding-right: 16rpx; padding-right: 16rpx;
flex-shrink: 0; flex-shrink: 0;
.a-img { .a-img {
@ -75,19 +76,6 @@ page {
height: 80rpx; height: 80rpx;
border-radius: 50%; border-radius: 50%;
} }
.ai {
position: absolute;
top: 60rpx;
left: 6rpx;
font-size: 16rpx;
color: #ffffff;
width: 64rpx;
height: 24rpx;
line-height: 24rpx;
text-align: center;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
border-radius: 120rpx 120rpx 120rpx 120rpx;
}
} }
.d-container { .d-container {
flex: 1; flex: 1;
@ -405,22 +393,12 @@ page {
} }
.message { .message {
margin-bottom: 32rpx; margin-bottom: 32rpx;
display: flex; padding: 26rpx 32rpx;
align-items: center; background: rgba(185, 130, 255, 1);
gap: 16rpx; border-radius: 32rpx;
.error { font-size: 32rpx;
flex-shrink: 0; color: #fff;
width: 36rpx; white-space: pre-line;
height: 36rpx;
}
.content {
padding: 26rpx 32rpx;
background: rgba(185, 130, 255, 1);
border-radius: 32rpx;
font-size: 32rpx;
color: #fff;
white-space: pre-line;
}
} }
.referral-replay { .referral-replay {
margin-bottom: 32rpx; margin-bottom: 32rpx;
@ -464,12 +442,6 @@ page {
} }
} }
} }
.status {
margin: 0 0 32rpx;
text-align: center;
font-size: 28rpx;
color: #adacb2;
}
.place { .place {
height: 10vh; height: 10vh;
} }
@ -482,7 +454,7 @@ page {
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx 24rpx 0 0;
background-color: #fff; background-color: #fff;
transition: all 0.3s; transition: all 0.3s;
height: 184rpx; height: calc(124rpx + env(safe-area-inset-bottom));
box-sizing: border-box; box-sizing: border-box;
.unread { .unread {
position: absolute; position: absolute;
@ -497,12 +469,9 @@ page {
} }
&.expend { &.expend {
height: 45vh; height: 45vh;
&.min-expend {
height: 32vh;
}
} }
.line { .line {
margin: 10rpx auto; margin: 0 auto;
width: 52rpx; width: 52rpx;
height: 6rpx; height: 6rpx;
background: #f2f4f5; background: #f2f4f5;
@ -510,49 +479,14 @@ page {
} }
.title { .title {
margin-top: 26rpx; margin-top: 26rpx;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
display: flex; display: flex;
gap: 20rpx;
align-items: center; align-items: center;
justify-content: space-between; justify-content: center;
.custom-input { .icon {
flex-shrink: 0; width: 36rpx;
width: 424rpx; height: 36rpx;
box-sizing: border-box;
text-indent: 40rpx;
padding-right: 40rpx;
height: 72rpx;
background: #f6f8f9;
line-height: 72rpx;
border-radius: 98rpx;
font-size: 32rpx;
color: #adacb2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&.active {
color: #211d2e;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.shortcut {
flex: 1;
width: 244rpx;
height: 72rpx;
background: #ffffff;
box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.07);
border-radius: 98rpx 98rpx 98rpx 98rpx;
border: 2rpx solid #f6f8f9;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
display: flex;
align-items: center;
justify-content: center;
.icon {
width: 36rpx;
height: 36rpx;
}
} }
} }
.tabs { .tabs {
@ -637,81 +571,5 @@ page {
} }
} }
} }
.custom-input {
transition: all 0.3s;
.icon {
position: relative;
width: 44rpx;
height: 44rpx;
overflow: visible;
&::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60rpx;
height: 60rpx;
background-color: transparent;
}
}
.wrap {
margin-top: 14rpx;
position: relative;
padding: 32rpx 32rpx 24rpx;
border-radius: 24rpx;
background-color: #f6f8f9;
.textarea {
width: 100%;
display: block;
height: 300rpx;
box-sizing: border-box;
padding-bottom: 80rpx;
background-color: transparent;
font-size: 32rpx;
.ka-container {
padding: 30rpx 62rpx;
display: flex;
align-items: center;
justify-content: space-between;
background: transparent;
.stat {
font-size: 28rpx;
color: #adacb2;
&.red {
color: #ef3939;
}
}
.send-btn {
width: 128rpx;
height: 64rpx;
text-align: center;
line-height: 64rpx;
font-size: 32rpx;
color: #ffffff;
background: #b982ff linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
border-radius: 111rpx 111rpx 111rpx 111rpx;
}
}
}
}
}
&.custom-input-max {
.custom-input {
position: absolute;
top: -45vh;
left: 0;
width: 100%;
box-sizing: border-box;
padding: 30rpx;
border-radius: 32rpx 32rpx 0 0;
background-color: #fff;
.wrap {
.textarea {
height: 45vh;
}
}
}
}
} }
} }

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

@ -4,7 +4,7 @@ const app = getApp<IAppOption>()
interface IMessageItem { interface IMessageItem {
msgId: string msgId: string
msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息 msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息
msgContent: any msgContent: any
msgVisitTime: string msgVisitTime: string
msgFromType: '1' | '2' // 1: 患者 2: 医生 msgFromType: '1' | '2' // 1: 患者 2: 医生
@ -16,8 +16,6 @@ interface IMessageItem {
msgCreateTimeName?: string // 消息创建时间 msgCreateTimeName?: string // 消息创建时间
showTime?: boolean showTime?: boolean
ReVisitInfo?: any ReVisitInfo?: any
msgCustomSendStatus?: number | string
msgTipsInfo?: string
} }
interface Item { interface Item {
@ -27,14 +25,7 @@ interface Item {
Page({ Page({
data: { data: {
popupShow: false,
popupType: 'popup9',
popupParams: {} as any,
expend: false, expend: false,
expendType: 'shortcut',
maxTextArea: false,
focus: false,
scrollTop: 0, scrollTop: 0,
scrollIntoView: '', scrollIntoView: '',
doctorDetail: {} as any, doctorDetail: {} as any,
@ -56,8 +47,6 @@ Page({
timeDay: { 1: '上午', 2: '下午' }, timeDay: { 1: '上午', 2: '下午' },
zdUserInfo: {}, zdUserInfo: {},
customMessage: '',
}, },
innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null, innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null,
onLoad(options) { onLoad(options) {
@ -126,8 +115,7 @@ Page({
}) })
}, },
getMessageList() { getMessageList() {
if (this.data.isLoad || this.data.isFinish) if (this.data.isLoad || this.data.isFinish) return
return
this.setData({ this.setData({
isLoad: true, isLoad: true,
}) })
@ -246,14 +234,11 @@ Page({
let msgCreateTimeName = '' let msgCreateTimeName = ''
if (dayjs().format('YYYY-MM-DD') === dayjs(date).format('YYYY-MM-DD')) { if (dayjs().format('YYYY-MM-DD') === dayjs(date).format('YYYY-MM-DD')) {
msgCreateTimeName = dayjs(date).format('HH:mm') msgCreateTimeName = dayjs(date).format('HH:mm')
} } else if (dayjs().format('YYYY-MM-DD') === dayjs(date).add(1, 'day').format('YYYY-MM-DD')) {
else if (dayjs().format('YYYY-MM-DD') === dayjs(date).add(1, 'day').format('YYYY-MM-DD')) {
msgCreateTimeName = `昨天 ${dayjs(date).format('HH:mm')}` msgCreateTimeName = `昨天 ${dayjs(date).format('HH:mm')}`
} } else if (dayjs().diff(date, 'day') < 7) {
else if (dayjs().diff(date, 'day') < 7) {
msgCreateTimeName = dayjs(date).format(`dddd HH:mm`) msgCreateTimeName = dayjs(date).format(`dddd HH:mm`)
} } else {
else {
msgCreateTimeName = dayjs(date).format('YYYY-MM-DD HH:mm') msgCreateTimeName = dayjs(date).format('YYYY-MM-DD HH:mm')
} }
return msgCreateTimeName return msgCreateTimeName
@ -268,8 +253,7 @@ Page({
item.showTime = true item.showTime = true
preTime = dayjs(item.msgCreateTime).valueOf() preTime = dayjs(item.msgCreateTime).valueOf()
item.msgCreateTimeName = this.formatTime(item.msgCreateTime) item.msgCreateTimeName = this.formatTime(item.msgCreateTime)
} } else {
else {
const curTime = dayjs(item.msgCreateTime).valueOf() const curTime = dayjs(item.msgCreateTime).valueOf()
if (curTime - preTime > gapTime) { if (curTime - preTime > gapTime) {
item.showTime = true item.showTime = true
@ -297,7 +281,7 @@ Page({
}, },
handleRead() { handleRead() {
const { firstNotReadMsgId, messageList } = this.data const { firstNotReadMsgId, messageList } = this.data
const index = messageList.findIndex(item => `${item.msgId}` === `${firstNotReadMsgId}`) const index = messageList.findIndex((item) => `${item.msgId}` === `${firstNotReadMsgId}`)
this.handleView(index) this.handleView(index)
this.setData({ this.setData({
unReadCount: 0, unReadCount: 0,
@ -307,7 +291,6 @@ Page({
app.mpBehavior({ PageName: 'BTN_PatientImAsk' }) app.mpBehavior({ PageName: 'BTN_PatientImAsk' })
this.setData({ this.setData({
expend: !this.data.expend, expend: !this.data.expend,
maxTextArea: false,
}) })
if (this.data.expend) { if (this.data.expend) {
setTimeout(() => { setTimeout(() => {
@ -315,103 +298,6 @@ Page({
}, 300) }, 300)
} }
}, },
handleFooterInput() {
this.setData({
expendType: 'custom-input',
focus: true,
})
this.handleFooter()
},
handleFooterShortcut() {
this.setData({
expendType: 'shortcut',
})
this.handleFooter()
},
catchFooterInput() {
return false
},
toggleMaxTextarea() {
this.setData({
maxTextArea: !this.data.maxTextArea,
})
},
bindblur() {
this.setData({
focus: false,
})
},
handleInput(e: any) {
if (e.detail.value.length >= 500) {
wx.showToast({
title: '文字已达上限',
icon: 'none',
})
}
},
handleReplay(e: any) {
const { message } = e.currentTarget.dataset
this.handleSendCustomMessage(message)
},
handleConfirm() {
const { customMessage } = this.data
this.handleFooter()
this.handleSendCustomMessage(customMessage)
},
handleSendCustomMessage(customMessage: string) {
if (!customMessage)
return
const { messageList } = this.data
wx.ajax({
method: 'POST',
url: '?r=zd/message-interact/send-text-message',
data: {
text: customMessage,
},
loading: true,
loadingText: '发送中...',
}).then((res) => {
if (res.errcode == 10001) {
this.setData({
popupShow: true,
popupType: 'popup9',
popupParams: {
message: res.errmsg,
},
})
return
}
const pushMessage: IMessageItem[] = [
{
msgId: '',
msgContentType: '11',
msgContent: customMessage,
msgVisitTime: '',
msgFromType: '1',
msgCustomSendStatus: res.this_msg_data.msgCustomSendStatus,
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
msgTipsInfo: res.this_msg_data.msgTipsInfo,
},
]
if (res.next_msg_data) {
pushMessage.push({
msgId: '',
msgContentType: '12',
msgContent: res.next_msg_data.msgContent,
msgVisitTime: '',
msgFromType: '2',
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
})
}
this.setData({
customMessage: '',
messageList: [...messageList, ...pushMessage],
})
this.filterCreateTime()
this.handleView()
})
},
handleAdl() { handleAdl() {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adl/index', url: '/patient/pages/adl/index',
@ -481,16 +367,6 @@ Page({
url: '/patient/pages/qol/index', url: '/patient/pages/qol/index',
}) })
}, },
handlePopupOk() {
this.setData({
popupShow: false,
})
},
handlePopupCancel() {
this.setData({
popupShow: false,
})
},
handleBack() { handleBack() {
wx.navigateBack({ wx.navigateBack({
fail() { fail() {

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

@ -13,7 +13,7 @@
<view class="wrap"> <view class="wrap">
<view class="name">{{doctorDetail.doctorName}}</view> <view class="name">{{doctorDetail.doctorName}}</view>
<view class="content"> <view class="content">
<div class="c-name">{{doctorDetail.hospitalName}}</div> {{doctorDetail.hospitalName}}
<view class="tag">{{doctorDetail.hospitalClassificationName}}{{doctorDetail.hospitalLevelName}}</view> <view class="tag">{{doctorDetail.hospitalClassificationName}}{{doctorDetail.hospitalLevelName}}</view>
</view> </view>
</view> </view>
@ -34,7 +34,6 @@
<view class="doctor" wx:if="{{message.msgFromType==='2'}}"> <view class="doctor" wx:if="{{message.msgFromType==='2'}}">
<view class="avatar"> <view class="avatar">
<image class="a-img" mode="aspectFill" src="{{doctorDetail.doctorAvatar}}"></image> <image class="a-img" mode="aspectFill" src="{{doctorDetail.doctorAvatar}}"></image>
<view class="ai" wx:if="{{message.msgContentType==='12'}}">机器人</view>
</view> </view>
<view class="d-container"> <view class="d-container">
<view class="guide" wx:if="{{message.msgContentType==='5'}}"> <view class="guide" wx:if="{{message.msgContentType==='5'}}">
@ -54,11 +53,7 @@
</view> </view>
</view> </view>
</view> </view>
<block <view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
wx:elif="{{message.msgContentType==='1'|| message.msgContentType==='11' || message.msgContentType==='12'}}"
>
<view class="message">{{message.msgContent}}</view>
</block>
<view class="week" wx:elif="{{message.msgContentType==='2'}}"> <view class="week" wx:elif="{{message.msgContentType==='2'}}">
<view class="w-title">以下是我的出诊时间</view> <view class="w-title">以下是我的出诊时间</view>
<view class="w-container"> <view class="w-container">
@ -118,18 +113,7 @@
</view> </view>
<view class="patient" wx:if="{{message.msgFromType==='1'}}"> <view class="patient" wx:if="{{message.msgFromType==='1'}}">
<view class="p-container"> <view class="p-container">
<block wx:if="{{message.msgContentType==='1' || message.msgContentType==='11'}}"> <view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
<view class="message">
<image
wx:if="{{message.msgCustomSendStatus==2 || message.msgCustomSendStatus==6}}"
class="error"
bind:tap="handleReplay"
data-message="{{message.msgContent}}"
src="{{imageUrl}}icon99.png?t={{Timestamp}}"
></image>
<view class="content">{{message.msgContent}}</view>
</view>
</block>
<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>
@ -156,108 +140,47 @@
<image class="a-img" mode="aspectFill" src="{{zdUserInfo.UserImg}}"></image> <image class="a-img" mode="aspectFill" src="{{zdUserInfo.UserImg}}"></image>
</view> </view>
</view> </view>
<view class="status" wx:if="{{message.msgTipsInfo}}">{{message.msgTipsInfo}}</view>
</view> </view>
<view id="place" class="place"></view> <view id="place" class="place"></view>
</scroll-view> </scroll-view>
</view> </view>
<view <view class="page-footer {{expend && 'expend'}}" catch:tap="handleFooter">
class="page-footer {{expend && 'expend'}} {{maxTextArea && 'custom-input-max'}} {{expendType=='custom-input' && 'min-expend'}}"
catch:tap="handleFooter"
>
<view class="unread" catch:tap="handleRead" wx:if="{{unReadCount}}"> <view class="unread" catch:tap="handleRead" wx:if="{{unReadCount}}">
您有{{unReadCount}}条新消息 您有{{unReadCount}}条新消息
<van-icon name="arrow-down" /> <van-icon name="arrow-down" />
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="title" wx:if="{{!expend}}"> <view class="title" wx:if="{{!expend}}">
<view class="custom-input" wx:if="{{doctorDetail.isOpenOneToOne == 1}}" catch:tap="handleFooterInput"> <image class="icon" src="{{imageUrl}}za-images//doctor/icon-message.png?t={{Timestamp}}"></image>
{{customMessage || '输入您的问题'}} 请选择您要咨询的问题
</view> </view>
<view class="shortcut" catch:tap="handleFooterShortcut"> <view class="tabs" wx:if="{{expend}}">
<image class="icon" src="{{imageUrl}}za-images//doctor/icon-message.png?t={{Timestamp}}"></image> <view
{{doctorDetail.isOpenOneToOne == 1 ? '快捷提问':'请选择您要咨询的问题'}} class="tab {{questionActive === index && 'active'}}"
wx:for="{{questionList}}"
wx:key="typeId"
catch:tap="handleQuestionTab"
data-index="{{index}}"
>
{{item.typeName}}
</view> </view>
</view> </view>
<block wx:if="{{expend}}"> <view class="list" wx:if="{{expend}}">
<block wx:if="{{expendType=='shortcut'}}"> <view
<view class="tabs"> class="l-item"
<view wx:for="{{questionActiveList}}"
class="tab {{questionActive === index && 'active'}}" wx:key="questionId"
wx:for="{{questionList}}" bind:tap="handleQuestion"
wx:key="typeId" data-index="{{index}}"
catch:tap="handleQuestionTab" >
data-index="{{index}}" <view class="order">{{index+1}}</view>
> <view class="content">{{item.question}}</view>
{{item.typeName}} <view class="icon-wrap">
</view> <image class="icon" src="{{imageUrl}}icon38.png?t={{Timestamp}}"></image>
</view>
<view class="list">
<view
class="l-item"
wx:for="{{questionActiveList}}"
wx:key="questionId"
bind:tap="handleQuestion"
data-index="{{index}}"
>
<view class="order">{{index+1}}</view>
<view class="content">{{item.question}}</view>
<view class="icon-wrap">
<image class="icon" src="{{imageUrl}}icon38.png?t={{Timestamp}}"></image>
</view>
</view>
</view>
</block>
<block wx:elif="{{expendType=='custom-input'}}">
<view class="custom-input {{maxTextArea && 'custom-input-max'}}">
<image
wx:if="{{maxTextArea}}"
class="icon"
src="{{imageUrl}}icon98.png?t={{Timestamp}}"
catch:tap="toggleMaxTextarea"
></image>
<image
wx:else
class="icon"
src="{{imageUrl}}icon97.png?t={{Timestamp}}"
catch:tap="toggleMaxTextarea"
></image>
<view class="wrap" catch:tap="catchFooterInput">
<textarea
class="textarea"
model:value="{{customMessage}}"
focus="{{focus}}"
hold-keyboard
disable-default-padding
confirm-type="send"
adjust-keyboard-to="bottom"
maxlength="{{500}}"
placeholder="输入您的问题"
bind:blur="bindblur"
bindinput="handleInput"
bindconfirm="handleConfirm"
>
<keyboard-accessory class="ka" hold-keyboard="{{true}}" style="background-color: #fff;">
<cover-view class="ka-container">
<cover-view class="stat {{customMessage.length == 500 && 'red'}}">{{customMessage.length}}/500</cover-view>
<cover-view class="send-btn" bind:tap="handleConfirm">发送</cover-view>
</cover-view>
</keyboard-accessory>
</textarea>
<view class="w-footer"></view>
</view>
</view> </view>
</block> </view>
</block> </view>
</view> </view>
</view> </view>
<referralFrom model:show="{{referralFromShow}}" bind:refresh="handleReferralReplay"></referralFrom> <referralFrom model:show="{{referralFromShow}}" bind:refresh="handleReferralReplay"></referralFrom>
<popup
show="{{popupShow}}"
type="{{popupType}}"
params="{{popupParams}}"
bind:ok="handlePopupOk"
bind:cancel="handlePopupCancel"
></popup>

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

@ -63,7 +63,7 @@
> >
<view class="btn active" wx:if="{{item.SignUpStatus==1}}">审核中</view> <view class="btn active" wx:if="{{item.SignUpStatus==1}}">审核中</view>
<block wx:elif="{{item.SignUpStatus==2}}"> <block wx:elif="{{item.SignUpStatus==2}}">
<view class="btn" wx:if="{{item.BeginTimeValue * 1 < dateValue * 1}}">点此进入</view> <view class="btn" wx:if="{{item.BeginTimeValue * 1 < dateValue * 1}}">点此参加</view>
<view class="btn active" wx:else>已报名</view> <view class="btn active" wx:else>已报名</view>
</block> </block>
<block wx:elif="{{item.SignUpStatus==3}}"> <block wx:elif="{{item.SignUpStatus==3}}">
@ -84,7 +84,6 @@
已满额 已满额
</view> </view>
<view class="btn active" wx:elif="{{item.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view> <view class="btn active" wx:elif="{{item.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view>
<view class="btn" wx:elif="{{item.BeginTimeValue * 1 < dateValue * 1}}">点此进入</view>
<view class="btn" wx:else>报名</view> <view class="btn" wx:else>报名</view>
</block> </block>
</view> </view>

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

@ -140,7 +140,7 @@
.a-img { .a-img {
display: block; display: block;
width: 100%; width: 100%;
height: 178rpx; height: 230rpx;
} }
} }
.lightspot { .lightspot {

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

@ -1,6 +1,6 @@
/* eslint-disable eqeqeq */
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { parseScene } from '../../../utils/util' import { parseScene } from '../../../utils/util'
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
let live_time: null | number = null let live_time: null | number = null
@ -27,15 +27,11 @@ Page({
popupParams: { popupParams: {
close: true, close: true,
} as any, } as any,
answer: false,
isAnswer: false,
}, },
videoContext: {} as WechatMiniprogram.VideoContext, videoContext: {} as WechatMiniprogram.VideoContext,
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
id: options.id, id: options.id,
answer: options.answer === '1',
}) })
if (options.scene) { if (options.scene) {
const optionsScene: any = parseScene(options.scene) const optionsScene: any = parseScene(options.scene)
@ -43,8 +39,7 @@ Page({
optionsScene: optionsScene || {}, optionsScene: optionsScene || {},
id: options.id || optionsScene?.id, id: options.id || optionsScene?.id,
}) })
} } else if (options.proMethodId) {
else if (options.proMethodId) {
this.setData({ this.setData({
'optionsScene.proMethodId': options.proMethodId, 'optionsScene.proMethodId': options.proMethodId,
}) })
@ -134,8 +129,7 @@ Page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '会议详情', title: '会议详情',
}) })
} } else {
else {
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '活动详情', title: '活动详情',
}) })
@ -156,12 +150,6 @@ Page({
}, },
currentVideoSrc: res.ReplayVideoUrl, currentVideoSrc: res.ReplayVideoUrl,
}) })
if (this.data.answer && res.QuestionnaireUrl && !this.data.isAnswer) {
this.setData({
isAnswer: true,
})
this.handleAnswer()
}
}) })
}, },
handleLightVideo(e) { handleLightVideo(e) {
@ -229,12 +217,26 @@ Page({
url: `/patient/pages/liveResult/index?id=${this.data.id}`, url: `/patient/pages/liveResult/index?id=${this.data.id}`,
}) })
}, },
handleSignUp(entry) { handleSignUp() {
const { SubscribeTemplateList } = this.data.detail
app.mpBehavior({ PageName: 'BTN_PatientLiveSign' }) app.mpBehavior({ PageName: 'BTN_PatientLiveSign' })
wx.requestSubscribeMessage({
tmplIds: SubscribeTemplateList,
success: (res) => {
const subscribe = SubscribeTemplateList.map((item) => {
return res[item] === 'accept' ? 1 : 2
})
this.handleSignUpCallback(subscribe)
},
fail: () => {
this.handleSignUpCallback([2, 2])
},
})
},
handleSignUpCallback(res = [2, 2]) {
const { Type } = this.data.detail const { Type } = this.data.detail
const { UserType } = this.data.zdUserInfo const { UserType } = this.data.zdUserInfo
const optionsScene = this.data.optionsScene const optionsScene = this.data.optionsScene
const { SubscribeTemplateList } = this.data.detail
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/activity/sign-up', url: '?r=zd/activity/sign-up',
@ -242,62 +244,21 @@ Page({
Id: this.data.id, Id: this.data.id,
PreUserIdentity: UserType, PreUserIdentity: UserType,
promotionMethodId: optionsScene.proMethodId, promotionMethodId: optionsScene.proMethodId,
subscribe: [...res],
}, },
}).then((res) => { }).then((res) => {
app app
.zdPermissionVerification( .zdPermissionVerification(
3, 3,
Type == 1 ? 1 : 10, Type == 1 ? 1 : 10,
`/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}&entry=1`, `/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`,
this.data.id, this.data.id,
) )
.then(() => { .then(() => {
if (entry === true) { wx.navigateTo({
this.handleLive() url: `/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`,
} })
else {
this.handleSignUpCallback()
wx.navigateTo({
url: `/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`,
})
}
})
.catch(() => {
app.globalData.liveSubscribe = {
sub: true,
tmplIds: SubscribeTemplateList,
}
})
})
},
handleSignUpCallback() {
const { SubscribeTemplateList } = this.data.detail
wx.requestSubscribeMessage({
tmplIds: SubscribeTemplateList,
success: (res) => {
const subscribe = SubscribeTemplateList.map((item) => {
return res[item] === 'accept' ? 1 : 2
}) })
this.postSubscribe(subscribe)
},
fail: () => {
const subscribe = Array.from({ length: SubscribeTemplateList.length }).fill(2)
this.postSubscribe(subscribe)
},
})
},
handleSignUpLive() {
this.handleSignUp(true)
},
postSubscribe(subscribe) {
wx.ajax({
method: 'POST',
url: '?r=zd/activity/subscribe',
data: {
ActivityId: this.data.id,
subscribe,
},
showMsg: false,
}) })
}, },
handleShare() { handleShare() {
@ -339,37 +300,33 @@ Page({
wx.getSetting({ wx.getSetting({
success(res) { success(res) {
if ( if (
res.authSetting['scope.writePhotosAlbum'] != undefined res.authSetting['scope.writePhotosAlbum'] != undefined &&
&& res.authSetting['scope.writePhotosAlbum'] == true res.authSetting['scope.writePhotosAlbum'] == true
) { ) {
that.saveImage() that.saveImage()
} } else if (res.authSetting['scope.writePhotosAlbum'] == undefined) {
else if (res.authSetting['scope.writePhotosAlbum'] == undefined) { //获取当前位置
// 获取当前位置
that.saveImage() that.saveImage()
} } else {
else {
wx.showModal({ wx.showModal({
title: '请求授权相册权限', title: '请求授权相册权限',
content: '需要保存海报到相册,请确认授权', content: '需要保存海报到相册,请确认授权',
confirmColor: '#8c75d0', confirmColor: '#8c75d0',
success(res) { success(res) {
if (res.cancel) { if (res.cancel) {
// 取消授权 //取消授权
wx.showToast({ wx.showToast({
title: '拒绝授权', title: '拒绝授权',
icon: 'none', icon: 'none',
duration: 1000, duration: 1000,
}) })
} } else if (res.confirm) {
else if (res.confirm) { //确定授权,通过wx.openSetting发起授权请求
// 确定授权,通过wx.openSetting发起授权请求
wx.openSetting({ wx.openSetting({
success(res) { success(res) {
if (res.authSetting['scope.writePhotosAlbum'] == true) { if (res.authSetting['scope.writePhotosAlbum'] == true) {
that.saveImage() that.saveImage()
} } else {
else {
wx.showToast({ wx.showToast({
title: '授权失败', title: '授权失败',
icon: 'none', icon: 'none',
@ -430,22 +387,12 @@ Page({
}) })
}, },
handleOffice() { handleOffice() {
wx.ajax({ this.setData({
method: 'GET', popupShow: true,
url: '?r=zd/common/get-channel-wx-code', popupType: 'popup6',
data: { popupParams: {
ChannelType: this.data.detail.Type == 1 ? '1' : '11', close: true,
Id: this.data.id,
}, },
}).then((res) => {
this.setData({
popupShow: true,
popupType: 'popup6',
popupParams: {
qrCode: res,
close: true,
},
})
}) })
}, },
handlePopupCancel() { handlePopupCancel() {
@ -466,12 +413,12 @@ Page({
}, },
handleTimeFinish() { handleTimeFinish() {
this.setData({ this.setData({
'dateValue': dayjs().valueOf(), dateValue: dayjs().valueOf(),
'detail.LeftTime': 0, 'detail.LeftTime': 0,
}) })
}, },
handleLightDetail(e) { handleLightDetail(e) {
const { index } = e.currentTarget.dataset const {index} = e.currentTarget.dataset;
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/liveDetailVideo/index?id=${this.data.id}&index=${index}`, url: `/patient/pages/liveDetailVideo/index?id=${this.data.id}&index=${index}`,
}) })

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

@ -63,7 +63,7 @@
</view> </view>
</block> </block>
</view> </view>
<view class="answer" wx:if="{{detail.QuestionnaireUrl}}" bind:tap="handleAnswer"> <view class="answer" wx:if="{{detail.Status==3 && detail.QuestionnaireUrl}}" bind:tap="handleAnswer">
<image class="a-img" src="{{imageUrl}}bg21.png?t={{Timestamp}}"></image> <image class="a-img" src="{{imageUrl}}bg21.png?t={{Timestamp}}"></image>
</view> </view>
<view class="screen" wx:elif="{{detail.SignUpRecord.length}}"> <view class="screen" wx:elif="{{detail.SignUpRecord.length}}">
@ -107,11 +107,7 @@
<view class="c-title">详情介绍</view> <view class="c-title">详情介绍</view>
<image class="c-img" mode="widthFix" src="{{item.url}}" wx:for="{{detail.DetailJson}}" wx:key="name"></image> <image class="c-img" mode="widthFix" src="{{item.url}}" wx:for="{{detail.DetailJson}}" wx:key="name"></image>
</view> </view>
<view <view class="public" wx:if="{{detail.Status==3}}" style="background: url('{{imageUrl}}bg24.png?t={{Timestamp}}') no-repeat center/100%">
class="public"
wx:if="{{detail.Status==3}}"
style="background: url('{{imageUrl}}bg24.png?t={{Timestamp}}') no-repeat center/100%"
>
<image class="p-code" src="{{detail.subscribe_img}}" show-menu-by-longpress></image> <image class="p-code" src="{{detail.subscribe_img}}" show-menu-by-longpress></image>
</view> </view>
</view> </view>
@ -124,7 +120,8 @@
<block wx:if="{{zdUserInfo.AuditStatus == 1 || zdUserInfo.AuditStatus == 3 || zdUserInfo.AuditStatus == 4}}"> <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> <view class="btn active" wx:if="{{detail.SignUpStatus==1}}" bind:tap="handleResult">审核中</view>
<block wx:elif="{{detail.SignUpStatus==2}}"> <block wx:elif="{{detail.SignUpStatus==2}}">
<view class="btn" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1}}" bind:tap="handleLive">点此进入</view> <view class="btn" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1}}" bind:tap="handleLive">点此参加</view>
<!-- <view class="btn" wx:else bind:tap="handleResult">已报名,查看活动码</view> -->
<view class="btn-wrap" wx:else> <view class="btn-wrap" wx:else>
<view class="office" bind:tap="handleOffice"> <view class="office" bind:tap="handleOffice">
<image class="icon" src="{{imageUrl}}icon75.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon75.png?t={{Timestamp}}"></image>
@ -151,7 +148,6 @@
已满额 已满额
</view> </view>
<view class="btn active" wx:elif="{{detail.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view> <view class="btn active" wx:elif="{{detail.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view>
<view class="btn" wx:elif="{{detail.BeginTimeValue * 1 < dateValue * 1}}" bind:tap="handleSignUpLive">点此进入</view>
<view class="btn" wx:else bind:tap="handleSignUp">报名</view> <view class="btn" wx:else bind:tap="handleSignUp">报名</view>
</block> </block>
</view> </view>
@ -179,9 +175,12 @@
</video> </video>
</view> </view>
<button open-type="share" wx:if="{{detail.PosterUrl}}" class="fixed-share"> <image
<image class="fixed-share" src="{{imageUrl}}icon67.png?t={{Timestamp}}"></image> class="fixed-share"
</button> wx:if="{{detail.PosterUrl}}"
src="{{imageUrl}}icon67.png?t={{Timestamp}}"
bind:tap="handleShare"
></image>
<van-popup show="{{shareShow}}" custom-class="custom-popup" bind:click-overlay="handleShareClose"> <van-popup show="{{shareShow}}" custom-class="custom-popup" bind:click-overlay="handleShareClose">
<view class="p-share"> <view class="p-share">

19
src/patient/pages/liveDetailVideo/index.scss

@ -7,26 +7,9 @@
position: relative; position: relative;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
.video { .video {
width: 100%; width: 100%;
} height: 100%;
.full-screen {
position: absolute;
right: 0;
color: #fff;
padding: 32rpx;
display: flex;
align-items: center;
gap: 12rpx;
font-size: 28rpx;
color: rgba(255, 255, 255, 0.6);
.icon {
width: 40rpx;
height: 40rpx;
}
} }
.play { .play {
position: absolute; position: absolute;

100
src/patient/pages/liveDetailVideo/index.ts

@ -1,7 +1,5 @@
import dayjs from 'dayjs' import dayjs from 'dayjs'
const licia = require('miniprogram-licia') const licia = require('miniprogram-licia')
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
// 组件说明文档 https://github.com/wechat-miniprogram/miniprogram-component-plus/blob/master/docs/video-swiper.md // 组件说明文档 https://github.com/wechat-miniprogram/miniprogram-component-plus/blob/master/docs/video-swiper.md
@ -22,8 +20,6 @@ Page({
starShow: false, starShow: false,
index: 0, index: 0,
offsetTop: 310,
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
@ -82,37 +78,11 @@ Page({
item.drag = false item.drag = false
if (index === current) { if (index === current) {
item.ctx.play() item.ctx.play()
} } else {
else {
item.ctx.pause() item.ctx.pause()
} }
}) })
}, },
handleFullScreenChange(e) {
const { index } = e.currentTarget.dataset
const fullScreenKey = `videoList[${index}].fullScreen`
this.setData({
[fullScreenKey]: e.detail.fullScreen,
})
},
handelFullScreen(e) {
const { id } = e.currentTarget.dataset
const context = wx.createVideoContext(id)
context.requestFullScreen({})
},
handleLoadedMetaData(e) {
const { index } = e.currentTarget.dataset
const offsetTopKey = `videoList[${index}].offsetTop`
const query = wx.createSelectorQuery()
query
.select(`#${e.target.id}`)
.boundingClientRect((rect) => {
this.setData({
[offsetTopKey]: rect.height + e.target.offsetTop + 10,
})
})
.exec()
},
handlePlay(e: any) { handlePlay(e: any) {
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
const key = `videoList[${index}].play` const key = `videoList[${index}].play`
@ -130,8 +100,7 @@ Page({
handleTimeUpdate(e: any) { handleTimeUpdate(e: any) {
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
const { videoList } = this.data const { videoList } = this.data
if (videoList[index].drag) if (videoList[index].drag) return
return
const { currentTime, duration } = e.detail const { currentTime, duration } = e.detail
const progress = (currentTime / duration) * 100 const progress = (currentTime / duration) * 100
const progressKey = `videoList[${index}].progress` const progressKey = `videoList[${index}].progress`
@ -146,8 +115,7 @@ Page({
const { videoList } = this.data const { videoList } = this.data
if (videoList[index].play) { if (videoList[index].play) {
videoList[index].ctx.pause() videoList[index].ctx.pause()
} } else {
else {
videoList[index].ctx.play() videoList[index].ctx.play()
} }
}, },
@ -170,22 +138,60 @@ Page({
[dragKey]: false, [dragKey]: false,
}) })
}, },
onShareAppMessage() { _timer: null as any,
const { id, current, videoList } = this.data handleLike(e: any) {
return { const { index } = e.currentTarget.dataset
title: videoList[current].Title, const { videoList } = this.data
path: `/patient/pages/liveDetailVideo/index?id=${id}&index=${current}`, const currentVideo = videoList[index]
imageUrl: videoList[current].imgUrl, const LikeTimes = Number(currentVideo.LikeTimes) + 1
const key = `videoList[${index}].LikeTimes`
this.setData({
LikeTimes: this.data.LikeTimes + 1,
[key]: LikeTimes,
[`videoList[${index}].IsLike`]: true,
starShow: true,
})
const header = this.selectComponent('#animate')
header.start()
if (this._timer) {
clearInterval(this._timer)
} }
this._timer = setTimeout(() => {
this.setData({
starShow: false,
})
}, 2000)
this.likePost()
}, },
handleBack() { likePost: licia.debounce(function (this: any) {
wx.navigateBack({ const { activeId, LikeTimes } = this.data
fail: () => { this.setData({
wx.reLaunch({ LikeTimes: 0,
url: `/patient/pages/liveDetail/index?id=${this.data.id}`, })
}) wx.ajax({
method: 'POST',
url: '?r=wtx/knowledge/like',
data: {
Id: activeId,
LikeTimes,
}, },
}) })
}, 1000),
onShareAppMessage() {
const { current, videoList } = this.data
const currentVideo = videoList[current]
this.setData({
[`videoList[${current}].ShareTimes`]: Number(currentVideo.ShareTimes) + 1,
[`videoList[${current}].IsShare`]: true,
})
wx.ajax({
method: 'POST',
url: '?r=wtx/knowledge/share',
data: { Id: this.data.activeId },
})
},
handleBack() {
wx.navigateBack()
}, },
}) })

32
src/patient/pages/liveDetailVideo/index.wxml

@ -11,31 +11,19 @@
src="{{item.videoUrl}}" src="{{item.videoUrl}}"
poster="{{item.imgUrl}}" poster="{{item.imgUrl}}"
loop loop
title="{{item.title}}"
object-fit="contain" object-fit="contain"
enable-play-gesture enable-play-gesture
enable-progress-gesture enable-progress-gesture
show-center-play-btn="{{false}}" show-center-play-btn="{{false}}"
controls="{{item.fullScreen}}" play-btn-position="center"
bindloadedmetadata="handleLoadedMetaData" controls="{{false}}"
bindprogress="handleProgress" bindprogress="handleProgress"
bindplay="handlePlay" bindplay="handlePlay"
bindpause="handlePause" bindpause="handlePause"
bindfullscreenchange="handleFullScreenChange"
bindtimeupdate="handleTimeUpdate" bindtimeupdate="handleTimeUpdate"
data-index="{{index}}" data-index="{{index}}"
data-full="{{item.fullScreen}}" bind:tap="handleTogglePlay"
></video> ></video>
<view
wx:if="{{item.offsetTop}}"
class="full-screen"
style="top:{{item.offsetTop}}px"
catch:tap="handelFullScreen"
data-id="video-{{item.attachmentId}}"
>
<image class="icon" src="{{imageUrl}}icon87.png?t={{Timestamp}}"></image>
全屏观看
</view>
<image <image
wx:if="{{!item.play}}" wx:if="{{!item.play}}"
class="play" class="play"
@ -45,7 +33,7 @@
data-index="{{index}}" data-index="{{index}}"
></image> ></image>
<view class="swiper-item-footer"> <view class="swiper-item-footer">
<view class="title">{{item.title}}</view> <view class="title">{{item.Title}}</view>
<view class="progress"> <view class="progress">
<van-slider <van-slider
value="{{item.progress}}" value="{{item.progress}}"
@ -63,7 +51,7 @@
<view class="container"> <view class="container">
<view class="user"> <view class="user">
<image class="avatar" src="{{imageUrl}}logo1.png?t={{Timestamp}}"></image> <image class="avatar" src="{{imageUrl}}logo1.png?t={{Timestamp}}"></image>
<view class="name">TED关爱小助手</view> <view class="name">基因知识库</view>
</view> </view>
<view class="options"> <view class="options">
<button class="o-item" open-type="share"> <button class="o-item" open-type="share">
@ -71,11 +59,11 @@
<image wx:else class="icon" src="{{imageUrl}}icon85.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon85.png?t={{Timestamp}}"></image>
<view class="num {{item.IsShare && 'active'}}">{{item.ShareTimes}}</view> <view class="num {{item.IsShare && 'active'}}">{{item.ShareTimes}}</view>
</button> </button>
<!-- <view class="o-item" bind:tap="handleLike" data-index="{{index}}"> --> <view class="o-item" bind:tap="handleLike" data-index="{{index}}">
<!-- <image wx:if="{{item.IsLike}}" class="icon" src="{{imageUrl}}icon84.png?t={{Timestamp}}"></image> --> <image wx:if="{{item.IsLike}}" class="icon" src="{{imageUrl}}icon84.png?t={{Timestamp}}"></image>
<!-- <image wx:else class="icon" src="{{imageUrl}}icon86.png?t={{Timestamp}}"></image> --> <image wx:else class="icon" src="{{imageUrl}}icon86.png?t={{Timestamp}}"></image>
<!-- <view class="num {{item.IsLike && 'active'}}">{{item.LikeTimes}}</view> --> <view class="num {{item.IsLike && 'active'}}">{{item.LikeTimes}}</view>
<!-- </view> --> </view>
</view> </view>
</view> </view>
</view> </view>

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

@ -41,18 +41,6 @@ page {
color: #fff; color: #fff;
text-align: center; text-align: center;
} }
.go-live {
margin: 38rpx auto 0;
width: 456rpx;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 40rpx;
color: #B982FF;
background: linear-gradient(to bottom, #ffffff 0%, #e8d6ff 100%);
border-radius: 48rpx 48rpx 48rpx 48rpx;
}
.price { .price {
margin: 10rpx auto 0; margin: 10rpx auto 0;
font-size: 56rpx; font-size: 56rpx;

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

@ -1,6 +1,5 @@
import dayjs from 'dayjs'
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
import dayjs from 'dayjs'
let live_time: null | number = null let live_time: null | number = null
Page({ Page({
@ -12,15 +11,11 @@ Page({
codeUrl: '', codeUrl: '',
dateValue: '' as string | number, dateValue: '' as string | number,
rewardScore: 0 as number | undefined, rewardScore: 0 as number | undefined,
qrCode: '',
entry: '0',
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
id: options.id, id: options.id,
rewardScore: options.rewardScore, rewardScore: options.rewardScore,
entry: options.entry,
}) })
if (live_time) { if (live_time) {
clearInterval(live_time) clearInterval(live_time)
@ -52,24 +47,6 @@ Page({
this.setData({ this.setData({
detail: res, detail: res,
}) })
if (this.data.entry == '1' && res.BeginTimeValue < this.data.dateValue && res.Type == 1) {
this.handleLive()
}
this.getQrCode()
})
},
getQrCode() {
wx.ajax({
method: 'GET',
url: '?r=zd/common/get-channel-wx-code',
data: {
ChannelType: this.data.detail.Type == 1 ? '1' : '11',
Id: this.data.id,
},
}).then((res) => {
this.setData({
qrCode: res,
})
}) })
}, },
getLiveDetail() { getLiveDetail() {

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

@ -13,15 +13,22 @@
<view class="page-container" style="top:{{pageTop+30}}px;"> <view class="page-container" style="top:{{pageTop+30}}px;">
<image class="badge" mode="aspectFit" src="{{imageUrl}}icon43.png?t={{Timestamp}}"></image> <image class="badge" mode="aspectFit" src="{{imageUrl}}icon43.png?t={{Timestamp}}"></image>
<view class="status">报名成功</view> <view class="status">报名成功</view>
<!-- <view class="tip">欢迎您参与此次活动</view> --> <view class="tip">欢迎您参与此次活动</view>
<view class="go-live" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1 && detail.Type==1}}" bind:tap="handleLive">
立即进入直播间
</view>
<button wx:else open-type="share" class="go-live">分享活动</button>
<view class="office"> <view class="office">
<view class="o-title">关注公众号,活动提醒不错过</view> <view class="o-title">关注公众号,活动提醒不错过</view>
<image class="code" src="{{qrCode}}" show-menu-by-longpress></image> <image class="code" src="{{imageUrl}}code1.png?t={{Timestamp}}" show-menu-by-longpress></image>
<view class="btn">长按识别二维码</view> <view class="btn">长按识别二维码</view>
</view> </view>
<view class="container">
<view class="c-content">
<image class="banner" src="{{liveDetail.IntroductionUrl}}"></image>
<view class="c-title">{{detail.ActivityName}}</view>
<view class="date">直播时间: {{detail.BeginTime}}</view>
<view wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1 && detail.Type==1}}" class="btn" bind:tap="handleLive">
立即进入直播间
</view>
<button open-type="share" class="btn btn2">分享活动</button>
</view>
</view>
</view> </view>
</view> </view>

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

@ -31,7 +31,7 @@
> >
<view class="btn active" wx:if="{{item.SignUpStatus==1}}">审核中</view> <view class="btn active" wx:if="{{item.SignUpStatus==1}}">审核中</view>
<block wx:elif="{{item.SignUpStatus==2}}"> <block wx:elif="{{item.SignUpStatus==2}}">
<view class="btn" wx:if="{{item.BeginTimeValue * 1 < dateValue * 1}}">点此进入</view> <view class="btn" wx:if="{{item.BeginTimeValue * 1 < dateValue * 1}}">点此参加</view>
<view class="btn active" wx:else>已报名</view> <view class="btn active" wx:else>已报名</view>
</block> </block>
<block wx:elif="{{item.SignUpStatus==3}}"> <block wx:elif="{{item.SignUpStatus==3}}">

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

@ -39,7 +39,7 @@ page {
.row-sub { .row-sub {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 28rpx; font-size: 28rpx;
color: #adacb2; color: #ADACB2;
} }
.row-content { .row-content {
padding-top: 24rpx; padding-top: 24rpx;
@ -267,7 +267,7 @@ page {
} }
.cancellation { .cancellation {
margin: 32rpx 0 0; margin: 32rpx 0 24rpx;
height: 88rpx; height: 88rpx;
background: #ffffff; background: #ffffff;
border-radius: 156rpx 156rpx 156rpx 156rpx; border-radius: 156rpx 156rpx 156rpx 156rpx;
@ -275,6 +275,10 @@ page {
line-height: 96rpx; line-height: 96rpx;
font-size: 32rpx; font-size: 32rpx;
color: #c394ff; color: #c394ff;
&:last-of-type {
margin-top: 0;
border: none;
}
} }
.picker { .picker {

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

@ -1,12 +1,10 @@
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: {
scrollBottom: '', scrollBottom: '',
submit: '',
isEdit: false, isEdit: false,
area: [] as string[][], area: [] as string[][],
city: [] as string[][], city: [] as string[][],
@ -67,7 +65,6 @@ Page({
if (options.bottom) { if (options.bottom) {
this.setData({ this.setData({
scrollBottom: options.bottom, scrollBottom: options.bottom,
submit: options.submit,
}) })
} }
}, },
@ -108,7 +105,7 @@ Page({
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();
@ -131,15 +128,13 @@ Page({
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}`
} }
@ -160,7 +155,7 @@ Page({
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)
@ -176,7 +171,7 @@ Page({
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)
@ -185,7 +180,7 @@ Page({
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)
@ -194,7 +189,7 @@ Page({
const value = e.detail.value const value = e.detail.value
const id = this.data.dict.AgeRange.filter((_item, index) => index == value)[0]?.id const id = this.data.dict.AgeRange.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)
@ -203,7 +198,7 @@ Page({
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) {
@ -238,10 +233,9 @@ Page({
this.updateUserInfo() this.updateUserInfo()
}, },
updateUserInfo(update = true) { updateUserInfo(update = true) {
if (!update) if (!update) return
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',
@ -296,8 +290,8 @@ Page({
}, },
handlePopupOk() { handlePopupOk() {
this.setData({ this.setData({
'popupShow': false, popupShow: false,
'popupType': '', popupType: '',
'zdUserInfo.prescriptionImg': '', 'zdUserInfo.prescriptionImg': '',
}) })
this.updateUserInfo() this.updateUserInfo()

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

@ -179,12 +179,7 @@
<view class="del" catchtap="handleDelData" wx:if="{{zdUserInfo.DrugsAuditStatus==2}}"> <view class="del" catchtap="handleDelData" wx:if="{{zdUserInfo.DrugsAuditStatus==2}}">
<image class="d-icon" src="{{imageUrl}}icon77.png?t={{Timestamp}}"></image> <image class="d-icon" src="{{imageUrl}}icon77.png?t={{Timestamp}}"></image>
</view> </view>
<image <image class="img" src="{{zdUserInfo.PrescriptionImg}}" mode="aspectFill" catch:tap="handlePreview"></image>
class="img"
src="{{zdUserInfo.PrescriptionImg}}"
mode="aspectFill"
catch:tap="handlePreview"
></image>
<view class="check" wx:if="{{zdUserInfo.DrugsAuditStatus==1}}"> <view class="check" wx:if="{{zdUserInfo.DrugsAuditStatus==1}}">
<image class="check-icon" src="{{imageUrl}}icon81.png?t={{Timestamp}}"></image> <image class="check-icon" src="{{imageUrl}}icon81.png?t={{Timestamp}}"></image>
审核中... 审核中...
@ -202,11 +197,8 @@
</block> </block>
</view> </view>
</view> </view>
<view wx:if="{{submit}}" class="cancellation" bind:tap="routerTo" data-url="/patient/pages/my/index">提交</view> <view class="cancellation" bind:tap="routerTo" data-url="/pages/login/index?back=1">切换医生端</view>
<block wx:else> <view wx:if="{{zdUserInfo.IsRootUser==1}}" class="cancellation" bind:tap="handleLogout">注销账号</view>
<view class="cancellation" bind:tap="routerTo" data-url="/pages/login/index?back=1">切换医生端</view>
<view wx:if="{{zdUserInfo.IsRootUser==1}}" class="cancellation" bind:tap="handleLogout">注销账号</view>
</block>
</view> </view>
<van-popup <van-popup

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

@ -24,6 +24,7 @@ Page({
shareLock: false, shareLock: false,
sendShare: false, sendShare: false,
// TODO:后期需补充逻辑,根据获取积分情况控制显隐
showTip: false, showTip: false,
}, },

29
src/utils/request.ts

@ -2,21 +2,14 @@ interface IGlobalParams {
gUrl: string gUrl: string
} }
export function request({ gUrl }: IGlobalParams, { export const request = function (
url, { gUrl }: IGlobalParams,
method, { url, method, data, header, showMsg = true, loading = false, isJSON = false, ...options }: IAgaxParams,
data, ): Promise<any> {
header,
showMsg = true,
loading = false,
loadingText = '加载中...',
isJSON = false,
...options
}: IAgaxParams): Promise<any> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (loading) { if (loading) {
wx.showLoading({ wx.showLoading({
title: loadingText, title: '加载中...',
mask: true, mask: true,
}) })
} }
@ -36,11 +29,9 @@ export function request({ gUrl }: IGlobalParams, {
const { code, data } = res.data const { code, data } = res.data
if (isJSON) { if (isJSON) {
resolve(res.data) resolve(res.data)
} } else if (code === 0) {
else if (code === 0) {
resolve(data) resolve(data)
} } else if (showMsg) {
else if (showMsg) {
const msg = errPicker(res.data) const msg = errPicker(res.data)
if (loading) { if (loading) {
setTimeout(() => { setTimeout(() => {
@ -49,16 +40,14 @@ export function request({ gUrl }: IGlobalParams, {
icon: 'none', icon: 'none',
}) })
}, 30) }, 30)
} } else {
else {
wx.showToast({ wx.showToast({
title: msg, title: msg,
icon: 'none', icon: 'none',
}) })
reject(res) reject(res)
} }
} } else {
else {
reject(res) reject(res)
} }
}, },

87
src/utils/util.ts

@ -1,65 +1,64 @@
export function formatTime(date: Date) { export const formatTime = (date: Date) => {
const year = date.getFullYear() const year = date.getFullYear();
const month = date.getMonth() + 1 const month = date.getMonth() + 1;
const day = date.getDate() const day = date.getDate();
const hour = date.getHours() const hour = date.getHours();
const minute = date.getMinutes() const minute = date.getMinutes();
const second = date.getSeconds() const second = date.getSeconds();
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}` return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`;
} };
export function formatNumber(n: number) { export const formatNumber = (n: number) => {
const s = n.toString() const s = n.toString();
return s[1] ? s : `0${s}` return s[1] ? s : `0${s}`;
} };
/** /**
* *
* @returns string * @returns string
*/ */
export function getCurrentPageUrl() { export const getCurrentPageUrl = function () {
const pages = getCurrentPages() const pages = getCurrentPages();
const currentPage = pages[pages.length - 1] const currentPage = pages[pages.length - 1];
const url = `/${currentPage.route}` const url = `/${currentPage.route}`;
return url return url;
} };
/** /**
* & * &
* @returns string * @returns string
*/ */
export function getCurrentPageUrlWithArgs() { export const getCurrentPageUrlWithArgs = function () {
const pages = getCurrentPages() const pages = getCurrentPages();
const currentPage = pages[pages.length - 1] const currentPage = pages[pages.length - 1];
const url = currentPage.route const url = currentPage.route;
const options = currentPage.options const options = currentPage.options;
let urlWithArgs = `/${url}?` let urlWithArgs = `/${url}?`;
for (const key in options) { for (const key in options) {
const value = options[key] const value = options[key];
urlWithArgs += `${key}=${value}&` urlWithArgs += `${key}=${value}&`;
} }
urlWithArgs = urlWithArgs.substring(0, urlWithArgs.length - 1) urlWithArgs = urlWithArgs.substring(0, urlWithArgs.length - 1);
return urlWithArgs return urlWithArgs;
} };
export function parseUrlArgsToArray(urlArgs): any { const parseUrlArgsToArray = (urlArgs) => {
urlArgs = urlArgs.split('&') urlArgs = urlArgs.split('&');
const results = {} const results = {};
urlArgs.forEach((arg) => { urlArgs.forEach((arg) => {
arg = arg.split('=') arg = arg.split('=');
if (arg[0] && arg[1]) { if (arg[0] && arg[1]) {
results[arg[0]] = arg[1] results[arg[0]] = arg[1];
} }
}) });
return results return results;
} };
export function parseScene(scene) { export const parseScene = (scene) => {
if (scene) { if (scene) {
return parseUrlArgsToArray(decodeURIComponent(scene)) return parseUrlArgsToArray(decodeURIComponent(scene));
} else {
return null;
} }
else { };
return null
}
}

3
typings/index.d.ts vendored

@ -1,5 +1,3 @@
declare module 'miniprogram-licia';
type pageType = 0 | 1 | 2 type pageType = 0 | 1 | 2
interface IAppOption { interface IAppOption {
globalData: { globalData: {
@ -52,7 +50,6 @@ interface IAppOption {
interface IAgaxParams extends WechatMiniprogram.RequestOption { interface IAgaxParams extends WechatMiniprogram.RequestOption {
showMsg?: boolean showMsg?: boolean
loading?: boolean loading?: boolean
loadingText?: string
isJSON?: boolean isJSON?: boolean
} }

Loading…
Cancel
Save