hh-doctor-sdk 0.0.3 → 0.0.5
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-chat-behaviors.js +4 -3
- package/components/consultation/detail/behaviors/consultation-reply-behaviors.js +9 -3
- package/components/consultation/list/behaviors/consultation-list-base-behaviors.js +21 -8
- package/components/consultation/list/consultation-list-page.wxml +9 -8
- package/components/consultation/list/consultation-list-page.wxss +15 -1
- package/components/consultation/reply/behaviors/reply-base-behaviors.js +8 -0
- package/components/public/app-config.js +2 -0
- package/components/utils/httpUtils.js +5 -2
- package/components/video-chat/calling/calling.js +12 -28
- package/components/video-chat/calling/calling.wxml +2 -12
- package/components/video-chat/calling/calling.wxss +4 -11
- package/components/video-chat/controller/controller.wxml +0 -35
- package/package.json +1 -1
|
@@ -65,11 +65,12 @@ module.exports = Behavior({
|
|
|
65
65
|
|
|
66
66
|
buildMessages() {
|
|
67
67
|
let order = this.data.order
|
|
68
|
+
const isVideoFinish = this.data.order.isVideoFinish || false
|
|
68
69
|
const orderAskList = order.orderaskList
|
|
69
70
|
const isRequest = cache.isRequest(order.doctorid)
|
|
70
71
|
if (orderAskList && orderAskList.length > 0) {
|
|
71
72
|
const list = orderAskList.map((value, index, array) => {
|
|
72
|
-
return this.createMessageItem(index, value, isRequest)
|
|
73
|
+
return this.createMessageItem(index, value, isRequest, isVideoFinish)
|
|
73
74
|
}) || []
|
|
74
75
|
if (this.needShowEvaluate(isRequest)) {
|
|
75
76
|
// 添加评价
|
|
@@ -97,7 +98,7 @@ module.exports = Behavior({
|
|
|
97
98
|
return message
|
|
98
99
|
},
|
|
99
100
|
|
|
100
|
-
createMessageItem(index, data, isRequest) {
|
|
101
|
+
createMessageItem(index, data, isRequest, isFinish) {
|
|
101
102
|
var message = {}
|
|
102
103
|
const isSend = cache.doctorId() == data.doctor.doctorid
|
|
103
104
|
const status = data.status
|
|
@@ -198,7 +199,7 @@ module.exports = Behavior({
|
|
|
198
199
|
if (contentType == 'videotime') { // 视频时间
|
|
199
200
|
message.type = MessageTypes.notify_time
|
|
200
201
|
message.template = MessageTemplates.notify_time
|
|
201
|
-
if (data.showUpdateProvideTime && isSend) {
|
|
202
|
+
if (data.showUpdateProvideTime && isSend && !isFinish) {
|
|
202
203
|
message.canEdit = true
|
|
203
204
|
message.dateTimeArray = this.data.dateTimeArray
|
|
204
205
|
message.dateTime = this.data.dateTime
|
|
@@ -42,10 +42,16 @@ module.exports = Behavior({
|
|
|
42
42
|
setTimeout(() => {
|
|
43
43
|
this.loadOrderInfo()
|
|
44
44
|
}, 1000);
|
|
45
|
-
}).catch((
|
|
45
|
+
}).catch((res) => {
|
|
46
46
|
wx.hideLoading()
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
let error_msg = res.error_msg || '设置时间失败'
|
|
48
|
+
wx.showModal({
|
|
49
|
+
title: '提示',
|
|
50
|
+
content: error_msg,
|
|
51
|
+
showCancel: false,
|
|
52
|
+
complete: (res) => {
|
|
53
|
+
|
|
54
|
+
}
|
|
49
55
|
})
|
|
50
56
|
})
|
|
51
57
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const api = require('../../../apis/order-app-api')
|
|
2
2
|
const cache = require('../../../public/cache-data')
|
|
3
3
|
const hhNavigation = require('../../../hh-navigation')
|
|
4
|
+
const dateFormat = require('../../../utils/dateUtils')
|
|
4
5
|
|
|
5
6
|
const NEED_PAY = "待付款";
|
|
6
7
|
|
|
@@ -72,16 +73,27 @@ module.exports = Behavior({
|
|
|
72
73
|
},
|
|
73
74
|
|
|
74
75
|
_buildOrderItem(isRequest, order, showLine) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
let orderStatusTips = order.orderStatusTips
|
|
77
|
+
const isPay = order.ispay == 1
|
|
78
|
+
const patientName = order.patient.patientname == null || order.patient.patientname == '' ? '患者' : order.patient.patientname
|
|
79
|
+
const doctorName = isRequest ? order.serviceExpertName : order.doctorname
|
|
80
|
+
const hospital = isRequest ? order.serviceGroupName : order.hospitalname
|
|
81
|
+
const orderType = order.orderType
|
|
82
|
+
const provideType = order.orderService.provideType || 'normal'
|
|
82
83
|
if (!isPay && order.state != -1) {
|
|
83
84
|
orderStatusTips = '待付款'
|
|
84
85
|
}
|
|
86
|
+
let provideTime = null
|
|
87
|
+
let timeTitle = ''
|
|
88
|
+
if (provideType === 'video') {
|
|
89
|
+
timeTitle = '视频时间'
|
|
90
|
+
} else if (provideType === 'feidao') {
|
|
91
|
+
timeTitle = '手术时间'
|
|
92
|
+
}
|
|
93
|
+
const isVideoFinish = order.isVideoFinish || false
|
|
94
|
+
if (order.provideTime && order.provideTime > 0 && !isVideoFinish) {
|
|
95
|
+
provideTime = `${timeTitle}:${dateFormat.format(new Date(order.provideTime), 'yyyy-MM-dd hh:mm')}`
|
|
96
|
+
}
|
|
85
97
|
return {
|
|
86
98
|
provideType: provideType,
|
|
87
99
|
orderStatusTips: orderStatusTips,
|
|
@@ -92,7 +104,8 @@ module.exports = Behavior({
|
|
|
92
104
|
orderType: orderType,
|
|
93
105
|
icon: this._orderIcon(provideType),
|
|
94
106
|
showLine: showLine,
|
|
95
|
-
statusColor: this._orderStatusBackground(orderStatusTips)
|
|
107
|
+
statusColor: this._orderStatusBackground(orderStatusTips),
|
|
108
|
+
provideTime: provideTime,
|
|
96
109
|
}
|
|
97
110
|
},
|
|
98
111
|
|
|
@@ -32,17 +32,18 @@
|
|
|
32
32
|
<view
|
|
33
33
|
wx:if="{{order.orderStatusTips}}"
|
|
34
34
|
class="order-status {{order.statusColor}}"
|
|
35
|
-
>{{order.orderStatusTips}}
|
|
36
|
-
>
|
|
35
|
+
>{{order.orderStatusTips}}
|
|
36
|
+
</view>
|
|
37
37
|
</view>
|
|
38
38
|
<view class="order-hospital"
|
|
39
|
-
>{{order.doctorName}}
|
|
40
|
-
|
|
41
|
-
>
|
|
39
|
+
>{{order.doctorName}} {{order.hospitalName}}
|
|
40
|
+
</view>
|
|
42
41
|
<view
|
|
43
|
-
wx:if="{{order.
|
|
44
|
-
class="
|
|
45
|
-
|
|
42
|
+
wx:if="{{order.provideTime != null}}"
|
|
43
|
+
class="provide-time"
|
|
44
|
+
>{{order.provideTime}}
|
|
45
|
+
</view>
|
|
46
|
+
<view wx:if="{{order.showLine}}" class="line" />
|
|
46
47
|
</view>
|
|
47
48
|
</block>
|
|
48
49
|
</view>
|
|
@@ -24,6 +24,9 @@ page {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.order-item {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
align-items: flex-start;
|
|
27
30
|
background-color: white;
|
|
28
31
|
padding-left: 30rpx;
|
|
29
32
|
}
|
|
@@ -35,13 +38,14 @@ page {
|
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
.order-patient {
|
|
41
|
+
width: 100%;
|
|
42
|
+
position: relative;
|
|
38
43
|
color: #333333;
|
|
39
44
|
font-size: 28rpx;
|
|
40
45
|
display: flex;
|
|
41
46
|
flex-direction: row;
|
|
42
47
|
justify-content: space-between;
|
|
43
48
|
margin-bottom: 20rpx;
|
|
44
|
-
margin-right: 20rpx;
|
|
45
49
|
padding-top: 20rpx;
|
|
46
50
|
}
|
|
47
51
|
|
|
@@ -57,6 +61,15 @@ page {
|
|
|
57
61
|
margin-bottom: 20rpx;
|
|
58
62
|
}
|
|
59
63
|
|
|
64
|
+
.provide-time {
|
|
65
|
+
color: #f01414;
|
|
66
|
+
font-size: 24rpx;
|
|
67
|
+
margin-bottom: 20rpx;
|
|
68
|
+
border: #dcdcdc solid 2rpx;
|
|
69
|
+
border-radius: 6rpx;
|
|
70
|
+
padding: 2rpx 10rpx;
|
|
71
|
+
}
|
|
72
|
+
|
|
60
73
|
.order-status {
|
|
61
74
|
height: 30rpx;
|
|
62
75
|
padding: 4rpx 8rpx;
|
|
@@ -67,6 +80,7 @@ page {
|
|
|
67
80
|
align-content: center;
|
|
68
81
|
justify-content: center;
|
|
69
82
|
border-radius: 6rpx;
|
|
83
|
+
margin-right: 20rpx;
|
|
70
84
|
}
|
|
71
85
|
|
|
72
86
|
.order-status-icon {
|
|
@@ -43,6 +43,14 @@ module.exports = Behavior({
|
|
|
43
43
|
title = '填写所需补充内容'
|
|
44
44
|
placeHolder = '请在此填写要求医生补充的内容'
|
|
45
45
|
break
|
|
46
|
+
case menuBuilder.ChatEventType.refuse:
|
|
47
|
+
title = '填写拒绝原因'
|
|
48
|
+
placeHolder = '请在此填写拒绝原因'
|
|
49
|
+
break
|
|
50
|
+
case menuBuilder.ChatEventType.reply:
|
|
51
|
+
title = '填写回复内容'
|
|
52
|
+
placeHolder = '请在此填回复内容'
|
|
53
|
+
break
|
|
46
54
|
}
|
|
47
55
|
this.setData({
|
|
48
56
|
placeHolder: placeHolder
|
|
@@ -3,6 +3,7 @@ const appID = '10423'
|
|
|
3
3
|
const appKey = ''
|
|
4
4
|
const appSecret = 'N0e7293NSF8nBZjO'
|
|
5
5
|
const sessionId = '1776843236242882600'
|
|
6
|
+
const sessionIdProd = '1792831747042312418'
|
|
6
7
|
|
|
7
8
|
module.exports = {
|
|
8
9
|
appVersion,
|
|
@@ -10,4 +11,5 @@ module.exports = {
|
|
|
10
11
|
appKey,
|
|
11
12
|
appSecret,
|
|
12
13
|
sessionId,
|
|
14
|
+
sessionIdProd,
|
|
13
15
|
}
|
|
@@ -45,7 +45,7 @@ function _request(request, method, params, data) {
|
|
|
45
45
|
if (uuid) {
|
|
46
46
|
fullParams.uuid = uuid
|
|
47
47
|
}
|
|
48
|
-
fullParams.session_id = appConfig.sessionId
|
|
48
|
+
fullParams.session_id = cache.isTest() ? appConfig.sessionId : appConfig.sessionIdProd
|
|
49
49
|
fullParams.random = new Date().getTime()
|
|
50
50
|
|
|
51
51
|
for (let [key, value] of Object.entries(fullParams)) {
|
|
@@ -96,12 +96,15 @@ function _request(request, method, params, data) {
|
|
|
96
96
|
setCookie(res.header['Set-Cookie']);
|
|
97
97
|
}
|
|
98
98
|
if (success(res)) {
|
|
99
|
+
console.error(`success => ${JSON.stringify(res.data)}`)
|
|
99
100
|
resolve(res.data);
|
|
100
101
|
} else {
|
|
101
|
-
|
|
102
|
+
console.error(`failed => ${JSON.stringify(res.data)}`)
|
|
103
|
+
reject(res.data);
|
|
102
104
|
}
|
|
103
105
|
},
|
|
104
106
|
fail: function (err) {
|
|
107
|
+
console.error(`fail => ${JSON.stringify(res)}`)
|
|
105
108
|
reject(err);
|
|
106
109
|
},
|
|
107
110
|
})
|
|
@@ -2,18 +2,9 @@ Component({
|
|
|
2
2
|
|
|
3
3
|
lifetimes: {
|
|
4
4
|
attached: function () {
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
}
|
|
8
|
-
this.setData({
|
|
9
|
-
delayShowTimer: setTimeout(() => {
|
|
10
|
-
this.setData({
|
|
11
|
-
showNotifyButton: true
|
|
12
|
-
})
|
|
13
|
-
}, 5000)
|
|
14
|
-
})
|
|
5
|
+
|
|
15
6
|
},
|
|
16
|
-
detached: function() {
|
|
7
|
+
detached: function () {
|
|
17
8
|
clearTimeout(this.data.delayShowTimer)
|
|
18
9
|
this.setData({
|
|
19
10
|
delayShowTimer: null
|
|
@@ -23,10 +14,10 @@ Component({
|
|
|
23
14
|
|
|
24
15
|
pageLifetimes: {
|
|
25
16
|
show: function () {
|
|
26
|
-
|
|
17
|
+
|
|
27
18
|
},
|
|
28
19
|
hide: function () {
|
|
29
|
-
|
|
20
|
+
|
|
30
21
|
},
|
|
31
22
|
resize: function () {
|
|
32
23
|
|
|
@@ -37,15 +28,20 @@ Component({
|
|
|
37
28
|
* 组件的属性列表
|
|
38
29
|
*/
|
|
39
30
|
properties: {
|
|
40
|
-
isFamilyOrder: {
|
|
41
|
-
|
|
31
|
+
isFamilyOrder: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
value: false
|
|
34
|
+
},
|
|
35
|
+
smallVideoTop: {
|
|
36
|
+
type: Number,
|
|
37
|
+
value: 0
|
|
38
|
+
}
|
|
42
39
|
},
|
|
43
40
|
|
|
44
41
|
/**
|
|
45
42
|
* 组件的初始数据
|
|
46
43
|
*/
|
|
47
44
|
data: {
|
|
48
|
-
showNotifyButton: false,
|
|
49
45
|
delayShowTimer: null
|
|
50
46
|
},
|
|
51
47
|
|
|
@@ -59,17 +55,5 @@ Component({
|
|
|
59
55
|
_cancelClick() {
|
|
60
56
|
this.triggerEvent("cancel")
|
|
61
57
|
},
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* 发送呼叫通知
|
|
65
|
-
*/
|
|
66
|
-
_notifyCall() {
|
|
67
|
-
this.triggerEvent("notifyCall")
|
|
68
|
-
if (!this.properties.isFamilyOrder) {
|
|
69
|
-
this.setData({
|
|
70
|
-
showNotifyButton: false
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
58
|
}
|
|
75
59
|
})
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
<view class="calling-container">
|
|
2
|
-
<view class="calling-tip-
|
|
3
|
-
|
|
4
|
-
您已进入视频,可在此界面耐心等待对方进入
|
|
5
|
-
</view>
|
|
6
|
-
<button
|
|
7
|
-
class="calling-tip-button"
|
|
8
|
-
bind:tap="_notifyCall"
|
|
9
|
-
style="opacity:{{showNotifyButton ? 100 : 0}};"
|
|
10
|
-
>
|
|
11
|
-
通知对方加入视频
|
|
12
|
-
</button>
|
|
2
|
+
<view class="calling-tip-text">
|
|
3
|
+
您已进入视频,可在此界面耐心等待对方进入
|
|
13
4
|
</view>
|
|
14
|
-
|
|
15
5
|
<image
|
|
16
6
|
class="default_photo"
|
|
17
7
|
src="https://image.hh-medic.com/icon/pacs/hh_chat_default_photo.png"
|
|
@@ -2,27 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
.calling-container {
|
|
4
4
|
display: flex;
|
|
5
|
-
|
|
6
|
-
width: 100vw;
|
|
7
|
-
height: 100vh;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.calling-tip-container {
|
|
11
|
-
position: relative;
|
|
5
|
+
position: absolute;
|
|
12
6
|
width: 100%;
|
|
13
|
-
|
|
14
|
-
align-items: center;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
justify-content: center;
|
|
7
|
+
height: 100%;
|
|
17
8
|
}
|
|
18
9
|
|
|
19
10
|
.calling-tip-text {
|
|
11
|
+
position: relative;
|
|
20
12
|
display: flex;
|
|
21
13
|
font-size: 28rpx;
|
|
22
14
|
color: white;
|
|
23
15
|
padding: 20rpx;
|
|
24
16
|
background-color: #00000050;
|
|
25
17
|
border-radius: 10rpx;
|
|
18
|
+
margin: auto auto;
|
|
26
19
|
}
|
|
27
20
|
|
|
28
21
|
.calling-tip-button {
|
|
@@ -33,41 +33,6 @@
|
|
|
33
33
|
<view class="control-button-text">病历资料</view>
|
|
34
34
|
<view wx:if="{{newCases}}" class="new-tip">NEW</view>
|
|
35
35
|
</view>
|
|
36
|
-
<!-- <view class="item-button" bindtap="_checkCaseClick">
|
|
37
|
-
<image
|
|
38
|
-
class="item-button-img"
|
|
39
|
-
src="https://image.hh-medic.com/icon/pacs/hh_patient_info.png"
|
|
40
|
-
mode=""
|
|
41
|
-
/>
|
|
42
|
-
<view>病历资料</view>
|
|
43
|
-
</view>
|
|
44
|
-
|
|
45
|
-
<view class="item-button" bindtap="_checkPdfClick">
|
|
46
|
-
<image
|
|
47
|
-
class="item-button-img"
|
|
48
|
-
src="https://image.hh-medic.com/icon/pacs/hh_pdf.png"
|
|
49
|
-
mode=""
|
|
50
|
-
/>
|
|
51
|
-
<view>PDF报告</view>
|
|
52
|
-
</view>
|
|
53
|
-
|
|
54
|
-
<view class="item-button" bindtap="_checkDicomClick">
|
|
55
|
-
<image
|
|
56
|
-
class="item-button-img"
|
|
57
|
-
src="https://image.hh-medic.com/icon/pacs/hh_dicom.png"
|
|
58
|
-
mode=""
|
|
59
|
-
/>
|
|
60
|
-
<view>DICOM</view>
|
|
61
|
-
</view>
|
|
62
|
-
|
|
63
|
-
<view class="item-button" bindtap="_changeCameraClick">
|
|
64
|
-
<image
|
|
65
|
-
class="item-button-img"
|
|
66
|
-
src="https://image.hh-medic.com/icon/pacs/hh_change_camera.png"
|
|
67
|
-
mode=""
|
|
68
|
-
/>
|
|
69
|
-
<view>翻转</view>
|
|
70
|
-
</view> -->
|
|
71
36
|
</view>
|
|
72
37
|
</view>
|
|
73
38
|
</view>
|