hh-doctor-sdk 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/consultation/detail/behaviors/consultation-header-media-behaviors.js +23 -4
- package/components/consultation/detail/consultation-detail-page.wxml +9 -2
- package/components/consultation/detail/consultation-detail-page.wxss +21 -0
- package/components/consultation/list/consultation-list-page.wxml +1 -1
- package/components/consultation/list/consultation-list-page.wxss +0 -5
- package/components/hh-doctor.js +1 -1
- package/components/public/behaviors/order-base-behaviors.js +8 -0
- package/components/uikit/css/common.wxss +5 -0
- package/components/uikit/web-view-page/web-view-page.js +3 -3
- package/components/uikit/web-view-page/web-view-page.wxml +3 -3
- package/components/video-chat/agora-rtc/agora-player/agora-player.wxml +4 -2
- package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.wxml +3 -3
- package/components/video-chat/agora-rtc/agora-rtc.wxml +6 -4
- package/components/video-chat/video-chat.wxml +3 -3
- package/components/video-chat/video-chat.wxss +3 -1
- package/components/video-chat-page/behaviors/chat-files-behaviors.js +21 -37
- package/components/video-chat-page/behaviors/video-chat-behaviors.js +0 -1
- package/components/video-chat-page/video-chat-page.js +1 -0
- package/components/video-chat-page/video-chat-page.wxml +1 -1
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ module.exports = Behavior({
|
|
|
30
30
|
/**
|
|
31
31
|
* 构建多媒体文件数据
|
|
32
32
|
* @param {*} index 分组下标
|
|
33
|
-
* @param {*} type 类型 0.图片 1.pdf
|
|
33
|
+
* @param {*} type 类型 0.图片 1.pdf 2.DICOM 4.视频 5.URL DICOM
|
|
34
34
|
* @param {*} label 显示标题
|
|
35
35
|
* @param {*} files 文件列表
|
|
36
36
|
*/
|
|
@@ -76,6 +76,20 @@ module.exports = Behavior({
|
|
|
76
76
|
groupIndex++
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
} else {
|
|
80
|
+
// url 类型组件为链接跳转,每个链接作为一个分组使用单独直接点击跳转
|
|
81
|
+
if (value.contentCaseImageList && value.contentCaseImageList.length > 0) {
|
|
82
|
+
const urlList = value.contentCaseImageList.map((res) => {
|
|
83
|
+
const groupItem = this.mediaItem(groupIndex, 5, res.imagedesc, [{
|
|
84
|
+
type: 'url',
|
|
85
|
+
'url': res.imageurl,
|
|
86
|
+
thumb: 'https://image.hh-medic.com/icon/pacs/hh_consulation_dicom_icon.png'
|
|
87
|
+
}], 'https://image.hh-medic.com/icon/pacs/hh_consulation_dicom_icon.png', '点击查看')
|
|
88
|
+
groupIndex++
|
|
89
|
+
return groupItem
|
|
90
|
+
})
|
|
91
|
+
mediaGroups = mediaGroups.concat(urlList)
|
|
92
|
+
}
|
|
79
93
|
}
|
|
80
94
|
})
|
|
81
95
|
|
|
@@ -104,6 +118,9 @@ module.exports = Behavior({
|
|
|
104
118
|
const {
|
|
105
119
|
index
|
|
106
120
|
} = event.detail
|
|
121
|
+
this.setData({
|
|
122
|
+
showPreview: true,
|
|
123
|
+
})
|
|
107
124
|
const media = this.data.mediaInfo[index]
|
|
108
125
|
if ([0, 4].includes(media.type)) { //图片或视频
|
|
109
126
|
const firstPic = media.files[0].url //统一用构建的数据所以不能使用原始数据判断
|
|
@@ -120,14 +137,16 @@ module.exports = Behavior({
|
|
|
120
137
|
sources: this.data._mediaFiles,
|
|
121
138
|
})
|
|
122
139
|
}
|
|
123
|
-
this.setData({
|
|
124
|
-
showPreview: true,
|
|
125
|
-
})
|
|
126
140
|
} else if (media.type == 1) { // PDF
|
|
127
141
|
const files = media.files
|
|
128
142
|
pdfViewer.viewPdfs(files)
|
|
129
143
|
} else if (media.type == 2) {
|
|
130
144
|
this.viewDicoms()
|
|
145
|
+
} else if (media.type == 5) {
|
|
146
|
+
if (media.files && media.files.length > 0) {
|
|
147
|
+
const url = media.files[0].url
|
|
148
|
+
hhNavigation.webPage(url)
|
|
149
|
+
}
|
|
131
150
|
}
|
|
132
151
|
},
|
|
133
152
|
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
<import src="../detail/widget/chat-cell-template/chat-cell-template" />
|
|
2
|
-
<view class="match-parent">
|
|
2
|
+
<view class="match-parent body-display">
|
|
3
|
+
<view wx:if="{{notifySetVideoTime}}" class="set-time-tip">
|
|
4
|
+
<image
|
|
5
|
+
class="set-time-tip-image"
|
|
6
|
+
src="https://image.hh-medic.com/icon/pacs/hh_warning_icon_fill.png"
|
|
7
|
+
/>
|
|
8
|
+
本咨询为视频咨询,请设置你方便的视频时间</view
|
|
9
|
+
>
|
|
3
10
|
<scroll-view class="scroll-view" scroll-y scroll-into-view="{{scrollTo}}">
|
|
4
11
|
<view class="consultation-header" wx:if="{{order}}">
|
|
5
12
|
<block wx:for="{{headerTexts}}" wx:key="text">
|
|
6
13
|
<detail-text
|
|
7
14
|
label="{{item.label}}"
|
|
8
15
|
content="{{item.content || ''}}"
|
|
9
|
-
|
|
16
|
+
/>
|
|
10
17
|
</block>
|
|
11
18
|
<scroll-view
|
|
12
19
|
wx:if="{{mediaInfo.length > 0}}"
|
|
@@ -6,6 +6,11 @@ page {
|
|
|
6
6
|
height: 100%;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
.body-display {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
.message-bottom {
|
|
10
15
|
width: 100%;
|
|
11
16
|
height: 80rpx;
|
|
@@ -49,3 +54,19 @@ page {
|
|
|
49
54
|
display: flex;
|
|
50
55
|
flex-direction: column;
|
|
51
56
|
}
|
|
57
|
+
|
|
58
|
+
.set-time-tip {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: row;
|
|
61
|
+
background-color: #fffae6;
|
|
62
|
+
padding: 20rpx 30rpx;
|
|
63
|
+
color: #f01414;
|
|
64
|
+
align-items: center;
|
|
65
|
+
font-size: 30rpx;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.set-time-tip-image {
|
|
69
|
+
width: 30rpx;
|
|
70
|
+
height: 30rpx;
|
|
71
|
+
margin-right: 10rpx;
|
|
72
|
+
}
|
package/components/hh-doctor.js
CHANGED
|
@@ -9,6 +9,7 @@ module.exports = Behavior({
|
|
|
9
9
|
orderId: null, // 订单Id
|
|
10
10
|
order: null, // 订单
|
|
11
11
|
feedbackStar: null,
|
|
12
|
+
notifySetVideoTime: false,
|
|
12
13
|
},
|
|
13
14
|
|
|
14
15
|
methods: {
|
|
@@ -29,9 +30,16 @@ module.exports = Behavior({
|
|
|
29
30
|
wx.hideLoading()
|
|
30
31
|
const order = res.data.order
|
|
31
32
|
const feedbackStar = res.data.feedbackStar
|
|
33
|
+
let notifySetVideoTime = false
|
|
34
|
+
if (order && order.orderService && order.orderService.provideType === 'video') {
|
|
35
|
+
if ((order.provideTime || 0) < 1000) {
|
|
36
|
+
notifySetVideoTime = true
|
|
37
|
+
}
|
|
38
|
+
}
|
|
32
39
|
this.setData({
|
|
33
40
|
order: order,
|
|
34
41
|
feedbackStar: feedbackStar,
|
|
42
|
+
notifySetVideoTime: notifySetVideoTime,
|
|
35
43
|
}, () => {
|
|
36
44
|
if (callback) {
|
|
37
45
|
callback()
|
|
@@ -11,9 +11,14 @@
|
|
|
11
11
|
position: absolute;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
.position-relative {
|
|
15
|
+
position: relative;
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
.scroll-view {
|
|
15
19
|
width: 100%;
|
|
16
20
|
height: 100%;
|
|
21
|
+
overflow: scroll;
|
|
17
22
|
margin-bottom: constant(safe-area-inset-bottom); /* 兼容 IOS<11.2 */
|
|
18
23
|
margin-bottom: env(safe-area-inset-bottom); /* 兼容 IOS>11.2 */
|
|
19
24
|
}
|
|
@@ -71,16 +71,16 @@ Page({
|
|
|
71
71
|
|
|
72
72
|
},
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
bindMessage(data) {
|
|
75
75
|
|
|
76
76
|
},
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
bindLoad(data) {
|
|
79
79
|
const url = data.detail.src
|
|
80
80
|
wx.hideLoading()
|
|
81
81
|
},
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
bindError(data) {
|
|
84
84
|
wx.hideLoading()
|
|
85
85
|
wx.navigateBack()
|
|
86
86
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
<view
|
|
1
|
+
<view
|
|
2
|
+
class="{{showSmall ? 'remote_small position-relative' : 'match-parent position-absolute'}}"
|
|
3
|
+
>
|
|
2
4
|
<live-player
|
|
3
5
|
wx:if="{{uid}}"
|
|
4
|
-
class="
|
|
6
|
+
class="match-parent"
|
|
5
7
|
id="player-{{uid}}"
|
|
6
8
|
uid="{{uid}}"
|
|
7
9
|
debug="{{false}}"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<view
|
|
2
2
|
style="margin-top: {{chatting ? smallVideoTop : 0}}px;"
|
|
3
|
-
class="{{chatting ? 'local-view' : 'match-parent black-background position-absolute'}}"
|
|
3
|
+
class="{{chatting ? 'local-view position-relative' : 'match-parent black-background position-absolute'}}"
|
|
4
4
|
>
|
|
5
5
|
<live-pusher
|
|
6
6
|
wx:if="{{url}}"
|
|
7
|
-
class="match-parent
|
|
7
|
+
class="match-parent"
|
|
8
8
|
url="{{url}}"
|
|
9
9
|
debug="{{false}}"
|
|
10
10
|
mode="RTC"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
enable-camera="{{true}}"
|
|
17
17
|
bindstatechange="recorderStateChange"
|
|
18
18
|
/>
|
|
19
|
-
<view wx:if="{{isInVoice}}" class="cover-view small">
|
|
19
|
+
<view wx:if="{{isInVoice}}" class="cover-view position-absolute small">
|
|
20
20
|
<image class="pusher-cover-image" src="{{expertAvatar}}" />
|
|
21
21
|
</view>
|
|
22
22
|
</view>
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
bindnetstatus="onPlayerNetstatus"
|
|
9
9
|
bindstatechange="onPlayerStatechange"
|
|
10
10
|
/>
|
|
11
|
-
<view
|
|
11
|
+
<view
|
|
12
|
+
class="{{mainRemotePlayer ? 'small-item-container position-absolute' :'fullscreen'}}"
|
|
13
|
+
>
|
|
12
14
|
<agora-pusher
|
|
13
15
|
wx:if="{{pusher}}"
|
|
14
16
|
id="rtc-pusher"
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
chatting="{{mainRemotePlayer != null}}"
|
|
21
23
|
isInVoice="{{isInVoice}}"
|
|
22
24
|
/>
|
|
23
|
-
<
|
|
25
|
+
<block
|
|
24
26
|
wx:if="{{remotePlayerList}}"
|
|
25
27
|
wx:for="{{remotePlayerList}}"
|
|
26
28
|
wx:key="uid"
|
|
@@ -28,12 +30,12 @@
|
|
|
28
30
|
<agora-player
|
|
29
31
|
wx:if="{{item}}"
|
|
30
32
|
id="rtc-player-{{item.uid}}"
|
|
31
|
-
showSmall="{{
|
|
33
|
+
showSmall="{{true}}"
|
|
32
34
|
uid="{{item.uid}}"
|
|
33
35
|
url="{{item.url}}"
|
|
34
36
|
isInVoice="{{isInVoice}}"
|
|
35
37
|
bindnetstatus="onPlayerNetstatus"
|
|
36
38
|
bindstatechange="onPlayerStatechange"
|
|
37
39
|
/>
|
|
38
|
-
</
|
|
40
|
+
</block>
|
|
39
41
|
</view>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
>
|
|
15
15
|
<view
|
|
16
16
|
style="margin-top: {{mainRemotePlayer ? smallVideoTop : 0}}px;"
|
|
17
|
-
class="{{mainRemotePlayer ? 'local-view' : 'match-parent position-absolute'}}"
|
|
17
|
+
class="{{mainRemotePlayer ? 'local-view position-relative' : 'match-parent position-absolute'}}"
|
|
18
18
|
>
|
|
19
19
|
<live-pusher
|
|
20
20
|
class="match-parent"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<image class="pusher-cover-image" src="{{expertAvatar}}" />
|
|
38
38
|
</view>
|
|
39
39
|
</view>
|
|
40
|
-
<
|
|
40
|
+
<block
|
|
41
41
|
wx:if="{{remotePlayerList}}"
|
|
42
42
|
wx:for="{{remotePlayerList}}"
|
|
43
43
|
wx:key="userID"
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
bind:playerNetStatus="_playerNetStatus"
|
|
53
53
|
bind:playerAudioVolumeNotify="_playerAudioVolumeNotify"
|
|
54
54
|
/>
|
|
55
|
-
</
|
|
55
|
+
</block>
|
|
56
56
|
</view>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
@import "../uikit/css/common.wxss";
|
|
2
2
|
|
|
3
3
|
.small-item-container {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
4
6
|
position: absolute;
|
|
5
7
|
right: 10rpx;
|
|
6
8
|
top: 10rpx;
|
|
@@ -8,7 +10,6 @@
|
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
.local-view {
|
|
11
|
-
position: absolute;
|
|
12
13
|
width: 100%;
|
|
13
14
|
height: 300rpx;
|
|
14
15
|
}
|
|
@@ -78,6 +79,7 @@
|
|
|
78
79
|
width: 100%;
|
|
79
80
|
height: 300rpx;
|
|
80
81
|
margin-top: 20rpx;
|
|
82
|
+
position: absolute;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
.voice-mode-avatar {
|
|
@@ -2,7 +2,6 @@ const dicomApi = require('../../apis/dicom-api')
|
|
|
2
2
|
const pdfViewer = require('../../public/pdf-viewer')
|
|
3
3
|
const hhNavigation = require('../../hh-navigation')
|
|
4
4
|
const orderApi = require('../../apis/order-app-api')
|
|
5
|
-
const caseImageFilter = require('../../consultation/detail/widget/case-image-filter')
|
|
6
5
|
|
|
7
6
|
module.exports = Behavior({
|
|
8
7
|
data: {
|
|
@@ -25,7 +24,21 @@ module.exports = Behavior({
|
|
|
25
24
|
const type = component.type
|
|
26
25
|
const fileList = component.contentCaseImageList
|
|
27
26
|
if (type === 'url') {
|
|
28
|
-
|
|
27
|
+
// url 类型组件为链接跳转,每个链接作为一个分组使用单独直接点击跳转
|
|
28
|
+
if (fileList && fileList.length > 0) {
|
|
29
|
+
const urlFileList = fileList.map((res) => {
|
|
30
|
+
const item = {
|
|
31
|
+
type: 'url',
|
|
32
|
+
'url': res.imageurl,
|
|
33
|
+
thumb: 'https://image.hh-medic.com/icon/pacs/hh_consulation_dicom_icon.png'
|
|
34
|
+
}
|
|
35
|
+
return item
|
|
36
|
+
})
|
|
37
|
+
groups.push({
|
|
38
|
+
title: component.name,
|
|
39
|
+
files: urlFileList
|
|
40
|
+
})
|
|
41
|
+
}
|
|
29
42
|
} else {
|
|
30
43
|
let images = fileList.filter((file) => !file.imageurl.includes('.pdf'))
|
|
31
44
|
let pdfs = fileList.filter((file) => file.imageurl.includes('.pdf')) //imagedesc
|
|
@@ -115,6 +128,11 @@ module.exports = Behavior({
|
|
|
115
128
|
}],
|
|
116
129
|
mediaFiles: mediaFiles
|
|
117
130
|
})
|
|
131
|
+
} else {
|
|
132
|
+
resolve({
|
|
133
|
+
caseGroups: [],
|
|
134
|
+
mediaFiles: []
|
|
135
|
+
})
|
|
118
136
|
}
|
|
119
137
|
}).catch((err) => {
|
|
120
138
|
resolve({
|
|
@@ -129,6 +147,7 @@ module.exports = Behavior({
|
|
|
129
147
|
})
|
|
130
148
|
|
|
131
149
|
Promise.all(promises).then((res) => {
|
|
150
|
+
wx.hideLoading()
|
|
132
151
|
let caseGroups = []
|
|
133
152
|
let mediaFiles = []
|
|
134
153
|
for (const result of res) {
|
|
@@ -168,40 +187,8 @@ module.exports = Behavior({
|
|
|
168
187
|
}
|
|
169
188
|
const files = this.data.pdfFiles
|
|
170
189
|
pdfViewer.viewPdfs(files)
|
|
171
|
-
// if (files.length == 1) {
|
|
172
|
-
// this.viewPdf(files[0].url)
|
|
173
|
-
// } else {
|
|
174
|
-
// const items = files.map((file) => {
|
|
175
|
-
// return file.name
|
|
176
|
-
// })
|
|
177
|
-
// wx.showActionSheet({
|
|
178
|
-
// itemList: items,
|
|
179
|
-
// success: (res) => {
|
|
180
|
-
// const url = files[res.tapIndex].url
|
|
181
|
-
// this.viewPdf(url)
|
|
182
|
-
// },
|
|
183
|
-
// fail: function (ers) {
|
|
184
|
-
|
|
185
|
-
// }
|
|
186
|
-
// })
|
|
187
|
-
// }
|
|
188
190
|
},
|
|
189
191
|
|
|
190
|
-
// viewPdf(url) {
|
|
191
|
-
// wx.downloadFile({
|
|
192
|
-
// url: url,
|
|
193
|
-
// success: function (res) {
|
|
194
|
-
// const filePath = res.tempFilePath
|
|
195
|
-
// wx.openDocument({
|
|
196
|
-
// filePath: filePath,
|
|
197
|
-
// success: function () {
|
|
198
|
-
|
|
199
|
-
// }
|
|
200
|
-
// })
|
|
201
|
-
// }
|
|
202
|
-
// })
|
|
203
|
-
// },
|
|
204
|
-
|
|
205
192
|
viewDicoms() {
|
|
206
193
|
if (this.data.dicoms.length == 0) {
|
|
207
194
|
wx.showToast({
|
|
@@ -235,9 +222,6 @@ module.exports = Behavior({
|
|
|
235
222
|
viewDicom(id) {
|
|
236
223
|
const url = dicomApi.dicomUrl(id)
|
|
237
224
|
hhNavigation.webPage(url)
|
|
238
|
-
// wx.navigateTo({
|
|
239
|
-
// url: `/components/uikit/web-view-page/web-view-page?url=${encodeURIComponent(url)}`,
|
|
240
|
-
// })
|
|
241
225
|
},
|
|
242
226
|
}
|
|
243
227
|
})
|
|
@@ -135,6 +135,7 @@ Page({
|
|
|
135
135
|
event: imManager.EventNames.IMCustomMessage,
|
|
136
136
|
'listener': (params) => {
|
|
137
137
|
wx.statLog.sendStatLog(this.data.orderId, `收到IM消息(${JSON.stringify(params)})`)
|
|
138
|
+
console.error(`收到IM消息(${JSON.stringify(params)})`)
|
|
138
139
|
if (params) {
|
|
139
140
|
this.onMessage(params.command)
|
|
140
141
|
}
|