hh-doctor-sdk 0.2.1 → 0.2.3
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-behaviors.js +1 -1
- package/components/consultation/detail/behaviors/consultation-chat-behaviors.js +6 -2
- package/components/consultation/detail/behaviors/consultation-header-media-behaviors.js +2 -1
- package/components/consultation/detail/consultation-detail-page.js +5 -2
- package/components/consultation/detail/consultation-detail-page.wxml +8 -7
- package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.js +20 -1
- package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.wxml +5 -1
- package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.wxss +2 -2
- package/components/consultation/detail/widget/chat-cell-template/chat-cell-template.wxml +2 -5
- package/components/consultation/detail/widget/chat-cell.wxss +21 -25
- package/components/consultation/list/behaviors/consultation-list-base-behaviors.js +8 -5
- package/components/consultation/list/consultation-list-page.js +11 -7
- package/components/consultation/list/consultation-list-page.wxml +8 -1
- package/components/consultation/list/consultation-list-page.wxss +16 -0
- package/components/public/doctor-loader.js +3 -1
- package/components/utils/common-utils.js +3 -0
- package/package.json +1 -1
|
@@ -179,7 +179,7 @@ module.exports = Behavior({
|
|
|
179
179
|
message.type = MessageTypes.image
|
|
180
180
|
message.images = caseImageList
|
|
181
181
|
message.isVideo = isVideo
|
|
182
|
-
message.cover = caseImageList[0].smallImage
|
|
182
|
+
message.cover = isVideo ? caseImageList[0].imageurl + '?x-oss-process=video/snapshot,t_0,f_jpg' : caseImageList[0].smallImage
|
|
183
183
|
message.number = `共${caseImageList.length}${isVideo ? '个' : '张'}`
|
|
184
184
|
message.template = MessageTemplates.image
|
|
185
185
|
|
|
@@ -231,7 +231,11 @@ module.exports = Behavior({
|
|
|
231
231
|
if (data.commentsExtends && data.commentsExtends.length > 0) {
|
|
232
232
|
const fileData = JSON.parse(data.commentsExtends)
|
|
233
233
|
if (fileData) {
|
|
234
|
-
|
|
234
|
+
let fileSize = ''
|
|
235
|
+
if (fileData.size) {
|
|
236
|
+
fileSize = `${(fileData.size / 1000).toFixed(2)}M`
|
|
237
|
+
}
|
|
238
|
+
|
|
235
239
|
message.file = {
|
|
236
240
|
name: fileData.name,
|
|
237
241
|
size: fileSize
|
|
@@ -64,8 +64,9 @@ module.exports = Behavior({
|
|
|
64
64
|
const isVideo = imageList[0].type == 'video'
|
|
65
65
|
const unit = isVideo ? '个' : '张'
|
|
66
66
|
const fileType = isVideo ? 4 : 0
|
|
67
|
+
let thumb = isVideo ? imageList[0].url + '?x-oss-process=video/snapshot,t_0,f_jpg' : imageList[0].thumb
|
|
67
68
|
const showNumber = !['HISINFO', 'METER'].includes(type.toUpperCase()) ? `共${imageCount}${unit}` : '点击查看'
|
|
68
|
-
mediaGroups.push(this.mediaItem(groupIndex, fileType, name, imageList,
|
|
69
|
+
mediaGroups.push(this.mediaItem(groupIndex, fileType, name, imageList, thumb, showNumber))
|
|
69
70
|
const allImages = this.data._mediaFiles.concat(imageList)
|
|
70
71
|
this.data._mediaFiles = allImages
|
|
71
72
|
groupIndex++
|
|
@@ -3,6 +3,7 @@ var currentPlayUrl
|
|
|
3
3
|
var currentPlayIndex = -1
|
|
4
4
|
var audioAnimationInterval
|
|
5
5
|
|
|
6
|
+
const hhDoctor = require('../../hh-doctor')
|
|
6
7
|
const hhNavigation = require('../../hh-navigation')
|
|
7
8
|
const doctorLoader = require('../../public/doctor-loader')
|
|
8
9
|
|
|
@@ -19,12 +20,13 @@ Page({
|
|
|
19
20
|
* 生命周期函数--监听页面加载
|
|
20
21
|
*/
|
|
21
22
|
onLoad(options) {
|
|
23
|
+
hhDoctor.initSDK()
|
|
22
24
|
wx.statLog.sendStatLog(options.orderId, '打开咨询单详情界面')
|
|
23
25
|
const doctorId = options.doctorId
|
|
24
26
|
doctorLoader.loadDoctor({
|
|
25
27
|
doctorId: doctorId,
|
|
26
28
|
scence: '咨询单详情',
|
|
27
|
-
isTest: options.isTest ||
|
|
29
|
+
isTest: options.isTest || false
|
|
28
30
|
}, (res) => {
|
|
29
31
|
if (res) {
|
|
30
32
|
this.datePickerTime()
|
|
@@ -62,7 +64,8 @@ Page({
|
|
|
62
64
|
showPreview: false,
|
|
63
65
|
})
|
|
64
66
|
} else {
|
|
65
|
-
this._refreshOrder()
|
|
67
|
+
// this._refreshOrder()
|
|
68
|
+
wx.startPullDownRefresh()
|
|
66
69
|
}
|
|
67
70
|
},
|
|
68
71
|
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
<import src="../detail/widget/chat-cell-template/chat-cell-template" />
|
|
2
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
|
-
>
|
|
10
3
|
<view
|
|
11
4
|
id="scroll-body"
|
|
12
5
|
class="body-display"
|
|
@@ -60,6 +53,7 @@
|
|
|
60
53
|
name="{{item.name}}"
|
|
61
54
|
createtime="{{item.createtime}}"
|
|
62
55
|
isSend="{{item.isSend}}"
|
|
56
|
+
type="{{item.type}}"
|
|
63
57
|
bind:clickCell="clickMessageCell"
|
|
64
58
|
>
|
|
65
59
|
<template is="{{item.template}}" data="{{...item}}" />
|
|
@@ -69,6 +63,13 @@
|
|
|
69
63
|
</view>
|
|
70
64
|
<view id="message-bottom" class="message-bottom"></view>
|
|
71
65
|
</view>
|
|
66
|
+
<view wx:if="{{notifySetVideoTime}}" class="set-time-tip">
|
|
67
|
+
<image
|
|
68
|
+
class="set-time-tip-image"
|
|
69
|
+
src="https://image.hh-medic.com/icon/pacs/hh_warning_icon_fill.png"
|
|
70
|
+
/>
|
|
71
|
+
本咨询为视频咨询,请设置你方便的视频时间
|
|
72
|
+
</view>
|
|
72
73
|
<chat-bottom
|
|
73
74
|
id="chat-bottom"
|
|
74
75
|
wx:if="{{order && doctorInfo}}"
|
|
@@ -7,7 +7,26 @@ Component({
|
|
|
7
7
|
* 组件的属性列表
|
|
8
8
|
*/
|
|
9
9
|
properties: {
|
|
10
|
-
|
|
10
|
+
index: {
|
|
11
|
+
type: Number,
|
|
12
|
+
value: 0,
|
|
13
|
+
},
|
|
14
|
+
name: {
|
|
15
|
+
type: String,
|
|
16
|
+
value: ''
|
|
17
|
+
},
|
|
18
|
+
createtime: {
|
|
19
|
+
type: String,
|
|
20
|
+
value: ''
|
|
21
|
+
},
|
|
22
|
+
isSend: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
value: false
|
|
25
|
+
},
|
|
26
|
+
type: {
|
|
27
|
+
type: Number,
|
|
28
|
+
value: 0
|
|
29
|
+
}
|
|
11
30
|
},
|
|
12
31
|
|
|
13
32
|
/**
|
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
<view class="chat-cell-body">
|
|
10
10
|
<text wx:if="{{!isSend}}" class="chat-cell-name">{{name}}</text>
|
|
11
11
|
<view class="chat-cell-body-content">
|
|
12
|
-
<view
|
|
12
|
+
<view
|
|
13
|
+
wx:if="{{type != 2}}"
|
|
14
|
+
class="chat-triangle {{isSend ? 'sender' : ''}}"
|
|
15
|
+
></view>
|
|
16
|
+
<view wx:if="{{type == 2}}" class="chat-triangle-empty"></view>
|
|
13
17
|
<view
|
|
14
18
|
class="{{isSend ? 'chat-cell-sender-content' : 'chat-cell-content'}}"
|
|
15
19
|
catch:tap="clickCell"
|
|
@@ -32,16 +32,13 @@
|
|
|
32
32
|
<template name="textItem">
|
|
33
33
|
<view class="chatting-text-container">
|
|
34
34
|
<block wx:for="{{textArray}}" wx:key="this">
|
|
35
|
-
<!-- <text wx:if="{{item.type == 'text'}}" class="chatting-text"
|
|
36
|
-
>{{item.value}}</text
|
|
37
|
-
>
|
|
38
|
-
wx:elif="{{item.type == 'link'}}"-->
|
|
39
35
|
<view
|
|
40
36
|
class="chatting-text {{item.type == 'link' ? 'link' : ''}}"
|
|
41
37
|
catch:tap="{{item.type == 'link' ? '_tapLink' : ''}}"
|
|
42
38
|
data-link="{{item.type == 'link' ? item.value : ''}}"
|
|
43
|
-
>{{item.name}}</view
|
|
44
39
|
>
|
|
40
|
+
{{item.name}}
|
|
41
|
+
</view>
|
|
45
42
|
</block>
|
|
46
43
|
</view>
|
|
47
44
|
</template>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
width: 0px;
|
|
4
4
|
border-width: 12rpx;
|
|
5
5
|
border-style: solid;
|
|
6
|
-
margin-top:
|
|
6
|
+
margin-top: 20rpx;
|
|
7
7
|
border-color: transparent white transparent transparent;
|
|
8
8
|
top: 5rpx;
|
|
9
9
|
}
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
left: auto;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.chat-triangle-empty {
|
|
17
|
+
width: 20rpx;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
.chat-cell {
|
|
17
21
|
font-size: 32rpx;
|
|
18
22
|
margin-left: 10rpx;
|
|
@@ -34,14 +38,15 @@
|
|
|
34
38
|
float: left;
|
|
35
39
|
}
|
|
36
40
|
.chat-cell-content {
|
|
41
|
+
max-width: calc(100% - 80rpx - 30rpx);
|
|
37
42
|
display: flex;
|
|
38
43
|
flex-direction: row;
|
|
39
44
|
background-color: white;
|
|
40
|
-
margin:
|
|
41
|
-
padding:
|
|
42
|
-
border-radius:
|
|
45
|
+
margin: 0rpx 30rpx 10rpx 0rpx;
|
|
46
|
+
padding: 14rpx 20rpx 14rpx 20rpx;
|
|
47
|
+
border-radius: 14rpx;
|
|
43
48
|
width: fit-content;
|
|
44
|
-
min-height:
|
|
49
|
+
min-height: 40rpx;
|
|
45
50
|
}
|
|
46
51
|
|
|
47
52
|
.chat-cell-sender-photo {
|
|
@@ -52,11 +57,11 @@
|
|
|
52
57
|
display: flex;
|
|
53
58
|
flex-direction: row;
|
|
54
59
|
background-color: #c6e2fe;
|
|
55
|
-
margin:
|
|
60
|
+
margin: 0rpx 0 10rpx 70rpx;
|
|
56
61
|
padding: 10rpx 20rpx 10rpx 20rpx;
|
|
57
|
-
border-radius:
|
|
62
|
+
border-radius: 14rpx;
|
|
58
63
|
width: fit-content;
|
|
59
|
-
min-height:
|
|
64
|
+
min-height: 40rpx;
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
.chat-time-container {
|
|
@@ -79,7 +84,9 @@
|
|
|
79
84
|
.chat-image-container {
|
|
80
85
|
display: flex;
|
|
81
86
|
position: relative;
|
|
82
|
-
margin:
|
|
87
|
+
margin: -12rpx -20rpx;
|
|
88
|
+
border-radius: 10rpx;
|
|
89
|
+
overflow: hidden;
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
.chat-image {
|
|
@@ -108,6 +115,7 @@
|
|
|
108
115
|
}
|
|
109
116
|
|
|
110
117
|
.pdf-body {
|
|
118
|
+
direction: ltr;
|
|
111
119
|
display: flex;
|
|
112
120
|
padding: 10rpx 0 0 0;
|
|
113
121
|
}
|
|
@@ -127,6 +135,8 @@
|
|
|
127
135
|
.pdf-name {
|
|
128
136
|
font-size: 28rpx;
|
|
129
137
|
color: #333333;
|
|
138
|
+
max-width: 400rpx;
|
|
139
|
+
word-wrap: break-word;
|
|
130
140
|
}
|
|
131
141
|
|
|
132
142
|
.pdf-size {
|
|
@@ -144,7 +154,7 @@
|
|
|
144
154
|
|
|
145
155
|
.chatting-text {
|
|
146
156
|
display: contents;
|
|
147
|
-
font-size:
|
|
157
|
+
font-size: 32rpx;
|
|
148
158
|
color: #333333;
|
|
149
159
|
word-break: break-all;
|
|
150
160
|
}
|
|
@@ -233,19 +243,6 @@
|
|
|
233
243
|
right: 0px;
|
|
234
244
|
}
|
|
235
245
|
|
|
236
|
-
.sound-length {
|
|
237
|
-
margin-left: 10px;
|
|
238
|
-
line-height: 40px;
|
|
239
|
-
height: 40px;
|
|
240
|
-
font-size: 20px;
|
|
241
|
-
color: #969696;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.sound-length.sender {
|
|
245
|
-
margin-left: auto;
|
|
246
|
-
margin-right: 10px;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
246
|
.chat-cell-body {
|
|
250
247
|
display: flex;
|
|
251
248
|
flex-direction: column;
|
|
@@ -266,14 +263,13 @@
|
|
|
266
263
|
.notify-end-time-icon {
|
|
267
264
|
width: 50rpx;
|
|
268
265
|
height: 50rpx;
|
|
269
|
-
margin: auto;
|
|
270
266
|
}
|
|
271
267
|
|
|
272
268
|
.notify-end-time-text {
|
|
273
269
|
font-size: 32rpx;
|
|
274
270
|
color: #333333;
|
|
275
|
-
margin-left: 10rpx;
|
|
276
271
|
margin: auto 0 auto 10rpx;
|
|
272
|
+
word-break: break-all;
|
|
277
273
|
}
|
|
278
274
|
|
|
279
275
|
.notify-time-container {
|
|
@@ -32,17 +32,18 @@ module.exports = Behavior({
|
|
|
32
32
|
orderId: null, // 订单Id
|
|
33
33
|
order: null, // 订单
|
|
34
34
|
orderGroup: [],
|
|
35
|
+
showEmpty: false
|
|
35
36
|
},
|
|
36
37
|
|
|
37
38
|
methods: {
|
|
38
39
|
loadList() {
|
|
39
40
|
wx.showNavigationBarLoading()
|
|
41
|
+
this.setData({
|
|
42
|
+
showEmpty: false
|
|
43
|
+
})
|
|
40
44
|
api.orderList().then((res) => {
|
|
41
45
|
wx.hideNavigationBarLoading()
|
|
42
46
|
wx.stopPullDownRefresh()
|
|
43
|
-
this.setData({
|
|
44
|
-
triggered: false
|
|
45
|
-
})
|
|
46
47
|
this._buildOrderGroupInfo(res.data)
|
|
47
48
|
})
|
|
48
49
|
},
|
|
@@ -51,14 +52,16 @@ module.exports = Behavior({
|
|
|
51
52
|
// console.error(JSON.stringify(orderModel))
|
|
52
53
|
if (orderModel) {
|
|
53
54
|
var orderGroups = []
|
|
54
|
-
// if (orderModel.requestOrderList) {
|
|
55
|
+
// if (orderModel.requestOrderList && orderModel.requestOrderList.length > 0) {
|
|
55
56
|
// orderGroups.push(this._buildGroup(true, '我的咨询', orderModel.requestOrderList))
|
|
56
57
|
// }
|
|
57
|
-
if (orderModel.responseOrderList) {
|
|
58
|
+
if (orderModel.responseOrderList && orderModel.responseOrderList.length > 0) {
|
|
58
59
|
orderGroups.push(this._buildGroup(false, '我的回复', orderModel.responseOrderList))
|
|
59
60
|
}
|
|
61
|
+
let showEmpty = orderGroups.length == 0
|
|
60
62
|
this.setData({
|
|
61
63
|
orderGroup: orderGroups,
|
|
64
|
+
showEmpty: showEmpty
|
|
62
65
|
})
|
|
63
66
|
}
|
|
64
67
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const hhDoctor = require('../../hh-doctor')
|
|
1
2
|
const doctorLoader = require('../../public/doctor-loader')
|
|
2
3
|
const cache = require('../../public/cache-data')
|
|
3
4
|
|
|
@@ -10,7 +11,7 @@ Page({
|
|
|
10
11
|
* 页面的初始数据
|
|
11
12
|
*/
|
|
12
13
|
data: {
|
|
13
|
-
|
|
14
|
+
init: false
|
|
14
15
|
},
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -62,7 +63,14 @@ Page({
|
|
|
62
63
|
isTest: isTest,
|
|
63
64
|
}, (result) => {
|
|
64
65
|
if (result) {
|
|
65
|
-
this.
|
|
66
|
+
if (this.data.init) {
|
|
67
|
+
this.loadList()
|
|
68
|
+
} else {
|
|
69
|
+
wx.startPullDownRefresh()
|
|
70
|
+
this.setData({
|
|
71
|
+
init: true
|
|
72
|
+
})
|
|
73
|
+
}
|
|
66
74
|
}
|
|
67
75
|
})
|
|
68
76
|
}
|
|
@@ -98,11 +106,7 @@ Page({
|
|
|
98
106
|
/**
|
|
99
107
|
* 生命周期函数--监听页面隐藏
|
|
100
108
|
*/
|
|
101
|
-
onHide() {
|
|
102
|
-
this.setData({
|
|
103
|
-
needRefresh: true,
|
|
104
|
-
})
|
|
105
|
-
},
|
|
109
|
+
onHide() {},
|
|
106
110
|
|
|
107
111
|
/**
|
|
108
112
|
* 生命周期函数--监听页面卸载
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<view class="match-parent">
|
|
2
|
-
<view class="chatting-body">
|
|
2
|
+
<view wx:if="{{!showEmpty}}" class="chatting-body">
|
|
3
3
|
<block wx:for="{{orderGroup}}" wx:key="orderGroup" wx:for-item="group">
|
|
4
4
|
<view wx:if="{{group.showSection}}" class="order-group"
|
|
5
5
|
>{{group.title}}</view
|
|
@@ -44,4 +44,11 @@
|
|
|
44
44
|
</view>
|
|
45
45
|
</block>
|
|
46
46
|
</view>
|
|
47
|
+
<view wx:if="{{showEmpty}}" class="empty-body">
|
|
48
|
+
<image
|
|
49
|
+
class="empty-image"
|
|
50
|
+
src="https://image.hh-medic.com/icon/pacs/hh_consulation_empty.png"
|
|
51
|
+
/>
|
|
52
|
+
暂时没有咨询单
|
|
53
|
+
</view>
|
|
47
54
|
</view>
|
|
@@ -107,3 +107,19 @@ page {
|
|
|
107
107
|
.status-yellow-color {
|
|
108
108
|
background-color: #f49600;
|
|
109
109
|
}
|
|
110
|
+
|
|
111
|
+
.empty-body {
|
|
112
|
+
position: absolute;
|
|
113
|
+
left: calc(50% - 100rpx);
|
|
114
|
+
top: calc(50% - 200rpx);
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
font-size: 30rpx;
|
|
118
|
+
color: #646464;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.empty-image {
|
|
122
|
+
width: 200rpx;
|
|
123
|
+
height: 200rpx;
|
|
124
|
+
margin-bottom: 30rpx;
|
|
125
|
+
}
|
|
@@ -7,6 +7,7 @@ const cache = require('./cache-data')
|
|
|
7
7
|
*/
|
|
8
8
|
function loadDoctor(options, callback) {
|
|
9
9
|
const doctorId = options.doctorId
|
|
10
|
+
const isTest = options.isTest || false
|
|
10
11
|
if (!doctorId) {
|
|
11
12
|
wx.statLog.sendStatLog(null, `场景:${options.scence || '未知'} 未传必要的参数`)
|
|
12
13
|
wx.showToast({
|
|
@@ -21,7 +22,8 @@ function loadDoctor(options, callback) {
|
|
|
21
22
|
// 如果传入是新的doctorId,重新缓存doctorId并重置doctor为空
|
|
22
23
|
cache.cache({
|
|
23
24
|
doctorId: doctorId,
|
|
24
|
-
doctor: null
|
|
25
|
+
doctor: null,
|
|
26
|
+
isTest: isTest
|
|
25
27
|
})
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/** 解析文本中的超链接 */
|
|
2
2
|
function findLinkFromText(text, typeText, typeUrl) {
|
|
3
|
+
if (!text || text.length == 0) {
|
|
4
|
+
return []
|
|
5
|
+
}
|
|
3
6
|
let linkArr = []
|
|
4
7
|
let reg = /[http|https|wxapp|dicom]+:\/\/[\w|\-|_|.|~|!|\*|'|\(|\)|;|:|@|&|=|+|\$|,|\/|\?|#|\[|\]|%]*/g
|
|
5
8
|
let link = reg.exec(text)
|