hh-doctor-sdk 0.0.1

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.
Files changed (131) hide show
  1. package/components/apis/api-host-define.js +69 -0
  2. package/components/apis/consultation-reply-api.js +21 -0
  3. package/components/apis/dicom-api.js +31 -0
  4. package/components/apis/family-api.js +20 -0
  5. package/components/apis/file-upload-api.js +35 -0
  6. package/components/apis/order-app-api.js +206 -0
  7. package/components/apis/stat-log-api.js +42 -0
  8. package/components/apis/video-chat-log-api.js +47 -0
  9. package/components/apis/video-message-api.js +88 -0
  10. package/components/consultation/detail/behaviors/chat-cell-base-behaviors.js +29 -0
  11. package/components/consultation/detail/behaviors/consultation-behaviors.js +60 -0
  12. package/components/consultation/detail/behaviors/consultation-chat-behaviors.js +321 -0
  13. package/components/consultation/detail/behaviors/consultation-header-media-behaviors.js +176 -0
  14. package/components/consultation/detail/behaviors/consultation-header-text-behaviors.js +325 -0
  15. package/components/consultation/detail/behaviors/consultation-reply-behaviors.js +67 -0
  16. package/components/consultation/detail/consultation-detail-page.js +219 -0
  17. package/components/consultation/detail/consultation-detail-page.json +10 -0
  18. package/components/consultation/detail/consultation-detail-page.wxml +65 -0
  19. package/components/consultation/detail/consultation-detail-page.wxss +51 -0
  20. package/components/consultation/detail/widget/case-image-filter.js +47 -0
  21. package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.js +31 -0
  22. package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.json +4 -0
  23. package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.wxml +17 -0
  24. package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.wxss +9 -0
  25. package/components/consultation/detail/widget/chat-bottom/chat-bottom.js +100 -0
  26. package/components/consultation/detail/widget/chat-bottom/chat-bottom.json +4 -0
  27. package/components/consultation/detail/widget/chat-bottom/chat-bottom.wxml +24 -0
  28. package/components/consultation/detail/widget/chat-bottom/chat-bottom.wxss +54 -0
  29. package/components/consultation/detail/widget/chat-bottom/chat-menu-builder.js +131 -0
  30. package/components/consultation/detail/widget/chat-cell-template/chat-cell-template.wxml +173 -0
  31. package/components/consultation/detail/widget/chat-cell.wxss +394 -0
  32. package/components/consultation/detail/widget/detail-media/detail-media.js +47 -0
  33. package/components/consultation/detail/widget/detail-media/detail-media.json +4 -0
  34. package/components/consultation/detail/widget/detail-media/detail-media.wxml +12 -0
  35. package/components/consultation/detail/widget/detail-media/detail-media.wxss +57 -0
  36. package/components/consultation/detail/widget/detail-text/detail-text.js +31 -0
  37. package/components/consultation/detail/widget/detail-text/detail-text.json +4 -0
  38. package/components/consultation/detail/widget/detail-text/detail-text.wxml +6 -0
  39. package/components/consultation/detail/widget/detail-text/detail-text.wxss +14 -0
  40. package/components/consultation/evaluate/evaluate-page.js +157 -0
  41. package/components/consultation/evaluate/evaluate-page.json +3 -0
  42. package/components/consultation/evaluate/evaluate-page.wxml +42 -0
  43. package/components/consultation/evaluate/evaluate-page.wxss +103 -0
  44. package/components/consultation/list/behaviors/consultation-list-base-behaviors.js +144 -0
  45. package/components/consultation/list/consultation-list-page.js +84 -0
  46. package/components/consultation/list/consultation-list-page.json +5 -0
  47. package/components/consultation/list/consultation-list-page.wxml +53 -0
  48. package/components/consultation/list/consultation-list-page.wxss +105 -0
  49. package/components/consultation/reply/behaviors/reply-base-behaviors.js +175 -0
  50. package/components/consultation/reply/consultation-reply-page.js +251 -0
  51. package/components/consultation/reply/consultation-reply-page.json +6 -0
  52. package/components/consultation/reply/consultation-reply-page.wxml +103 -0
  53. package/components/consultation/reply/consultation-reply-page.wxss +169 -0
  54. package/components/consultation/reply/widget/audio-record-view/audio-record-view.js +144 -0
  55. package/components/consultation/reply/widget/audio-record-view/audio-record-view.json +4 -0
  56. package/components/consultation/reply/widget/audio-record-view/audio-record-view.wxml +27 -0
  57. package/components/consultation/reply/widget/audio-record-view/audio-record-view.wxss +197 -0
  58. package/components/hh-doctor.js +36 -0
  59. package/components/hh-navigation.js +87 -0
  60. package/components/public/app-config.js +13 -0
  61. package/components/public/behaviors/order-base-behaviors.js +53 -0
  62. package/components/public/cache-data.js +134 -0
  63. package/components/public/doctor-loader.js +60 -0
  64. package/components/public/im-manager.js +135 -0
  65. package/components/public/pdf-viewer.js +59 -0
  66. package/components/public/stat-log.js +13 -0
  67. package/components/static/Agora_Miniapp_SDK_for_WeChat.js +2 -0
  68. package/components/static/trtc-wx.js +2 -0
  69. package/components/uikit/css/common.wxss +23 -0
  70. package/components/uikit/custom-bottom-pop/custom-bottom-pop.js +37 -0
  71. package/components/uikit/custom-bottom-pop/custom-bottom-pop.json +4 -0
  72. package/components/uikit/custom-bottom-pop/custom-bottom-pop.wxml +9 -0
  73. package/components/uikit/custom-bottom-pop/custom-bottom-pop.wxss +79 -0
  74. package/components/uikit/date-time-picker/date-time-picker.js +115 -0
  75. package/components/uikit/web-view-page/web-view-page.js +87 -0
  76. package/components/uikit/web-view-page/web-view-page.json +3 -0
  77. package/components/uikit/web-view-page/web-view-page.wxml +6 -0
  78. package/components/uikit/web-view-page/web-view-page.wxss +1 -0
  79. package/components/utils/checksumUtils.js +56 -0
  80. package/components/utils/common-utils.js +59 -0
  81. package/components/utils/dateUtils.js +142 -0
  82. package/components/utils/eventBus.js +77 -0
  83. package/components/utils/httpUtils.js +123 -0
  84. package/components/utils/number-utils.js +48 -0
  85. package/components/utils/permission-utils.js +164 -0
  86. package/components/video-chat/agora-rtc/agora-player/agora-player.js +106 -0
  87. package/components/video-chat/agora-rtc/agora-player/agora-player.json +4 -0
  88. package/components/video-chat/agora-rtc/agora-player/agora-player.wxml +24 -0
  89. package/components/video-chat/agora-rtc/agora-player/agora-player.wxss +1 -0
  90. package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.js +92 -0
  91. package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.json +4 -0
  92. package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.wxml +22 -0
  93. package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.wxss +1 -0
  94. package/components/video-chat/agora-rtc/agora-rtc.js +391 -0
  95. package/components/video-chat/agora-rtc/agora-rtc.json +7 -0
  96. package/components/video-chat/agora-rtc/agora-rtc.wxml +39 -0
  97. package/components/video-chat/agora-rtc/agora-rtc.wxss +1 -0
  98. package/components/video-chat/callback/callback.js +39 -0
  99. package/components/video-chat/callback/callback.json +4 -0
  100. package/components/video-chat/callback/callback.wxml +29 -0
  101. package/components/video-chat/callback/callback.wxss +26 -0
  102. package/components/video-chat/calling/calling.js +75 -0
  103. package/components/video-chat/calling/calling.json +4 -0
  104. package/components/video-chat/calling/calling.wxml +32 -0
  105. package/components/video-chat/calling/calling.wxss +45 -0
  106. package/components/video-chat/controller/controller.js +86 -0
  107. package/components/video-chat/controller/controller.json +4 -0
  108. package/components/video-chat/controller/controller.wxml +73 -0
  109. package/components/video-chat/controller/controller.wxss +71 -0
  110. package/components/video-chat/remote-player/remote-player.js +42 -0
  111. package/components/video-chat/remote-player/remote-player.json +4 -0
  112. package/components/video-chat/remote-player/remote-player.wxml +37 -0
  113. package/components/video-chat/remote-player/remote-player.wxss +1 -0
  114. package/components/video-chat/video-chat.js +297 -0
  115. package/components/video-chat/video-chat.json +7 -0
  116. package/components/video-chat/video-chat.wxml +56 -0
  117. package/components/video-chat/video-chat.wxss +97 -0
  118. package/components/video-chat-page/behaviors/chat-files-behaviors.js +243 -0
  119. package/components/video-chat-page/behaviors/chat-log-behaviors.js +90 -0
  120. package/components/video-chat-page/behaviors/chat-sound-behaviors.js +60 -0
  121. package/components/video-chat-page/behaviors/video-chat-behaviors.js +524 -0
  122. package/components/video-chat-page/case-group-view/case-group-view.js +38 -0
  123. package/components/video-chat-page/case-group-view/case-group-view.json +4 -0
  124. package/components/video-chat-page/case-group-view/case-group-view.wxml +32 -0
  125. package/components/video-chat-page/case-group-view/case-group-view.wxss +44 -0
  126. package/components/video-chat-page/video-chat-defines.js +39 -0
  127. package/components/video-chat-page/video-chat-page.js +212 -0
  128. package/components/video-chat-page/video-chat-page.json +14 -0
  129. package/components/video-chat-page/video-chat-page.wxml +88 -0
  130. package/components/video-chat-page/video-chat-page.wxss +45 -0
  131. package/package.json +18 -0
@@ -0,0 +1,51 @@
1
+ @import "../detail/widget/chat-cell.wxss";
2
+ @import "../../uikit/css/common.wxss";
3
+ page {
4
+ background-color: #f3f5fb;
5
+ width: 100%;
6
+ height: 100%;
7
+ }
8
+
9
+ .message-bottom {
10
+ width: 100%;
11
+ height: 80rpx;
12
+ padding-bottom: constant(safe-area-inset-bottom); /* 兼容 IOS<11.2 */
13
+ padding-bottom: env(safe-area-inset-bottom); /* 兼容 IOS>11.2 */
14
+ }
15
+
16
+ .consultation-header {
17
+ background-color: white;
18
+ margin-top: 10rpx;
19
+ padding-bottom: 20rpx;
20
+ }
21
+
22
+ .consultation-header-media-box {
23
+ display: flex;
24
+ flex-direction: row;
25
+ margin-top: 30rpx;
26
+ margin-right: 30rpx;
27
+ }
28
+
29
+ .consultation-header-media-scroll-view {
30
+ white-space: nowrap;
31
+ height: 215rpx;
32
+ }
33
+
34
+ .doctor-info-container {
35
+ display: flex;
36
+ border-top: 1rpx #dcdcdcff solid;
37
+ margin-top: 30rpx;
38
+ margin-left: 30rpx;
39
+ }
40
+
41
+ .doctor-info {
42
+ font-size: 28rpx;
43
+ color: #787878;
44
+ margin-top: 14rpx;
45
+ }
46
+
47
+ .chatting-body {
48
+ margin-top: 30rpx;
49
+ display: flex;
50
+ flex-direction: column;
51
+ }
@@ -0,0 +1,47 @@
1
+ function imageList(caseImageList) {
2
+ const images = caseImageList.filter((value, index, array) => {
3
+ if (value.s3key && value.s3key.length > 0) {
4
+ return !value.s3key.endsWith('.pdf')
5
+ }
6
+ return value.url && !value.url.includes('.pdf')
7
+ })
8
+
9
+ const imageDataList = images.map((value, index, array) => {
10
+ const imageurl = value.imageurl
11
+ return {
12
+ type: imageurl.includes('.mp4') ? 'video' : 'image',
13
+ url: imageurl,
14
+ thumb: value.smallImage
15
+ }
16
+ })
17
+ return imageDataList
18
+ }
19
+
20
+ function pdfList(caseImageList) {
21
+ const pdfs = caseImageList.filter((value, index, array) => {
22
+ if (value.s3key && value.s3key.length > 0) {
23
+ return value.s3key.endsWith('.pdf')
24
+ }
25
+ return value.url && value.url.includes('.pdf')
26
+ })
27
+ return pdfs.map((value, index, arary) => {
28
+ return pdfData(value.imageurl, value.imagedesc)
29
+ })
30
+ }
31
+
32
+ function pdfData(url, imagedesc) {
33
+ const index = url.indexOf('?')
34
+ if (index >= 0) {
35
+ url = url.substring(0, index)
36
+ }
37
+ // const name = url.substring(url.lastIndexOf('/') + 1)
38
+ return {
39
+ url: url,
40
+ name: imagedesc
41
+ }
42
+ }
43
+
44
+ module.exports = {
45
+ imageList,
46
+ pdfList
47
+ }
@@ -0,0 +1,31 @@
1
+ // components/consultation/detail/widget/chat-left-cell/chat-left-cell.js
2
+ Component({
3
+
4
+ behaviors: [require('../../behaviors/chat-cell-base-behaviors')],
5
+
6
+ /**
7
+ * 组件的属性列表
8
+ */
9
+ properties: {
10
+
11
+ },
12
+
13
+ /**
14
+ * 组件的初始数据
15
+ */
16
+ data: {
17
+
18
+ },
19
+
20
+ /**
21
+ * 组件的方法列表
22
+ */
23
+ methods: {
24
+ clickCell: function () {
25
+ const index = this.properties.index
26
+ this.triggerEvent('clickCell', {
27
+ index
28
+ })
29
+ }
30
+ }
31
+ })
@@ -0,0 +1,4 @@
1
+ {
2
+ "component": true,
3
+ "usingComponents": {}
4
+ }
@@ -0,0 +1,17 @@
1
+ <view class="chat-time-container">
2
+ <text class="chat-time">{{createtime}}</text>
3
+ </view>
4
+
5
+ <view class="chat-cell {{isSend ? 'sender' : ''}}">
6
+ <view class="{{isSend ? 'chat-cell-sender-photo' : 'chat-cell-photo'}}">
7
+ <image class="chat-cell-photo-image" src="{{photo}}"></image>
8
+ </view>
9
+ <text wx:if="{{!isSend}}" class="chat-cell-name">{{name}}</text>
10
+ <view
11
+ class="{{isSend ? 'chat-cell-sender-content' : 'chat-cell-content'}}"
12
+ catch:tap="clickCell"
13
+ >
14
+ <view class="chat-triangle {{isSend ? 'sender' : ''}}"></view>
15
+ <slot></slot>
16
+ </view>
17
+ </view>
@@ -0,0 +1,9 @@
1
+ @import "../chat-cell.wxss";
2
+
3
+ .chat-cell-name {
4
+ display: inline-block;
5
+ font-size: 20rpx;
6
+ color: #333333;
7
+ margin-left: 20rpx;
8
+ margin-bottom: 6rpx;
9
+ }
@@ -0,0 +1,100 @@
1
+ const menuBuilder = require('./chat-menu-builder')
2
+ const cache = require('../../../../public/cache-data')
3
+ const base = require('../../../../hh-doctor')
4
+ const hhNavigation = require('../../../../hh-navigation')
5
+
6
+ Component({
7
+
8
+ /**
9
+ * 组件的属性列表
10
+ */
11
+ properties: {
12
+ order: null,
13
+ marginBottom: {
14
+ type: Number,
15
+ value: 0
16
+ },
17
+ dateTimeArray: null,
18
+ dateTime: null
19
+ },
20
+
21
+ lifetimes: {
22
+ // ready: function () {
23
+ // this.initMenuData()
24
+ // },
25
+ },
26
+
27
+ // pageLifetimes: {
28
+ // show: function () {
29
+ // this.initMenuData()
30
+ // }
31
+ // },
32
+
33
+ /**
34
+ * 组件的初始数据
35
+ */
36
+ data: {
37
+ menus: [],
38
+ },
39
+
40
+ /**
41
+ * 组件的方法列表
42
+ */
43
+ methods: {
44
+ initMenuData() {
45
+ const order = this.properties.order
46
+ if (order) {
47
+ const menus = menuBuilder.orderMenus(order)
48
+ this.setData({
49
+ menus: menus
50
+ })
51
+ }
52
+ },
53
+ clickMenu(event) {
54
+ const {
55
+ type
56
+ } = event.currentTarget.dataset
57
+ switch (type) {
58
+ case menuBuilder.ChatEventType.startVideo:
59
+ this._startVideo()
60
+ break
61
+ case menuBuilder.ChatEventType.eAddSupply:
62
+ this._forwart2Reply(menuBuilder.ChatEventType.eAddSupply)
63
+ break;
64
+ case menuBuilder.ChatEventType.refuse:
65
+ this._forwart2Reply(menuBuilder.ChatEventType.refuse)
66
+ break;
67
+ case menuBuilder.ChatEventType.reply:
68
+ this._forwart2Reply(menuBuilder.ChatEventType.reply)
69
+ break
70
+ }
71
+ },
72
+
73
+ _forwart2Reply(type) {
74
+ hhNavigation.orderReply(type, JSON.stringify(this.data.order))
75
+ },
76
+
77
+ _startVideo() {
78
+ const order = this.properties.order
79
+ if (order && order.orderid && order.orderid.length > 0) {
80
+ hhNavigation.videoChat(order.orderid, cache.doctorId(), cache.isTest(), false)
81
+ }
82
+ },
83
+
84
+ /**
85
+ * 时间选择器点击确定回调方法
86
+ * @param {*} e 事件回调参数
87
+ */
88
+ changeDateTime(e) {
89
+ this.triggerEvent('changeDateTime', e)
90
+ },
91
+
92
+ /**
93
+ * 时间选择器选择项目回调方法
94
+ * @param {*} e 事件回调参数
95
+ */
96
+ changeDateTimeColumn(e) {
97
+ this.triggerEvent('changeDateTimeColumn', e)
98
+ }
99
+ }
100
+ })
@@ -0,0 +1,4 @@
1
+ {
2
+ "component": true,
3
+ "usingComponents": {}
4
+ }
@@ -0,0 +1,24 @@
1
+ <view wx:if="{{menus != null && menus.length > 0}}" class="input-panel">
2
+ <view class="chat-button-box">
3
+ <block wx:for="{{menus}}" wx:key="this">
4
+ <view
5
+ class="chat-menu-item {{index > 0 ? 'border' : ''}}"
6
+ data-type="{{item.type}}"
7
+ catch:tap="clickMenu"
8
+ >
9
+ <block wx:if="{{item.type == 'setTime'}}">
10
+ <picker
11
+ mode="multiSelector"
12
+ value="{{dateTime}}"
13
+ bindchange="changeDateTime"
14
+ bindcolumnchange="changeDateTimeColumn"
15
+ range="{{dateTimeArray}}"
16
+ >
17
+ {{item.text}}
18
+ </picker>
19
+ </block>
20
+ <block wx:else> {{item.text}} </block>
21
+ </view>
22
+ </block>
23
+ </view>
24
+ </view>
@@ -0,0 +1,54 @@
1
+ .input-panel {
2
+ position: fixed;
3
+ left: 0px;
4
+ bottom: 0px;
5
+ width: 100%;
6
+ /* background-color: #f6f6f6; */
7
+ background-color: white;
8
+ border-top: solid 1px #e4e4e4;
9
+ box-sizing: border-box;
10
+ z-index: 2;
11
+ display: block;
12
+ }
13
+
14
+ .input-tools {
15
+ width: 100%;
16
+ /* height: 70px; */
17
+ display: flex;
18
+ flex-flow: row nowrap;
19
+ justify-content: flex-start;
20
+ align-items: center;
21
+ box-sizing: border-box;
22
+ padding: 17rpx;
23
+ }
24
+
25
+ .chat-button-box {
26
+ width: 100%;
27
+ background-color: white;
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ border-bottom: solid 1px #e4e4e4;
32
+ margin-bottom: constant(safe-area-inset-bottom); /* 兼容 IOS<11.2 */
33
+ margin-bottom: env(safe-area-inset-bottom); /* 兼容 IOS>11.2 */
34
+ }
35
+
36
+ .chat-menu-item {
37
+ flex: 1;
38
+ height: 80rpx;
39
+ text-align: center;
40
+ line-height: 80rpx;
41
+ font-size: 32rpx;
42
+ color: #1482f0;
43
+ }
44
+
45
+ .chat-menu-item.border {
46
+ border-left: 1rpx #dcdcdcff solid;
47
+ }
48
+
49
+ .menu-border {
50
+ width: 1rpx;
51
+ background-color: #dcdcdcff;
52
+ /* border-left: 1rpx #dcdcdcff solid; */
53
+ margin: 8rpx 0;
54
+ }
@@ -0,0 +1,131 @@
1
+ const cache = require('../../../../public/cache-data')
2
+
3
+ const OrderState = {
4
+ submit: 0,
5
+ accepted: 1,
6
+ finished: 2,
7
+ rejected: 3,
8
+ timeout: 4,
9
+ addSupplement: 15,
10
+ }
11
+
12
+ const ChatEventType = {
13
+ refuse: 'refuse',
14
+ discuss: 'discuss',
15
+ eAddSupply: 'eAddSupply',
16
+ reply: 'reply',
17
+ setTime: 'setTime',
18
+ startVideo: 'startVideo',
19
+ videoMore: 'videoMore',
20
+ visitConfirm: 'visitConfirm',
21
+ visitReject: 'visitReject'
22
+ }
23
+
24
+ function orderMenus(order) {
25
+ if (!order) {
26
+ return []
27
+ }
28
+ const isRequest = cache.isRequest(order.doctorid)
29
+ if (isRequest) {
30
+ return []
31
+ }
32
+ const provideType = order.provideType
33
+ if (!isRequest && provideType && provideType.length > 0 && provideType != 'normal') {
34
+ switch (provideType) {
35
+ case 'video':
36
+ return _videoMenus(order)
37
+ case 'feidao':
38
+ return _feidaoMenus(order)
39
+ }
40
+ }
41
+ return _normalMenus(order)
42
+ }
43
+
44
+ function _videoMenus(order) {
45
+ var menus = []
46
+ const state = order.state
47
+ if (state == OrderState.rejected) {
48
+ return menus
49
+ }
50
+ const isSetTime = order.provideTime || 0 > 10000
51
+ const needMore = order.orderMessage.replyShowNeedMoreButton || false //专家是否显示需要补充按钮
52
+ if (needMore) {
53
+ menus.push(_menu(ChatEventType.eAddSupply, '需要补充'))
54
+ }
55
+ if (isSetTime) {
56
+ menus.push(_menu(ChatEventType.startVideo, '发起视频'))
57
+ menus.push(_menu(ChatEventType.reply, '回复意见', 1))
58
+ } else {
59
+ menus.push(_menu(ChatEventType.refuse, '拒绝'))
60
+ menus.push(_menu(ChatEventType.setTime, '设置时间'))
61
+ menus.push(_menu(ChatEventType.videoMore, '更多'))
62
+ }
63
+ return menus
64
+ }
65
+
66
+ function _feidaoMenus(order) {
67
+ var menus = []
68
+ const state = order.state
69
+ if (state == OrderState.rejected) {
70
+ return menus
71
+ }
72
+ // 暂时留着
73
+ // var isSetTime = false
74
+ // if (order.orderaskList && order.orderaskList.length > 0) {
75
+ // const index = order.orderaskList.findIndex((value, index, array) => {
76
+ // return value.role == 2
77
+ // })
78
+ // isSetTime = index >= 0
79
+ // }
80
+ menus.push(_menu(ChatEventType.visitConfirm, '可行手术'))
81
+ menus.push(_menu(ChatEventType.visitReject, '无法手术', 1))
82
+ return menus
83
+ }
84
+
85
+ function _normalMenus(order) {
86
+ var menus = []
87
+ const state = order.state
88
+ const provideType = order.provideType
89
+ const haveInvite = order.isexample == 2 && provideType != 'video'
90
+ const canFeedback = order.orderMessage && (order.orderMessage.needDoctorFeedback || false)
91
+ const needMore = order.orderMessage.replyShowNeedMoreButton || false
92
+ switch (state) {
93
+ case OrderState.submit:
94
+ case OrderState.accepted:
95
+ case OrderState.addSupplement:
96
+ if (haveInvite) {
97
+ menus.push(_menu(ChatEventType.discuss, '内部讨论'))
98
+ } else {
99
+ menus.push(_menu(ChatEventType.refuse, '拒绝'))
100
+ }
101
+ if (needMore) {
102
+ menus.push(_menu(ChatEventType.eAddSupply, '补充资料'))
103
+ }
104
+ menus.push(_menu(ChatEventType.reply, '回复意见', 1))
105
+ break
106
+ case OrderState.finished:
107
+ if (haveInvite) {
108
+ menus.push(_menu(ChatEventType.discuss, '内部讨论'))
109
+ menus.push(_menu(ChatEventType.reply, '回复意见', 1))
110
+ } else {
111
+ menus.push(_menu(ChatEventType.reply, '回复意见', 1))
112
+ }
113
+ break
114
+ default:
115
+ menus.push(_menu(ChatEventType.reply, '回复意见', 1))
116
+ break;
117
+ }
118
+ return menus
119
+ }
120
+
121
+ function _menu(type, text, style = 0) {
122
+ return {
123
+ type: type,
124
+ text: text,
125
+ style: style // 0.默认样式 1.高亮样式
126
+ }
127
+ }
128
+ module.exports = {
129
+ ChatEventType,
130
+ orderMenus
131
+ }
@@ -0,0 +1,173 @@
1
+ <!-- 信息流图片模板 -->
2
+ <template name="imageItem">
3
+ <view class="chat-image-container">
4
+ <image class="chat-image" mode="aspectFill" src="{{cover}}" />
5
+ <image
6
+ wx:if="{{isVideo}}"
7
+ class="chat-video-play"
8
+ src="https://imgs.hh-medic.com/icon/wmp/hhdoctor/video-play.png"
9
+ />
10
+ <view class="chat-image-count">{{number}}</view>
11
+ </view>
12
+ </template>
13
+
14
+ <!-- 信息流PDF模板 -->
15
+ <template name="pdfItem">
16
+ <view class="pdf-body">
17
+ <view>
18
+ <image
19
+ class="pdf-body-image"
20
+ src="https://imgs.hh-medic.com/icon/hh_icon_pdf.png"
21
+ ></image>
22
+ </view>
23
+
24
+ <view class="pdf-content">
25
+ <text class="pdf-name">{{file.name}}</text>
26
+ <text class="pdf-size">{{file.size}}</text>
27
+ </view>
28
+ </view>
29
+ </template>
30
+
31
+ <!-- 信息流文字模板 -->
32
+ <template name="textItem">
33
+ <view class="chatting-text-container">
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
+ <view
40
+ class="chatting-text {{item.type == 'link' ? 'link' : ''}}"
41
+ catch:tap="{{item.type == 'link' ? '_tapLink' : ''}}"
42
+ data-link="{{item.type == 'link' ? item.value : ''}}"
43
+ >{{item.name}}</view
44
+ >
45
+ </block>
46
+ </view>
47
+ </template>
48
+
49
+ <!-- 音频模板 -->
50
+ <template name="soundItem">
51
+ <view
52
+ class="msg-sound-container"
53
+ data-index="{{index}}"
54
+ data-url="{{voiceUrl}}"
55
+ catch:tap="_playAudio"
56
+ >
57
+ <view
58
+ wx:if="{{animationValue >= 1}}"
59
+ class="sound-icon {{isSend ? 'sender' : ''}} arc1"
60
+ ></view>
61
+ <view
62
+ wx:if="{{animationValue >= 2}}"
63
+ class="sound-icon {{isSend ? 'sender' : ''}} arc2"
64
+ ></view>
65
+ <view
66
+ wx:if="{{animationValue >= 3}}"
67
+ class="sound-icon {{isSend ? 'sender' : ''}} arc3"
68
+ ></view>
69
+ <text class="msg-sound-text {{isSend ? 'sender' : ''}}"></text>
70
+ </view>
71
+ </template>
72
+
73
+ <!-- 视频时长 -->
74
+ <template name="videoEndTime">
75
+ <view class="notify-end-time-body">
76
+ <image
77
+ class="notify-end-time-icon"
78
+ src="https://imgs.hh-medic.com/icon/hh_message_time_icon_video.png"
79
+ ></image>
80
+ <text class="notify-end-time-text">{{content}}</text>
81
+ </view>
82
+ </template>
83
+
84
+ <template name="chatTip">
85
+ <view class="chat-time-container">
86
+ <text class="chat-time">{{createtime}}</text>
87
+ </view>
88
+ <view class="meesage-tip-container">
89
+ <view class="message-tip-box">
90
+ <view class="message-tip-title">咨询单已提交</view>
91
+ <view class="message-tip-content">{{content}}</view>
92
+ <view wx:if="{{showButton}}" class="message-tip-button-container">
93
+ <view class="message-tip-button" catch:tap="_clickNotify">
94
+ 提醒专家回复
95
+ </view>
96
+ </view>
97
+ </view>
98
+ </view>
99
+ </template>
100
+
101
+ <!-- 评价 -->
102
+ <template name="Evaluate">
103
+ <view class="evaluate-body" bind:tap="_clickEvaluate">
104
+ <view class="evaluate-box">
105
+ <image
106
+ class="evaluate-icon"
107
+ src="{{feedbackStar >= 1 ? 'https://image.hh-medic.com/icon/pacs/hh_eveluate_full.png' : 'https://image.hh-medic.com/icon/pacs/hh_eveluate_empty.png'}}"
108
+ />
109
+ <image
110
+ class="evaluate-icon"
111
+ src="{{feedbackStar >= 2 ? 'https://image.hh-medic.com/icon/pacs/hh_eveluate_full.png' : 'https://image.hh-medic.com/icon/pacs/hh_eveluate_empty.png'}}"
112
+ />
113
+ <image
114
+ class="evaluate-icon"
115
+ src="{{feedbackStar >= 3 ? 'https://image.hh-medic.com/icon/pacs/hh_eveluate_full.png' : 'https://image.hh-medic.com/icon/pacs/hh_eveluate_empty.png'}}"
116
+ />
117
+ <image
118
+ class="evaluate-icon"
119
+ src="{{feedbackStar >= 4 ? 'https://image.hh-medic.com/icon/pacs/hh_eveluate_full.png' : 'https://image.hh-medic.com/icon/pacs/hh_eveluate_empty.png'}}"
120
+ />
121
+ <image
122
+ class="evaluate-icon"
123
+ src="{{feedbackStar >= 5 ? 'https://image.hh-medic.com/icon/pacs/hh_eveluate_full.png' : 'https://image.hh-medic.com/icon/pacs/hh_eveluate_empty.png'}}"
124
+ />
125
+ <view class="{{feedbackStar > 0 ? 'evaluate-did' : 'evaluate-to'}}">
126
+ {{feedbackStar > 0 ? '已评价' : '点击评价'}}
127
+ </view>
128
+ </view>
129
+ </view>
130
+ </template>
131
+
132
+ <!-- 白底蓝色提示(统一格式外显示) -->
133
+ <template name="updateNotice">
134
+ <view class="update-notice-body">
135
+ <text class="update-notice-text">{{content}}</text>
136
+ </view>
137
+ </template>
138
+
139
+ <!-- 视频时间,可编辑 -->
140
+ <template name="videoTimeItem">
141
+ <view class="notify-time-container">
142
+ <view class="notify-end-time-body">
143
+ <image
144
+ class="notify-end-time-icon"
145
+ src="https://imgs.hh-medic.com/icon/hh_message_time_icon_video.png"
146
+ ></image>
147
+ <text class="notify-end-time-text">{{content}}</text>
148
+ </view>
149
+ <view
150
+ wx:if="{{canEdit}}"
151
+ class="notify-time-edit"
152
+ data-index="{{index}}"
153
+ catch:tap="_editTime"
154
+ >
155
+ <picker
156
+ mode="multiSelector"
157
+ value="{{dateTime}}"
158
+ bindchange="changeDateTime"
159
+ bindcolumnchange="changeDateTimeColumn"
160
+ range="{{dateTimeArray}}"
161
+ >
162
+ 修改时间
163
+ </picker>
164
+ </view>
165
+ <view
166
+ wx:if="{{!isSend}}"
167
+ class="notify-time-join"
168
+ catch:tap="_joinVideo"
169
+ >
170
+ 加入视频
171
+ </view>
172
+ </view>
173
+ </template>