Browse Source

feat: 完成多项功能优化与页面调整

1. 新增并更新多组图片资源,优化页面图标与背景
2. 调整问卷页面标题、个人中心与医生页面样式
3. 新增toast组件并集成反馈/关注弹窗功能
4. 优化互动页面逻辑与聊天按钮显示条件
5. 更新年龄选择选项与直播详情页面样式
6. 调整个人中心页面跳转逻辑与事件绑定
7. 补充项目文档说明与技术规范更新
master
kola-web 8 hours ago
parent
commit
70e55da281
  1. 82
      AGENTS.md
  2. 33
      src/components/toast/index.scss
  3. 36
      src/components/toast/index.ts
  4. 21
      src/components/toast/index.wxml
  5. 2
      src/doctor/pages/d_interactiveDoctor/index.wxml
  6. 4
      src/doctor/pages/d_my/index.json
  7. 2
      src/doctor/pages/d_my/index.scss
  8. 16
      src/doctor/pages/d_my/index.ts
  9. 7
      src/doctor/pages/d_my/index.wxml
  10. BIN
      src/images/1/start.png
  11. BIN
      src/images/bg27.png
  12. BIN
      src/images/bg28.png
  13. BIN
      src/images/icon74.png
  14. BIN
      src/images/icon82.png
  15. BIN
      src/images/icon83.png
  16. 37
      src/pages/enterInfo/index.wxml
  17. 2
      src/pages/index/index.wxml
  18. 4
      src/pages/interactivePatient/index.scss
  19. 4
      src/pages/interactivePatient/index.wxml
  20. 8
      src/pages/liveDetail/index.scss
  21. 11
      src/pages/liveDetail/index.wxml
  22. 1
      src/pages/my/index.json
  23. 5
      src/pages/my/index.scss
  24. 9
      src/pages/my/index.ts
  25. 17
      src/pages/my/index.wxml
  26. 36
      src/pages/personalInformation/index.wxml
  27. 2
      src/pages/qaForm/index.json

82
AGENTS.md

@ -2,7 +2,9 @@
## 项目概述 ## 项目概述
IGG4 重症肌无力(MG)患者社区微信小程序。两种用户角色:患者(loginType=1)和医生(loginType=2)。基于 TypeScript + SCSS 构建,无测试框架。 愈见昕生(原 gMG给力加油站/重症肌无力加油站)— MG 患者社区微信小程序。两种用户角色:患者(loginType=1)和医生(loginType=2)。基于 TypeScript + SCSS 构建,无测试框架。
信达小程序项目位置 C:\Users\kola\project\xinda-miniprogram
### 技术栈 ### 技术栈
@ -31,10 +33,43 @@ IGG4 重症肌无力(MG)患者社区微信小程序。两种用户角色:
- **源码根目录**:`src/`(在 project.config.json 中设为 `miniprogramRoot` - **源码根目录**:`src/`(在 project.config.json 中设为 `miniprogramRoot`
- **入口**:`src/app.ts` + `src/app.json` - **入口**:`src/app.ts` + `src/app.json`
- **路径别名**:`@/*` 映射到 `src/*`(tsconfig paths + app.json resolveAlias) - **路径别名**:`@/*` 映射到 `src/*`(tsconfig paths + app.json resolveAlias)
- **自定义 Page 包装器**:`src/utils/page.ts` 在 `app.ts` onLaunch 时全局替换 `Page()` — 注入 `imageUrl`/`Timestamp` 数据、滚动导航栏变色、默认分享行为、`handleMakePhoneCall`。所有页面都经过此包装器。 - **自定义 Page 包装器**:`src/utils/page.ts` 在 `app.ts` onLaunch 时全局替换 `Page()` — 注入 `imageUrl`/`Timestamp`/`theme` 数据、滚动导航栏变色、默认分享行为、`handleMakePhoneCall`。所有页面都经过此包装器。
- **HTTP 请求**:`src/api/request.ts` 将 `wx.request` 封装为 `wx.ajax`(通过 `licia.curry` 柯里化基础 URL)。所有 API 调用使用 `wx.ajax()`,而非 `wx.request()`。自动在 header 和 body 中注入 `loginState` - **HTTP 请求**:`src/api/request.ts` 将 `wx.request` 封装为 `wx.ajax`(通过 `licia.curry` 柯里化基础 URL)。所有 API 调用使用 `wx.ajax()`,而非 `wx.request()`。自动在 header 和 body 中注入 `loginState`
- **npm 包**:由微信开发者工具构建到 `src/miniprogram_npm/`(packNpmManually 配置)。不要直接编辑 miniprogram_npm。 - **npm 包**:由微信开发者工具构建到 `src/miniprogram_npm/`(packNpmManually 配置)。不要直接编辑 miniprogram_npm。
### 主题系统(DRUG / PATIENT)
用药患者(VIP,UserType >= 4)使用紫色 DRUG 主题,非用药患者使用绿色 PATIENT 主题。
- **`app.getTheme()`**:异步获取用户主题,返回 `'DRUG'``'PATIENT'`。内部轮询等待 `userInfo` 加载完成。
- **`page.ts` 全局注入**:在 `setImageParams` 中为所有非医生端页面注入 `data.theme`,初始值 `'PATIENT'`,异步通过 `getTheme()` 更新为 `'DRUG'`(如适用)。医生端页面不注入 `theme`
- **页面根元素 id**:所有患者端 WXML 页面根 `<view>` 添加 `id="{{theme === 'DRUG' && 'drug-page'}}"`,用药患者时 id 为 `drug-page`,非用药患者时 id 为空。
- **CSS 覆盖方式**:在 SCSS 中通过 `#drug-page` 选择器覆盖用药患者样式,无需修改原有绿色样式。
#### 用药患者(DRUG)主题色值
| 类型 | 色值 |
|------|------|
| 文字色 | `rgba(89, 86, 233, 1)` |
| 按钮渐变 | `linear-gradient(270deg, #5956E9 0%, #B384F4 100%)` |
| 浅色背景 | `rgba(89, 86, 233, 0.1)` |
#### 主题使用示例(SCSS)
```scss
.btn { background: #0eb66d; }
#drug-page .btn { background: linear-gradient(270deg, #5956E9 0%, #B384F4 100%); }
.text { color: #0eb66d; }
#drug-page .text { color: rgba(89, 86, 233, 1); }
```
#### 主题使用示例(WXML)
```xml
<image src="{{imageUrl}}{{theme === 'DRUG' ? 'bg22' : 'bg15'}}.png?t={{Timestamp}}" />
```
### 登录与权限系统(app.ts) ### 登录与权限系统(app.ts)
- **登录流程**:`onShow` → `startLogin()``wx.login` 获取 code → 后端 `init-login` 返回 `loginState` - **登录流程**:`onShow` → `startLogin()``wx.login` 获取 code → 后端 `init-login` 返回 `loginState`
@ -42,7 +77,7 @@ IGG4 重症肌无力(MG)患者社区微信小程序。两种用户角色:
- 1:空白用户 → 跳转登录页 - 1:空白用户 → 跳转登录页
- 2:已注册用户 → 需完善资料 - 2:已注册用户 → 需完善资料
- 3:已确诊患者 → 需上传认证 - 3:已确诊患者 → 需上传认证
- 4:已用药患者(VIP)→ 完整权限 - 4:已用药患者(VIP)→ 完整权限,使用 DRUG 主题
- **路由守卫**:`verifySys(pub)` 检查登录状态和角色,自动重定向: - **路由守卫**:`verifySys(pub)` 检查登录状态和角色,自动重定向:
- 未登录 + 医生端页面 → 医生登录页 - 未登录 + 医生端页面 → 医生登录页
- 未登录 + 患者端页面 → 患者登录页(若 anyWhere 为 true 则"随便看看"模式) - 未登录 + 患者端页面 → 患者登录页(若 anyWhere 为 true 则"随便看看"模式)
@ -68,11 +103,27 @@ IGG4 重症肌无力(MG)患者社区微信小程序。两种用户角色:
| 4 | `/pages/story/index` | 向往的生活 | | 4 | `/pages/story/index` | 向往的生活 |
| 5 | `/pages/my/index` | 我的 | | 5 | `/pages/my/index` | 我的 |
- 自定义 TabBar 使用 Vant `van-tabbar` 组件 - **患者端 TabBar**(`src/custom-tab-bar/`):使用 Vant `van-tabbar` 组件,额外包含"用药提醒"自定义按钮(`item.custom=true`),仅 `theme === 'DRUG'` 时展示
- **医生端 TabBar**(`src/doctor/components/tabbar/`):自定义组件(非 Vant),纯 HTML/CSS 实现
- Tab 4(向往的生活)在 `anyWhere` 为 true 时隐藏(浏览模式) - Tab 4(向往的生活)在 `anyWhere` 为 true 时隐藏(浏览模式)
- Tab 2(MG全知道)在 `config.picTextEbookStatus === 1` 时可能重定向到 webview - Tab 2(MG全知道)在 `config.picTextEbookStatus === 1` 时可能重定向到 webview
- Tab 5(我的)需要 `permissionVerification(grade=2)` - Tab 5(我的)需要 `permissionVerification(grade=2)`
- 主题支持:DRUG / PATIENT(当前始终解析为 PATIENT) - 患者 TabBar 通过 `app.registerListener` 监听全局事件更新 `theme`
### 医患互动消息类型
互动页面(`d_interactive`/`d_interactiveDoctor`/`interactivePatient`)仅支持以下消息类型:
| msgContentType | 类型 | 说明 |
|----------------|------|------|
| 1 | 文本(患者发送) | 患者发送的标准消息 |
| 2 | 出诊时间 | 医生出诊时间信息 |
| 5 | 欢迎语 | 欢迎引导消息 |
| 10 | ADL | ADL 评估相关消息 |
| 11 | 文本(患者) | 患者文本消息 |
| 12 | 文本(医生自定义) | 医生自定义文本回复 |
已移除的类型:audio(4)、info(6)、info(7)、referral(8)、referral-replay(9)。
### HTTP 响应约定(api/request.ts) ### HTTP 响应约定(api/request.ts)
@ -106,7 +157,8 @@ IGG4 重症肌无力(MG)患者社区微信小程序。两种用户角色:
- **个人中心**:`my`、`mySave`、`personalInformation`、`changePhone`、`changeUser`、`cancellation` - **个人中心**:`my`、`mySave`、`personalInformation`、`changePhone`、`changeUser`、`cancellation`
- **家庭**:`family`、`familyList`、`familyScan` - **家庭**:`family`、`familyList`、`familyScan`
- **医疗**:`hospital`、`doctor`、`doctorDetail`、`drugRecord`、`infusionCenter`、`nrdl`、`nrdlDetail`、`nrdlTable` - **医疗**:`hospital`、`doctor`、`doctorDetail`、`drugRecord`、`infusionCenter`、`nrdl`、`nrdlDetail`、`nrdlTable`
- **其他**:`thePublic`、`privacyAgreement`、`taskAgreement`、`comIns`、`signIn`、`smallPage`、`webview`、`referral`、`interactivePatient`、`demo` - **互动**:`interactivePatient`
- **其他**:`thePublic`、`privacyAgreement`、`taskAgreement`、`comIns`、`signIn`、`smallPage`、`webview`、`referral`、`demo`、`qaForm`
### 医生端分包页面(src/doctor/) ### 医生端分包页面(src/doctor/)
@ -155,11 +207,17 @@ IGG4 重症肌无力(MG)患者社区微信小程序。两种用户角色:
| `viewFile` | 文件查看 | | `viewFile` | 文件查看 |
| `viewVideo` | 视频播放器 | | `viewVideo` | 视频播放器 |
### 医生端组件(src/doctor/components/)
| 组件 | 说明 |
|------|------|
| `tabbar` | 医生端自定义 TabBar(非 Vant,纯 HTML/CSS) |
## 工具函数(src/utils/) ## 工具函数(src/utils/)
| 文件 | 说明 | | 文件 | 说明 |
|------|------| |------|------|
| `page.ts` | Page() 全局替换:注入 imageUrl/Timestamp、滚动导航栏变色、默认分享、handleMakePhoneCall | | `page.ts` | Page() 全局替换:注入 imageUrl/Timestamp/theme、滚动导航栏变色、默认分享、handleMakePhoneCall。医生端页面不注入 theme。 |
| `util.ts` | formatTime、formatNumber、getCurrentPageUrl、getCurrentPageUrlWithArgs、parseScene | | `util.ts` | formatTime、formatNumber、getCurrentPageUrl、getCurrentPageUrlWithArgs、parseScene |
| `promisify.ts` | 基于 Proxy 的 wx API Promise 化(同步方法保留,异步方法返回 Promise) | | `promisify.ts` | 基于 Proxy 的 wx API Promise 化(同步方法保留,异步方法返回 Promise) |
| `watch.ts` | 基于 Object.defineProperty 的页面级数据监听(setWatcher) | | `watch.ts` | 基于 Object.defineProperty 的页面级数据监听(setWatcher) |
@ -169,7 +227,7 @@ IGG4 重症肌无力(MG)患者社区微信小程序。两种用户角色:
## 类型定义(typings/index.d.ts) ## 类型定义(typings/index.d.ts)
- `IAppOption` — App 实例接口,包含 globalData 结构和方法签名 - `IAppOption` — App 实例接口,包含 globalData 结构和方法签名(含 `getTheme()`
- `IAgaxParams` — 扩展的请求选项,含 `showMsg`、`loading`、`isJSON` - `IAgaxParams` — 扩展的请求选项,含 `showMsg`、`loading`、`isJSON`
- `Response<T>` — 通用 API 响应结构 - `Response<T>` — 通用 API 响应结构
- `globalSystemInfo` — 扩展的系统信息,含胶囊按钮位置 - `globalSystemInfo` — 扩展的系统信息,含胶囊按钮位置
@ -187,6 +245,7 @@ IGG4 重症肌无力(MG)患者社区微信小程序。两种用户角色:
- 主包页面 → `pages` 数组 - 主包页面 → `pages` 数组
- 分包页面 → `subpackages` 中对应分包的 `pages` 数组 - 分包页面 → `subpackages` 中对应分包的 `pages` 数组
4. 如页面使用组件,在页面的 `index.json``usingComponents` 中注册 4. 如页面使用组件,在页面的 `index.json``usingComponents` 中注册
5. **患者端页面**:根 `<view>` 需添加 `id="{{theme === 'DRUG' && 'drug-page'}}"` 以支持 DRUG 主题覆盖
### 新增组件 ### 新增组件
@ -197,6 +256,7 @@ IGG4 重症肌无力(MG)患者社区微信小程序。两种用户角色:
## 关键约定 ## 关键约定
- **品牌名称**:项目品牌名"愈见昕生",不再使用"重症肌无力加油站"或"gMG给力加油站"
- **JSX/F2 图表**:Babel 插件 `@babel/plugin-transform-react-jsx`,`jsxImportSource: "@antv/f2"` — 页面中的 `.jsx` 文件使用 F2 图表语法,由 beforeCompile 脚本转译 - **JSX/F2 图表**:Babel 插件 `@babel/plugin-transform-react-jsx`,`jsxImportSource: "@antv/f2"` — 页面中的 `.jsx` 文件使用 F2 图表语法,由 beforeCompile 脚本转译
- **微信全局变量**:`wx`、`App`、`Page`、`Component`、`getCurrentPages`、`getApp` 已在 ESLint globals 中声明 - **微信全局变量**:`wx`、`App`、`Page`、`Component`、`getCurrentPages`、`getApp` 已在 ESLint globals 中声明
- **CSS 单位**:使用 `rpx`(微信响应式像素),布局中不用 `px` - **CSS 单位**:使用 `rpx`(微信响应式像素),布局中不用 `px`
@ -204,9 +264,11 @@ IGG4 重症肌无力(MG)患者社区微信小程序。两种用户角色:
- **`noImplicitAny: false`** — 允许隐式 any - **`noImplicitAny: false`** — 允许隐式 any
- **`removeComments: true`**(tsconfig)— 编译输出移除注释 - **`removeComments: true`**(tsconfig)— 编译输出移除注释
- **Prettier**:无分号、单引号、尾逗号、120 字符宽度;`.wxml` 按 HTML 解析,`.wxss` 按 CSS 解析,`.wxs` 按 babel 解析 - **Prettier**:无分号、单引号、尾逗号、120 字符宽度;`.wxml` 按 HTML 解析,`.wxss` 按 CSS 解析,`.wxs` 按 babel 解析
- **API URL 格式**:所有 API 调用使用 `?r=模块/动作` 格式(如 `?r=igg4/user/init-login`、`?r=igg4/account/info`) - **API URL 格式**:所有 API 调用使用 `?r=模块/动作` 格式(如 `?r=zd/user/init-login`、`?r=zd/account/info`)
- **默认分享**:患者端页面分享到 `/pages/index/index`,医生端页面分享到 `/doctor/pages/d_home/index`,标题:"重症肌无力加油站,重拾生活掌控感!" - **默认分享**:患者端页面分享到 `/pages/index/index`,医生端页面分享到 `/doctor/pages/d_home/index`,标题:"愈见昕生,重拾生活掌控感!"
- **客服电话**:全局 `handleMakePhoneCall` 拨打 `4008102299` - **客服电话**:全局 `handleMakePhoneCall` 拨打 `4008102299`
- **医生端页面禁止调用 `getTheme()`**:`getTheme()` 仅在 `page.ts` 和患者端组件(如 `custom-tab-bar`)中使用
- **患者端页面禁止重复调用 `getTheme()`**:`page.ts` 已全局注入 `theme`,页面中无需再次调用
## 环境 / 部署 ## 环境 / 部署

33
src/components/toast/index.scss

@ -2431,7 +2431,7 @@
} }
.popup-patient-detail-safe-doctor { .popup-patient-detail-safe-doctor {
.badge{ .badge {
position: relative; position: relative;
z-index: 1; z-index: 1;
display: block; display: block;
@ -2446,7 +2446,7 @@
width: 670rpx; width: 670rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 24rpx; border-radius: 24rpx;
background: linear-gradient(180deg, #E5FFF4 0%, #FFFFFF 22.89%, #FFFFFF 100%); background: linear-gradient(180deg, #e5fff4 0%, #ffffff 22.89%, #ffffff 100%);
.content { .content {
font-size: 36rpx; font-size: 36rpx;
color: rgba(34, 34, 34, 1); color: rgba(34, 34, 34, 1);
@ -3568,6 +3568,35 @@
} }
} }
.popup-feedback {
.popup-container {
padding: 332rpx 0;
width: 630rpx;
height: 818rpx;
box-sizing: border-box;
.code {
display: block;
width: 310rpx;
height: 310rpx;
margin: 0 auto;
}
}
}
.popup-follow {
.popup-container {
padding: 316rpx 0;
width: 630rpx;
height: 814rpx;
box-sizing: border-box;
.code {
display: block;
width: 340rpx;
height: 340rpx;
margin: 0 auto;
}
}
}
.close { .close {
margin: 48rpx auto 0; margin: 48rpx auto 0;
display: block; display: block;

36
src/components/toast/index.ts

@ -42,6 +42,12 @@ Component({
if (['storyLead', 'storyStar', 'storyShare'].includes(this.data.type)) { if (['storyLead', 'storyStar', 'storyShare'].includes(this.data.type)) {
this.getSettingInfo() this.getSettingInfo()
} }
if (this.data.type === 'feedback') {
this.getFeedbackCode()
}
if (this.data.type === 'follow') {
this.getFollowCode()
}
} }
this.setData({ this.setData({
userInfo: app.globalData.userInfo, userInfo: app.globalData.userInfo,
@ -61,6 +67,8 @@ Component({
userInfo: {}, userInfo: {},
openPatientList: {}, openPatientList: {},
popup1Check1: false, popup1Check1: false,
feedbackQrCode: '',
followQrCode: '',
}, },
lifetimes: { lifetimes: {
attached() { attached() {
@ -134,6 +142,34 @@ Component({
}) })
}) })
}, },
getFeedbackCode() {
wx.ajax({
method: 'GET',
url: '?r=igg4/common/get-channel-wx-code',
data: {
ChannelType: '11',
Id: '',
},
}).then((res) => {
this.setData({
feedbackQrCode: res,
})
})
},
getFollowCode() {
wx.ajax({
method: 'GET',
url: '?r=igg4/common/get-channel-wx-code',
data: {
ChannelType: '11',
Id: '',
},
}).then((res) => {
this.setData({
followQrCode: res,
})
})
},
handleProtocolChange() { handleProtocolChange() {
this.setData({ this.setData({
protocol: !this.data.protocol, protocol: !this.data.protocol,

21
src/components/toast/index.wxml

@ -660,14 +660,17 @@
</view> </view>
</view> </view>
<view class="popup-dedicated-doctor" wx:if="{{type == 'dedicatedDoctor'}}"> <view class="popup-dedicated-doctor" wx:if="{{type == 'dedicatedDoctor'}}">
<view class="popup-container" style="background: url('{{imageUrl}}bg26.png?t={{Timestamp}}') no-repeat top center/100%"> <view
<div class="content"> class="popup-container"
style="background: url('{{imageUrl}}bg26.png?t={{Timestamp}}') no-repeat top center/100%"
>
<view class="content">
<view> <view>
通过 通过
<text class="high">「专属医生互动」</text> <text class="high">「专属医生互动」</text>
</view> </view>
<view>医生可远程关注您的健康状态啦</view> <view>医生可远程关注您的健康状态啦</view>
</div> </view>
<view class="btn" bind:tap="handleOk">立即体验</view> <view class="btn" bind:tap="handleOk">立即体验</view>
</view> </view>
<image <image
@ -1064,11 +1067,21 @@
</view> </view>
</view> </view>
</view> </view>
<view class="popup-feedback" wx:if="{{type==='feedback'}}">
<view class="popup-container" style="background:url('{{imageUrl}}bg27.png?t={{Timestamp}}') no-repeat top center/100%">
<image class="code" src="{{feedbackQrCode}}" show-menu-by-longpress></image>
</view>
</view>
<view class="popup-follow" wx:if="{{type==='follow'}}">
<view class="popup-container" style="background:url('{{imageUrl}}bg28.png?t={{Timestamp}}') no-repeat top center/100%">
<image class="code" src="{{followQrCode}}" show-menu-by-longpress></image>
</view>
</view>
<image <image
wx:if="{{params.close}}" wx:if="{{params.close}}"
class="close" class="close"
src="{{imageUrl}}icon11.png?t={{Timestamp}}" src="{{imageUrl}}2/close.png?t={{Timestamp}}"
bind:tap="handleCancel" bind:tap="handleCancel"
></image> ></image>
</van-popup> </van-popup>

2
src/doctor/pages/d_interactiveDoctor/index.wxml

@ -77,7 +77,7 @@
</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" wx:if="{{doctor.IsOpenOneToOne!=1 || true}}">
<view class="content" catch:tap="handleInputShow">{{customMessage || '输入文字'}}</view> <view class="content" catch:tap="handleInputShow">{{customMessage || '输入文字'}}</view>
<view class="btn" catch:tap="handleSendShow">快捷回复</view> <view class="btn" catch:tap="handleSendShow">快捷回复</view>
</view> </view>

4
src/doctor/pages/d_my/index.json

@ -1,8 +1,10 @@
{ {
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"navigationBarBackgroundColor": "#F6F8F9",
"usingComponents": { "usingComponents": {
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"tabbar": "../../components/tabbar/index", "tabbar": "../../components/tabbar/index",
"text-expandsion": "/components/text-expandsion/index" "text-expandsion": "/components/text-expandsion/index",
"toast": "/components/toast/index"
} }
} }

2
src/doctor/pages/d_my/index.scss

@ -1,5 +1,5 @@
page { page {
background: #f2f4f5; background: #F6F8F9;
padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
} }
.page { .page {

16
src/doctor/pages/d_my/index.ts

@ -1,9 +1,12 @@
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
Page({ Page({
data: { data: {
doctor: {}, doctor: {},
hospital: {}, hospital: {},
toastShow: false,
toastType: '',
toastParams: {},
}, },
onLoad() { onLoad() {
const SystemInfo = app.globalSystemInfo const SystemInfo = app.globalSystemInfo
@ -66,14 +69,13 @@ Page({
}) })
}, },
handleFollow() { handleFollow() {
wx.navigateTo({ this.setData({ toastShow: true, toastType: 'follow', toastParams: { close: true } })
url: '/pages/thePublic/index',
})
}, },
handleFeedback() { handleFeedback() {
wx.navigateTo({ this.setData({ toastShow: true, toastType: 'feedback', toastParams: { close: true } })
url: '/pages/comIns/index', },
}) handleToastClose() {
this.setData({ toastShow: false, toastType: '' })
}, },
handleLogout() { handleLogout() {
wx.showModal({ wx.showModal({

7
src/doctor/pages/d_my/index.wxml

@ -47,4 +47,11 @@
<view class="logout-btn" bind:tap="handleLogout">退出登录</view> <view class="logout-btn" bind:tap="handleLogout">退出登录</view>
</view> </view>
<toast
show="{{toastShow}}"
type="{{toastType}}"
params="{{toastParams}}"
bind:cancel="handleToastClose"
></toast>
<tabbar active="{{3}}"></tabbar> <tabbar active="{{3}}"></tabbar>

BIN
src/images/1/start.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 KiB

After

Width:  |  Height:  |  Size: 2.3 MiB

BIN
src/images/bg27.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
src/images/bg28.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
src/images/icon74.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/images/icon82.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
src/images/icon83.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

37
src/pages/enterInfo/index.wxml

@ -1,4 +1,4 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> <view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<navBar background="{{background}}" title="" back="{{false}}" home="{{false}}" slotLeft="{{true}}"> <navBar background="{{background}}" title="" back="{{false}}" home="{{false}}" slotLeft="{{true}}">
<van-icon bind:tap="handleBack" class="cross" name="cross" slot="left" /> <van-icon bind:tap="handleBack" class="cross" name="cross" slot="left" />
</navBar> </navBar>
@ -27,17 +27,36 @@
</view> </view>
<view class="row-title">患者年龄</view> <view class="row-title">患者年龄</view>
<view class="row row-age"> <view class="row row-age">
<view class="age-item {{ageRange==5 && 'active'}}" data-id="5" bind:tap="handleSelectAge">18岁以下</view> <view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">{{"<40岁"}}</view>
<view class="age-item {{ageRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectAge">18岁-44岁</view> <view class="age-item {{ageRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectAge">{{"40 - 49 岁"}}</view>
<view class="age-item {{ageRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectAge">45岁-59岁</view> <view class="age-item {{ageRange==2 && 'active'}}" data-id="3" bind:tap="handleSelectAge">{{"50 - 59 岁"}}</view>
<view class="age-item {{ageRange==3 && 'active'}}" data-id="3" bind:tap="handleSelectAge">60岁-74岁</view> <view class="age-item {{ageRange==2 && 'active'}}" data-id="4" bind:tap="handleSelectAge">{{"60 - 69 岁"}}</view>
<view class="age-item {{ageRange==4 && 'active'}}" data-id="4" bind:tap="handleSelectAge">75岁以上</view> <view class="age-item {{ageRange==2 && 'active'}}" data-id="5" bind:tap="handleSelectAge">{{"70 - 79 岁"}}</view>
<view class="age-item {{ageRange==2 && 'active'}}" data-id="6" bind:tap="handleSelectAge">{{"≥80 岁"}}</view>
</view> </view>
<view class="row-title">从首次确诊IgG4相关性疾病,到现在多久了</view> <view class="row-title">从首次确诊IgG4相关性疾病,到现在多久了</view>
<view class="row row-age"> <view class="row row-age">
<view class="age-item {{diagnosisTimeRange==1 && 'active'}}" data-id="1" bind:tap="handleSelectDiagnosisTimeRange">6个月以内</view> <view
<view class="age-item {{diagnosisTimeRange==2 && 'active'}}" data-id="2" bind:tap="handleSelectDiagnosisTimeRange">6个月-3年</view> class="age-item {{diagnosisTimeRange==1 && 'active'}}"
<view class="age-item {{diagnosisTimeRange==3 && 'active'}}" data-id="3" bind:tap="handleSelectDiagnosisTimeRange">3年以上</view> data-id="1"
bind:tap="handleSelectDiagnosisTimeRange"
>
6个月以内
</view>
<view
class="age-item {{diagnosisTimeRange==2 && 'active'}}"
data-id="2"
bind:tap="handleSelectDiagnosisTimeRange"
>
6个月-3年
</view>
<view
class="age-item {{diagnosisTimeRange==3 && 'active'}}"
data-id="3"
bind:tap="handleSelectDiagnosisTimeRange"
>
3年以上
</view>
</view> </view>
<view class="row-title">输入真实姓名,便于医生识别随访</view> <view class="row-title">输入真实姓名,便于医生识别随访</view>
<view class="row"> <view class="row">

2
src/pages/index/index.wxml

@ -1,7 +1,7 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> <view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<view class="page-header"> <view class="page-header">
<pageNavbar drug="{{theme === 'DRUG'}}"></pageNavbar> <pageNavbar drug="{{theme === 'DRUG'}}"></pageNavbar>
<view class="user" wx:if="{{userInfo.UserType!=1}}"> <view class="user">
<view class="content"> <view class="content">
<view class="name"> <view class="name">
<text class="high">{{userInfo.PatientName || 'HI'}},</text> <text class="high">{{userInfo.PatientName || 'HI'}},</text>

4
src/pages/interactivePatient/index.scss

@ -125,7 +125,7 @@ page {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 26rpx 32rpx; padding: 26rpx 32rpx;
background-color: #fff; background-color: #fff;
border-radius: 0 32rpx 32rpx; border-radius: 32rpx 32rpx;
font-size: 36rpx; font-size: 36rpx;
color: rgba(33, 33, 32, 1); color: rgba(33, 33, 32, 1);
white-space: pre-line; white-space: pre-line;
@ -478,7 +478,7 @@ page {
line-height: 64rpx; line-height: 64rpx;
font-size: 32rpx; font-size: 32rpx;
color: #ffffff; color: #ffffff;
background: #b982ff linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); background: #0EB66D linear-gradient(to right, #0EB66D 0%, #00D277 100%);
border-radius: 111rpx 111rpx 111rpx 111rpx; border-radius: 111rpx 111rpx 111rpx 111rpx;
} }
} }

4
src/pages/interactivePatient/index.wxml

@ -100,11 +100,11 @@
</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"> <view class="custom-input" wx:if="{{doctorDetail.isOpenOneToOne != 1 || true}}" catch:tap="handleFooterInput">
{{customMessage || '输入您的问题'}} {{customMessage || '输入您的问题'}}
</view> </view>
<view class="shortcut" catch:tap="handleFooterShortcut"> <view class="shortcut" catch:tap="handleFooterShortcut">
{{doctorDetail.isOpenOneToOne == 1 ? '快捷提问':'请选择您要咨询的问题'}} {{doctorDetail.isOpenOneToOne != 1 || true ? '快捷提问':'请选择您要咨询的问题'}}
</view> </view>
</view> </view>
<block wx:if="{{expend}}"> <block wx:if="{{expend}}">

8
src/pages/liveDetail/index.scss

@ -32,11 +32,13 @@ page {
min-height: calc(100vh - 480rpx); min-height: calc(100vh - 480rpx);
.module { .module {
margin-bottom: 24rpx; margin-bottom: 24rpx;
border-radius: 24rpx;
background: linear-gradient(0deg, #ffffff 0%, #f0fff8 100%);
.module-wrap {
padding: 34rpx 32rpx; padding: 34rpx 32rpx;
border-radius: 24rpx; border-radius: 24rpx;
border: 2rpx solid #ebecee; border: 2rpx solid #ebecee;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05); box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
background-color: #fff;
> view:nth-of-type(2) { > view:nth-of-type(2) {
margin-top: 30rpx; margin-top: 30rpx;
} }
@ -52,6 +54,7 @@ page {
} }
} }
} }
}
.content { .content {
margin-top: 24rpx; margin-top: 24rpx;
.c-title { .c-title {
@ -166,6 +169,9 @@ page {
.c-title::before { .c-title::before {
background-color: rgba(89, 86, 233, 1); background-color: rgba(89, 86, 233, 1);
} }
.module {
background: linear-gradient(0, #ffffff 0%, #fbf8ff 100%);
}
.btn { .btn {
background: linear-gradient(270deg, #5956e9 0%, #b384f4 100%); background: linear-gradient(270deg, #5956e9 0%, #b384f4 100%);
&.signed { &.signed {

11
src/pages/liveDetail/index.wxml

@ -10,14 +10,21 @@
</view> </view>
<view class="page-container"> <view class="page-container">
<view class="module"> <view class="module">
<view
class="module-wrap"
style="background: url('{{imageUrl}}{{theme === 'DRUG' ? 'icon83' : 'icon82'}}.png?t={{Timestamp}}') no-repeat bottom right/174rpx 112rpx;"
>
<view class="info">活动时间 {{detail.BeginTime}}</view> <view class="info">活动时间 {{detail.BeginTime}}</view>
</view> </view>
</view>
<view class="module">
<view <view
class="module" class="module-wrap"
style="background: #fff url('{{imageUrl}}{{theme === 'DRUG' ? 'icon73' : 'icon74'}}.png?t={{Timestamp}}') no-repeat bottom 0 right 24rpx/88rpx 88rpx;" style="background: url('{{imageUrl}}{{theme === 'DRUG' ? 'icon74' : 'icon74'}}.png?t={{Timestamp}}') no-repeat bottom right/174rpx 112rpx;"
> >
<view class="info">主讲人:{{detail.MasterName}} {{detail.MasterTitle}}</view> <view class="info">主讲人:{{detail.MasterName}} {{detail.MasterTitle}}</view>
</view> </view>
</view>
<view class="content" wx:if="{{detail.DetailJson.length}}"> <view class="content" wx:if="{{detail.DetailJson.length}}">
<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>

1
src/pages/my/index.json

@ -3,6 +3,7 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"toast": "/components/toast/index",
"pageNavbar": "/components/pageNavbar/index", "pageNavbar": "/components/pageNavbar/index",
"van-switch": "@vant/weapp/switch/index" "van-switch": "@vant/weapp/switch/index"
} }

5
src/pages/my/index.scss

@ -135,8 +135,8 @@ page {
border-radius: 24rpx; border-radius: 24rpx;
border: 2rpx solid rgba(235, 236, 238, 0.51); border: 2rpx solid rgba(235, 236, 238, 0.51);
.icon { .icon {
width: 64rpx; width: 84rpx;
height: 64rpx; height: 84rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
.name { .name {
@ -191,6 +191,7 @@ page {
} }
} }
#drug-page { #drug-page {
.day { .day {
color: rgba(34, 34, 34, 0.5); color: rgba(34, 34, 34, 0.5);

9
src/pages/my/index.ts

@ -11,6 +11,9 @@ Page({
selfScore: { selfScore: {
expire: {}, expire: {},
}, },
toastShow: false,
toastType: '',
toastParams: {},
adlNewRecord: {} as any, adlNewRecord: {} as any,
}, },
@ -129,4 +132,10 @@ Page({
url: '/pages/webview/index', url: '/pages/webview/index',
}) })
}, },
handleFeedback() {
this.setData({ toastShow: true, toastType: 'feedback', toastParams: { close: true } })
},
handleToastClose() {
this.setData({ toastShow: false, toastType: '' })
},
}) })

17
src/pages/my/index.wxml

@ -1,13 +1,13 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> <view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<pageNavbar drug="{{theme === 'DRUG'}}"></pageNavbar> <pageNavbar drug="{{theme === 'DRUG'}}"></pageNavbar>
<view class="page-container"> <view class="page-container">
<view class="banner" style="margin-top:{{bottom+26}}px"> <view class="banner">
<view class="user"> <view class="user" bind:tap="routerTo" data-url="/pages/personalInformation/index">
<image <image
class="avatar" class="avatar"
mode="aspectFill" mode="aspectFill"
src="{{userInfo.UserImg}}" src="{{userInfo.UserImg}}"
bind:tap="routerTo" catch:tap="routerTo"
data-url="/pages/getUserInfo/index" data-url="/pages/getUserInfo/index"
></image> ></image>
<view class="inner"> <view class="inner">
@ -23,7 +23,7 @@
</view> </view>
</view> </view>
<view class="common-operations"> <view class="common-operations">
<view bind:tap="handleMyHealthRecord" class="item" data-url="/gift/pages/myHealthRecord/index"> <view bind:tap="routerTo" class="item" data-url="/pages/qaForm/index">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon71' : 'icon62'}}.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon71' : 'icon62'}}.png?t={{Timestamp}}"></image>
<view class="name">健康档案</view> <view class="name">健康档案</view>
</view> </view>
@ -73,7 +73,7 @@
</view> </view>
</view> </view>
<view class="options-list"> <view class="options-list">
<view bind:tap="routerTo" class="row" data-url=""> <view bind:tap="handleFeedback" class="row">
<view class="col"> <view class="col">
<image class="icon" src="{{imageUrl}}icon41.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon41.png?t={{Timestamp}}"></image>
问题反馈 问题反馈
@ -85,3 +85,10 @@
</view> </view>
</view> </view>
</view> </view>
<toast
show="{{toastShow}}"
type="{{toastType}}"
params="{{toastParams}}"
bind:cancel="handleToastClose"
></toast>

36
src/pages/personalInformation/index.wxml

@ -41,20 +41,12 @@
<view class="row-title">患者年龄</view> <view class="row-title">患者年龄</view>
<view class="row row-age"> <view class="row row-age">
<view <view
class="age-item {{userInfo.AgeRange == 5 && 'active'}}"
data-key="AgeRange"
data-id="5"
bind:tap="handleRadio"
>
18岁以下
</view>
<view
class="age-item {{userInfo.AgeRange == 1 && 'active'}}" class="age-item {{userInfo.AgeRange == 1 && 'active'}}"
data-key="AgeRange" data-key="AgeRange"
data-id="1" data-id="1"
bind:tap="handleRadio" bind:tap="handleRadio"
> >
18岁-44岁 {{"<40岁"}}
</view> </view>
<view <view
class="age-item {{userInfo.AgeRange == 2 && 'active'}}" class="age-item {{userInfo.AgeRange == 2 && 'active'}}"
@ -62,7 +54,7 @@
data-id="2" data-id="2"
bind:tap="handleRadio" bind:tap="handleRadio"
> >
45岁-59 40 - 49
</view> </view>
<view <view
class="age-item {{userInfo.AgeRange == 3 && 'active'}}" class="age-item {{userInfo.AgeRange == 3 && 'active'}}"
@ -70,7 +62,7 @@
data-id="3" data-id="3"
bind:tap="handleRadio" bind:tap="handleRadio"
> >
60岁-74 50 - 59
</view> </view>
<view <view
class="age-item {{userInfo.AgeRange == 4 && 'active'}}" class="age-item {{userInfo.AgeRange == 4 && 'active'}}"
@ -78,7 +70,23 @@
data-id="4" data-id="4"
bind:tap="handleRadio" bind:tap="handleRadio"
> >
75岁以上 60 - 69 岁
</view>
<view
class="age-item {{userInfo.AgeRange == 5 && 'active'}}"
data-key="AgeRange"
data-id="5"
bind:tap="handleRadio"
>
70 - 79 岁
</view>
<view
class="age-item {{userInfo.AgeRange == 6 && 'active'}}"
data-key="AgeRange"
data-id="6"
bind:tap="handleRadio"
>
≥80 岁
</view> </view>
</view> </view>
<view class="row-title">从首次确诊IgG4相关性疾病,到现在多久了</view> <view class="row-title">从首次确诊IgG4相关性疾病,到现在多久了</view>
@ -128,7 +136,9 @@
</view> </view>
</view> </view>
<view class="bottom-actions"> <view class="bottom-actions">
<view class="action-btn danger" bind:tap="routerTo" data-url="/doctor/pages/d_login/index?back=1">切换医生端</view> <view class="action-btn danger" bind:tap="routerTo" data-url="/doctor/pages/d_login/index?back=1">
切换医生端
</view>
<view wx:if="{{userInfo.IsRootUser==1}}" class="action-btn danger" bind:tap="handleLogout">注销</view> <view wx:if="{{userInfo.IsRootUser==1}}" class="action-btn danger" bind:tap="handleLogout">注销</view>
</view> </view>
</view> </view>

2
src/pages/qaForm/index.json

@ -1,4 +1,4 @@
{ {
"navigationBarTitleText": "", "navigationBarTitleText": "问卷",
"usingComponents": {} "usingComponents": {}
} }

Loading…
Cancel
Save