Browse Source

1v1沟通联调

master
kola-web 2 months ago
parent
commit
ce7c43e516
  1. 5
      README.md
  2. 7
      project.private.config.json
  3. 16
      src/app.ts
  4. 4
      src/components/popup/index.wxml
  5. 8
      src/pages/d_interactive/index.ts
  6. 2
      src/pages/d_interactive/index.wxml
  7. 3
      src/pages/d_interactiveDoctor/index.json
  8. 2
      src/pages/d_interactiveDoctor/index.scss
  9. 64
      src/pages/d_interactiveDoctor/index.ts
  10. 26
      src/pages/d_interactiveDoctor/index.wxml
  11. 6
      src/pages/home/index.ts
  12. 8
      src/patient/pages/doctor/index.ts
  13. 6
      src/patient/pages/doctor/index.wxml
  14. 35
      src/patient/pages/enterInfo/index.ts
  15. 2
      src/patient/pages/hospital/index.wxml
  16. 4
      src/patient/pages/index/index.wxml
  17. 20
      src/patient/pages/interactivePatient/index.scss
  18. 76
      src/patient/pages/interactivePatient/index.ts
  19. 28
      src/patient/pages/interactivePatient/index.wxml
  20. 3
      src/patient/pages/live/index.wxml
  21. 4
      src/patient/pages/liveDetail/index.wxml
  22. 5
      src/patient/pages/liveResult/index.ts
  23. 12
      src/patient/pages/liveResult/index.wxml
  24. 2
      src/patient/pages/myLive/index.wxml

5
README.md

@ -10,9 +10,14 @@ 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. 首页绑定医生弹窗需要重新切图

7
project.private.config.json

@ -23,13 +23,6 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "11",
"pathName": "patient/pages/certReslove/index",
"query": "",
"scene": null,
"launchMode": "default"
},
{
"name": "药房", "name": "药房",
"pathName": "gift/pages/dtpDurg/index", "pathName": "gift/pages/dtpDurg/index",
"query": "id=10", "query": "id=10",

16
src/app.ts

@ -534,4 +534,20 @@ 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 })
})
},
}) })

4
src/components/popup/index.wxml

@ -73,13 +73,13 @@
<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'}}"> <view class="popup9" wx:if="{{type==='popup9'}}">
<image class="icon" src="/images/icon100.png"></image> <image class="icon" src="{{imageUrl}}icon100.png?t={{Timestamp}}"></image>
<view class="title"> <view class="title">
文字包含不合规内容 文字包含不合规内容
<view></view> <view></view>
请修改后重新提交 请修改后重新提交
</view> </view>
<view class="btn">知道了</view> <view class="btn" bind:tap="handleOk">知道了</view>
</view> </view>
<image <image

8
src/pages/d_interactive/index.ts

@ -15,6 +15,7 @@ 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()
}) })
}, },
@ -40,13 +41,6 @@ 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',

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.msgReadStatus==='2'}}">1</view> <view class="dot" wx:if="{{item.unReadCount>0}}">{{item.unReadCount> 99 ? '99+' : item.unReadCount}}</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,6 +4,7 @@
"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"
} }
} }

2
src/pages/d_interactiveDoctor/index.scss

@ -548,11 +548,13 @@ page {
height: 300rpx; height: 300rpx;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 80rpx; padding-bottom: 80rpx;
background-color: transparent;
.ka-container { .ka-container {
padding: 30rpx 62rpx; padding: 30rpx 62rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background-color: transparent;
.stat { .stat {
font-size: 28rpx; font-size: 28rpx;
color: #adacb2; color: #adacb2;

64
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' // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息 msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息
msgContent: any msgContent: any
msgVisitTime: string msgVisitTime: string
msgVisitTimeType?: string msgVisitTimeType?: string
@ -13,6 +13,7 @@ interface IMessageItem {
msgCreateTime: string // 消息创建时间 msgCreateTime: string // 消息创建时间
msgCreateTimeName?: string // 消息创建时间 msgCreateTimeName?: string // 消息创建时间
showTime?: boolean showTime?: boolean
msgCustomSendStatus?: number | string
} }
interface Item { interface Item {
@ -22,6 +23,10 @@ interface Item {
Page({ Page({
data: { data: {
popupShow: false,
popupType: 'popup9',
popupParams: {} as any,
doctor: {} as any, doctor: {} as any,
patientId: '', patientId: '',
@ -44,6 +49,8 @@ Page({
week: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], week: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
timeDay: { 1: '上午', 2: '下午' }, timeDay: { 1: '上午', 2: '下午' },
customMessage: '',
}, },
innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null, innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null,
@ -471,6 +478,61 @@ Page({
}) })
} }
}, },
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,
},
}).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()
}, },

26
src/pages/d_interactiveDoctor/index.wxml

@ -45,7 +45,9 @@
<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">
<view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view> <block wx:if="{{message.msgContentType==='1' || message.msgContentType==='11'}}">
<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>
@ -81,7 +83,11 @@
</view> </view>
</view> </view>
</view> </view>
<view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view> <block
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">
@ -169,6 +175,7 @@
<view class="wrap" catch:tap="catchFooterInput"> <view class="wrap" catch:tap="catchFooterInput">
<textarea <textarea
class="textarea" class="textarea"
model:value="{{customMessage}}"
focus="{{focus}}" focus="{{focus}}"
hold-keyboard hold-keyboard
disable-default-padding disable-default-padding
@ -177,11 +184,12 @@
maxlength="{{500}}" maxlength="{{500}}"
placeholder="输入您的问题" placeholder="输入您的问题"
bind:blur="bindblur" bind:blur="bindblur"
bindconfirm="handleConfirm"
> >
<keyboard-accessory class="ka" style="height: 50px;"> <keyboard-accessory class="ka" hold-keyboard="{{true}}" style="background-color: #fff;">
<cover-view class="ka-container"> <cover-view class="ka-container">
<cover-view class="stat">0/500</cover-view> <cover-view class="stat">{{customMessage.length}}/500</cover-view>
<cover-view class="send-btn">发送</cover-view> <cover-view class="send-btn" bind:tap="handleConfirm">发送</cover-view>
</cover-view> </cover-view>
</keyboard-accessory> </keyboard-accessory>
</textarea> </textarea>
@ -213,3 +221,11 @@
<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>

6
src/pages/home/index.ts

@ -40,12 +40,9 @@ Page({
}, },
}, },
onShow() { onShow() {
wx.setTabBarBadge({
index: 2,
text: '99',
})
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()
@ -63,6 +60,7 @@ Page({
}) })
}) })
}, },
getNoticeNum() {},
getTab() { getTab() {
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',

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

@ -1,4 +1,4 @@
import { parseUrlArgsToArray } from '@/utils/util' import licia from 'miniprogram-licia'
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
@ -66,8 +66,8 @@ Page({
const atvs = { length: 0 } const atvs = { length: 0 }
res[0].subList res[0].subList
.filter(item => item.showStatus == 1) .filter(item => item.showStatus == 1)
.forEach((item) => { .forEach((item: any) => {
atvs[parseUrlArgsToArray(item.linkUrl).active || '0'] = true atvs[licia.getUrlParam('active', item.linkUrl) || 0] = true
}) })
atvs.length = Object.keys(atvs).length atvs.length = Object.keys(atvs).length
this.setData({ this.setData({
@ -186,7 +186,7 @@ Page({
this.getList() this.getList()
}, },
onChange(e: WechatMiniprogram.CustomEvent) { onChange(e: WechatMiniprogram.CustomEvent) {
const index = e.detail.index const index = e.detail.name
this.setData({ this.setData({
tabActive: index, tabActive: index,
}) })

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

@ -44,9 +44,9 @@
tab-active-class="tab-active-class" tab-active-class="tab-active-class"
bind:change="onChange" bind:change="onChange"
> >
<van-tab wx:if="{{atvs[0]}}" title="查询医院"></van-tab> <van-tab name="{{0}}" wx:if="{{atvs[0]}}" title="查询医院"></van-tab>
<van-tab wx:if="{{atvs[1]}}" title="查询药房"></van-tab> <van-tab name="{{1}}" wx:if="{{atvs[1]}}" title="查询药房"></van-tab>
<van-tab wx:if="{{atvs[2]}}" title="输注中心"></van-tab> <van-tab name="{{2}}" wx:if="{{atvs[2]}}" title="输注中心"></van-tab>
</van-tabs> </van-tabs>
</view> </view>
</view> </view>

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

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

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

@ -52,7 +52,7 @@
<view class="content"> <view class="content">
<view class="name"> <view class="name">
{{item.Name}} {{item.Name}}
<image class="icon" src="/images/icon101.png"></image> <image class="icon" src="{{imageUrl}}icon101.png?t={{Timestamp}}"></image>
</view> </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]}">

4
src/patient/pages/index/index.wxml

@ -133,7 +133,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>
@ -212,7 +212,7 @@
<image <image
class="one-card" class="one-card"
wx:if="{{card.subList.length==1}}" wx:if="{{card.subList.length==1}}"
src="/images/bg26.png" src="{{card.subList[0].img}}"
bind:tap="routerTo" bind:tap="routerTo"
data-url="{{card.subList[0].linkUrl}}" data-url="{{card.subList[0].linkUrl}}"
data-code="{{card.subList[0].code}}" data-code="{{card.subList[0].code}}"

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

@ -34,11 +34,7 @@ page {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 28rpx; font-size: 28rpx;
color: rgba(173, 172, 178, 1); color: rgba(173, 172, 178, 1);
display: flex;
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;
@ -69,6 +65,7 @@ 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 {
@ -76,6 +73,19 @@ 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;
@ -648,11 +658,13 @@ page {
height: 300rpx; height: 300rpx;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 80rpx; padding-bottom: 80rpx;
background-color: transparent;
.ka-container { .ka-container {
padding: 30rpx 62rpx; padding: 30rpx 62rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background: transparent;
.stat { .stat {
font-size: 28rpx; font-size: 28rpx;
color: #adacb2; color: #adacb2;

76
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' // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息 msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' // 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,6 +16,8 @@ interface IMessageItem {
msgCreateTimeName?: string // 消息创建时间 msgCreateTimeName?: string // 消息创建时间
showTime?: boolean showTime?: boolean
ReVisitInfo?: any ReVisitInfo?: any
msgCustomSendStatus?: number | string
msgTipsInfo?: string
} }
interface Item { interface Item {
@ -25,7 +27,7 @@ interface Item {
Page({ Page({
data: { data: {
popupShow: true, popupShow: false,
popupType: 'popup9', popupType: 'popup9',
popupParams: {} as any, popupParams: {} as any,
@ -54,6 +56,8 @@ 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) {
@ -338,6 +342,74 @@ Page({
focus: false, 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,
},
}).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',

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

@ -34,6 +34,7 @@
<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'}}">
@ -53,7 +54,11 @@
</view> </view>
</view> </view>
</view> </view>
<view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view> <block
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">
@ -113,9 +118,15 @@
</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'}}"> <block wx:if="{{message.msgContentType==='1' || message.msgContentType==='11'}}">
<view class="message"> <view class="message">
<image class="error" src="/images/icon99.png"></image> <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 class="content">{{message.msgContent}}</view>
</view> </view>
</block> </block>
@ -145,7 +156,7 @@
<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">医生回复您之前,24小时内最多只能发1条文字消息</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>
@ -212,6 +223,7 @@
<view class="wrap" catch:tap="catchFooterInput"> <view class="wrap" catch:tap="catchFooterInput">
<textarea <textarea
class="textarea" class="textarea"
model:value="{{customMessage}}"
focus="{{focus}}" focus="{{focus}}"
hold-keyboard hold-keyboard
disable-default-padding disable-default-padding
@ -220,11 +232,13 @@
maxlength="{{500}}" maxlength="{{500}}"
placeholder="输入您的问题" placeholder="输入您的问题"
bind:blur="bindblur" bind:blur="bindblur"
bindinput="handleInput"
bindconfirm="handleConfirm"
> >
<keyboard-accessory class="ka" style="height: 50px;"> <keyboard-accessory class="ka" hold-keyboard="{{true}}" style="background-color: #fff;">
<cover-view class="ka-container"> <cover-view class="ka-container">
<cover-view class="stat">0/500</cover-view> <cover-view class="stat">{{customMessage.length}}/500</cover-view>
<cover-view class="send-btn">发送</cover-view> <cover-view class="send-btn" bind:tap="handleConfirm">发送</cover-view>
</cover-view> </cover-view>
</keyboard-accessory> </keyboard-accessory>
</textarea> </textarea>

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,6 +84,7 @@
已满额 已满额
</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>

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

@ -124,7 +124,7 @@
<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-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 +151,7 @@
已满额 已满额
</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: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>

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

@ -13,6 +13,8 @@ Page({
dateValue: '' as string | number, dateValue: '' as string | number,
rewardScore: 0 as number | undefined, rewardScore: 0 as number | undefined,
qrCode: '', qrCode: '',
entry: '0',
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
@ -50,6 +52,9 @@ Page({
this.setData({ this.setData({
detail: res, detail: res,
}) })
if (this.data.entry == '1') {
this.handleLive()
}
this.getQrCode() this.getQrCode()
}) })
}, },

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

@ -17,21 +17,11 @@
<view class="go-live" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1 && detail.Type==1}}" bind:tap="handleLive"> <view class="go-live" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1 && detail.Type==1}}" bind:tap="handleLive">
立即进入直播间 立即进入直播间
</view> </view>
<button wx:else open-type="share" class="btn btn2">分享活动</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="{{qrCode}}" 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}}">

Loading…
Cancel
Save