hh-doctor-sdk 0.1.6 → 0.1.8

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 (27) hide show
  1. package/components/consultation/detail/behaviors/consultation-behaviors.js +1 -1
  2. package/components/consultation/detail/behaviors/consultation-chat-behaviors.js +6 -3
  3. package/components/consultation/detail/consultation-detail-page.js +24 -13
  4. package/components/consultation/detail/consultation-detail-page.json +2 -1
  5. package/components/consultation/detail/consultation-detail-page.wxml +5 -9
  6. package/components/consultation/detail/consultation-detail-page.wxss +8 -1
  7. package/components/consultation/list/behaviors/consultation-list-base-behaviors.js +1 -3
  8. package/components/consultation/list/consultation-list-page.js +0 -1
  9. package/components/consultation/list/consultation-list-page.json +1 -1
  10. package/components/consultation/list/consultation-list-page.wxml +38 -53
  11. package/components/consultation/list/consultation-list-page.wxss +2 -6
  12. package/components/video-chat/agora-rtc/agora-player/agora-player.js +1 -1
  13. package/components/video-chat/agora-rtc/agora-player/agora-player.wxml +1 -1
  14. package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.js +5 -1
  15. package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.wxml +4 -1
  16. package/components/video-chat/agora-rtc/agora-rtc.js +5 -3
  17. package/components/video-chat/agora-rtc/agora-rtc.wxml +4 -3
  18. package/components/video-chat/controller/controller.js +1 -1
  19. package/components/video-chat/controller/controller.wxml +1 -1
  20. package/components/video-chat/remote-player/remote-player.js +1 -1
  21. package/components/video-chat/remote-player/remote-player.wxml +1 -1
  22. package/components/video-chat/video-chat.js +6 -2
  23. package/components/video-chat/video-chat.wxml +3 -3
  24. package/components/video-chat-page/behaviors/video-chat-behaviors.js +22 -15
  25. package/components/video-chat-page/video-chat-page.js +11 -11
  26. package/components/video-chat-page/video-chat-page.wxml +3 -3
  27. package/package.json +1 -1
@@ -36,7 +36,6 @@ module.exports = Behavior({
36
36
  messageMediaFiles: [], // 图片和视频数据
37
37
  scrollTo: null,
38
38
  showPreview: false,
39
- triggered: true,
40
39
  })
41
40
  wx.showNavigationBarLoading()
42
41
  this.loadOrder(() => {
@@ -44,6 +43,7 @@ module.exports = Behavior({
44
43
  this.setData({
45
44
  triggered: false,
46
45
  })
46
+ wx.stopPullDownRefresh()
47
47
  this.buildOrderInfo()
48
48
  this.loadDicom()
49
49
  this.selectComponent('#chat-bottom').initMenuData()
@@ -81,9 +81,12 @@ module.exports = Behavior({
81
81
  messages: list,
82
82
  isRequest: isRequest,
83
83
  }, () => {
84
- this.setData({
85
- scrollTo: `message-bottom`
86
- })
84
+ wx.createSelectorQuery().select('#scroll-body').boundingClientRect(res => {
85
+ wx.pageScrollTo({
86
+ scrollTop: res.bottom,
87
+ duration: 200
88
+ })
89
+ }).exec()
87
90
  })
88
91
  }
89
92
  },
@@ -105,6 +105,7 @@ Page({
105
105
  if (this.data.orderId === null || this.data.orderId === '') {
106
106
  return
107
107
  }
108
+ this._stopPlayAudio(true)
108
109
  this.loadOrderInfo()
109
110
  },
110
111
 
@@ -117,22 +118,16 @@ Page({
117
118
  const url = event.currentTarget.dataset.url
118
119
  const index = event.currentTarget.dataset.index
119
120
  const playerUrl = `${url}${url.endsWith('.amr') ? '.mp3' : ''}`
120
- if (audioPlayer) {
121
- if (currentPlayIndex >= 0) {
122
- this._stopAudioAnimation()
123
- }
124
- audioPlayer.stop()
125
- audioPlayer.destroy()
126
- audioPlayer = null
127
- if (playerUrl == currentPlayUrl) {
128
- return
129
- }
121
+ const same = playerUrl == currentPlayUrl
122
+ this._stopPlayAudio()
123
+ if (same) {
124
+ return
130
125
  }
131
126
  const player = wx.createInnerAudioContext()
132
127
  player.src = playerUrl
133
128
  player.play()
134
129
  player.onEnded(() => {
135
- this._stopAudioAnimation()
130
+ this._stopAudioAnimation(false)
136
131
  })
137
132
  audioPlayer = player
138
133
  currentPlayIndex = index
@@ -142,6 +137,19 @@ Page({
142
137
  }, 400)
143
138
  },
144
139
 
140
+ _stopPlayAudio(onlyStopInterval) {
141
+ if (audioPlayer) {
142
+ if (currentPlayIndex >= 0) {
143
+ this._stopAudioAnimation(onlyStopInterval)
144
+ }
145
+ audioPlayer.stop()
146
+ audioPlayer.destroy()
147
+ audioPlayer = null
148
+ currentPlayUrl = null
149
+ currentPlayIndex = -1
150
+ }
151
+ },
152
+
145
153
  _audioAnimation() {
146
154
  const message = this.data.messages[currentPlayIndex]
147
155
  var value = message.animationValue
@@ -158,9 +166,12 @@ Page({
158
166
  })
159
167
  },
160
168
 
161
- _stopAudioAnimation() {
169
+ _stopAudioAnimation(onlyStopInterval) {
162
170
  if (audioAnimationInterval) {
163
171
  clearInterval(audioAnimationInterval)
172
+ if (onlyStopInterval) {
173
+ return
174
+ }
164
175
  }
165
176
  const message = this.data.messages[currentPlayIndex]
166
177
  message.animationValue = 3
@@ -213,5 +224,5 @@ Page({
213
224
  let isRequest = this.data.isRequest
214
225
  hhNavigation.evaluate(this.data.orderId, isRequest)
215
226
  }
216
- }
227
+ },
217
228
  })
@@ -6,5 +6,6 @@
6
6
  "chat-bottom": "./widget/chat-bottom/chat-bottom"
7
7
  },
8
8
  "navigationBarTitleText": "咨询单详情",
9
- "backgroundColor": "#000000"
9
+ "backgroundColor": "#f3f5fb",
10
+ "enablePullDownRefresh": true
10
11
  }
@@ -7,14 +7,10 @@
7
7
  />
8
8
  本咨询为视频咨询,请设置你方便的视频时间</view
9
9
  >
10
- <scroll-view
11
- class="scroll-view"
12
- scroll-y
13
- scroll-into-view="{{scrollTo}}"
14
- type="list"
15
- refresher-enabled="true"
16
- bindrefresherrefresh="onPullDownRefresh"
17
- refresher-triggered="{{triggered}}"
10
+ <view
11
+ id="scroll-body"
12
+ class="body-display"
13
+ style="{{ notifySetVideoTime ? 'top: 80rpx;' : ''}}"
18
14
  >
19
15
  <view
20
16
  class="consultation-header"
@@ -70,7 +66,7 @@
70
66
  </block>
71
67
  </view>
72
68
  <view id="message-bottom" class="message-bottom"></view>
73
- </scroll-view>
69
+ </view>
74
70
  <chat-bottom
75
71
  id="chat-bottom"
76
72
  wx:if="{{order && doctorInfo}}"
@@ -7,6 +7,8 @@ page {
7
7
  }
8
8
 
9
9
  .body-display {
10
+ position: absolute;
11
+ width: 100%;
10
12
  display: flex;
11
13
  flex-direction: column;
12
14
  }
@@ -56,10 +58,15 @@ page {
56
58
  }
57
59
 
58
60
  .set-time-tip {
61
+ width: 100%;
62
+ height: 80rpx;
63
+ position: fixed;
64
+ left: 0;
65
+ top: 0;
59
66
  display: flex;
60
67
  flex-direction: row;
68
+ padding: 0 30rpx;
61
69
  background-color: #fffae6;
62
- padding: 20rpx 30rpx;
63
70
  color: #f01414;
64
71
  align-items: center;
65
72
  font-size: 30rpx;
@@ -36,12 +36,10 @@ module.exports = Behavior({
36
36
 
37
37
  methods: {
38
38
  loadList() {
39
- this.setData({
40
- triggered: true
41
- })
42
39
  wx.showNavigationBarLoading()
43
40
  api.orderList().then((res) => {
44
41
  wx.hideNavigationBarLoading()
42
+ wx.stopPullDownRefresh()
45
43
  this.setData({
46
44
  triggered: false
47
45
  })
@@ -10,7 +10,6 @@ Page({
10
10
  */
11
11
  data: {
12
12
  needRefresh: false,
13
- triggered: false,
14
13
  },
15
14
 
16
15
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "usingComponents": {},
3
3
  "navigationBarTitleText": "咨询单",
4
- "backgroundColor": "#000000",
4
+ "backgroundColor": "#f3f5fb",
5
5
  "enablePullDownRefresh": true
6
6
  }
@@ -1,62 +1,47 @@
1
1
  <view class="match-parent">
2
- <scroll-view
3
- class="scroll-view"
4
- type="list"
5
- scroll-y
6
- scroll-into-view="{{scrollTo}}"
7
- refresher-enabled="true"
8
- bindrefresherrefresh="onPullDownRefresh"
9
- refresher-triggered="{{triggered}}"
10
- >
11
- <view class="chatting-body">
12
- <block
13
- wx:for="{{orderGroup}}"
14
- wx:key="orderGroup"
15
- wx:for-item="group"
2
+ <view class="chatting-body">
3
+ <block wx:for="{{orderGroup}}" wx:key="orderGroup" wx:for-item="group">
4
+ <view wx:if="{{group.showSection}}" class="order-group"
5
+ >{{group.title}}</view
16
6
  >
17
- <view wx:if="{{group.showSection}}" class="order-group"
18
- >{{group.title}}</view
7
+ <view class="chatting-body">
8
+ <block
9
+ wx:for="{{group.list}}"
10
+ wx:key="order"
11
+ wx:for-item="order"
19
12
  >
20
- <view class="chatting-body">
21
- <block
22
- wx:for="{{group.list}}"
23
- wx:key="order"
24
- wx:for-item="order"
13
+ <view
14
+ data-orderid="{{order.orderId}}"
15
+ class="order-item"
16
+ bind:tap="clickOrderItem"
25
17
  >
26
- <view
27
- data-orderid="{{order.orderId}}"
28
- class="order-item"
29
- bind:tap="clickOrderItem"
30
- >
31
- <view class="order-patient">
32
- <view class="order-item-name">
33
- {{order.patientName}}
34
- <image
35
- class="order-status-icon"
36
- wx:if="{{order.icon}}"
37
- src="{{order.icon}}"
38
- />
39
- </view>
40
- <view
41
- wx:if="{{order.orderStatusTips}}"
42
- class="order-status {{order.statusColor}}"
43
- >{{order.orderStatusTips}}
44
- </view>
45
- </view>
46
- <view class="order-hospital"
47
- >{{order.doctorName}} {{order.hospitalName}}
18
+ <view class="order-patient">
19
+ <view class="order-item-name">
20
+ {{order.patientName}}
21
+ <image
22
+ class="order-status-icon"
23
+ wx:if="{{order.icon}}"
24
+ src="{{order.icon}}"
25
+ />
48
26
  </view>
49
27
  <view
50
- wx:if="{{order.provideTime != null}}"
51
- class="provide-time"
52
- >{{order.provideTime}}
28
+ wx:if="{{order.orderStatusTips}}"
29
+ class="order-status {{order.statusColor}}"
30
+ >{{order.orderStatusTips}}
53
31
  </view>
54
- <view wx:if="{{order.showLine}}" class="line" />
55
32
  </view>
56
- </block>
57
- </view>
58
- </block>
59
- </view>
60
- <view class="message-bottom"></view>
61
- </scroll-view>
33
+ <view class="order-hospital"
34
+ >{{order.doctorName}} {{order.hospitalName}}
35
+ </view>
36
+ <view
37
+ wx:if="{{order.provideTime != null}}"
38
+ class="provide-time"
39
+ >{{order.provideTime}}
40
+ </view>
41
+ <view wx:if="{{order.showLine}}" class="line" />
42
+ </view>
43
+ </block>
44
+ </view>
45
+ </block>
46
+ </view>
62
47
  </view>
@@ -6,15 +6,11 @@ page {
6
6
  height: 100%;
7
7
  }
8
8
 
9
- .message-bottom {
10
- width: 100%;
11
- padding-bottom: constant(safe-area-inset-bottom); /* 兼容 IOS<11.2 */
12
- padding-bottom: env(safe-area-inset-bottom); /* 兼容 IOS>11.2 */
13
- }
14
-
15
9
  .chatting-body {
16
10
  display: flex;
17
11
  flex-direction: column;
12
+ padding-bottom: constant(safe-area-inset-bottom); /* 兼容 IOS<11.2 */
13
+ padding-bottom: env(safe-area-inset-bottom); /* 兼容 IOS>11.2 */
18
14
  }
19
15
 
20
16
  .order-group {
@@ -17,7 +17,7 @@ Component({
17
17
  type: String,
18
18
  value: ""
19
19
  },
20
- isInVoice: {
20
+ selfInVoice: {
21
21
  type: Boolean,
22
22
  value: false
23
23
  }
@@ -15,7 +15,7 @@
15
15
  bindstatechange="onPlayerStatechange"
16
16
  />
17
17
  <view
18
- wx:if="{{isInVoice}}"
18
+ wx:if="{{selfInVoice}}"
19
19
  class="cover-view {{showSmall ? 'small' : 'big'}}"
20
20
  >
21
21
  <image
@@ -17,13 +17,17 @@ Component({
17
17
  type: Number,
18
18
  value: 0
19
19
  },
20
- isInVoice: {
20
+ selfInVoice: {
21
21
  type: Boolean,
22
22
  value: false
23
23
  },
24
24
  expertAvatar: {
25
25
  type: String,
26
26
  value: ''
27
+ },
28
+ selfInVoice: {
29
+ type: Boolean,
30
+ value: false
27
31
  }
28
32
  },
29
33
 
@@ -16,7 +16,10 @@
16
16
  enable-camera="{{true}}"
17
17
  bindstatechange="recorderStateChange"
18
18
  />
19
- <view wx:if="{{isInVoice}}" class="cover-view position-absolute small">
19
+ <view
20
+ wx:if="{{selfInVoice || selfInVoice}}"
21
+ class="cover-view position-absolute small"
22
+ >
20
23
  <image class="pusher-cover-image" src="{{expertAvatar}}" />
21
24
  </view>
22
25
  </view>
@@ -25,7 +25,7 @@ Component({
25
25
  type: Number,
26
26
  value: 0
27
27
  },
28
- isInVoice: {
28
+ selfInVoice: {
29
29
  type: Boolean,
30
30
  value: false
31
31
  },
@@ -33,6 +33,10 @@ Component({
33
33
  type: String,
34
34
  value: ''
35
35
  },
36
+ selfInVoice: {
37
+ type: Boolean,
38
+ value: false
39
+ }
36
40
  },
37
41
 
38
42
  /**
@@ -184,7 +188,6 @@ Component({
184
188
  this.client.on("token-privilege-did-expire", () => {})
185
189
 
186
190
  this.client.on("mute-video", (e) => {
187
- console.error(JSON.stringify(e))
188
191
  const uuid = e.uid
189
192
  this.triggerEvent('updateUserAudioStatus', {
190
193
  userId: uuid,
@@ -193,7 +196,6 @@ Component({
193
196
  })
194
197
 
195
198
  this.client.on("unmute-video", (e) => {
196
- console.error(JSON.stringify(e))
197
199
  const uuid = e.uid
198
200
  this.triggerEvent('updateUserAudioStatus', {
199
201
  userId: uuid,
@@ -4,7 +4,7 @@
4
4
  showSmall="{{false}}"
5
5
  uid="{{mainRemotePlayer.uid}}"
6
6
  url="{{mainRemotePlayer.url}}"
7
- isInVoice="{{isInVoice || remoteAudioStatus['' + mainRemotePlayer.uid]}}"
7
+ selfInVoice="{{selfInVoice || remoteAudioStatus['' + mainRemotePlayer.uid]}}"
8
8
  bindnetstatus="onPlayerNetstatus"
9
9
  bindstatechange="onPlayerStatechange"
10
10
  />
@@ -20,7 +20,8 @@
20
20
  bindnetstatus="onPusherNetstatus"
21
21
  bindstatechange="onPusherStatechange"
22
22
  chatting="{{mainRemotePlayer != null}}"
23
- isInVoice="{{isInVoice}}"
23
+ selfInVoice="{{selfInVoice}}"
24
+ selfInVoice="{{selfInVoice}}"
24
25
  />
25
26
  <block
26
27
  wx:if="{{remotePlayerList}}"
@@ -33,7 +34,7 @@
33
34
  showSmall="{{true}}"
34
35
  uid="{{item.uid}}"
35
36
  url="{{item.url}}"
36
- isInVoice="{{isInVoice || remoteAudioStatus['' + item.uid]}}"
37
+ selfInVoice="{{selfInVoice || remoteAudioStatus['' + item.uid]}}"
37
38
  bindnetstatus="onPlayerNetstatus"
38
39
  bindstatechange="onPlayerStatechange"
39
40
  />
@@ -12,7 +12,7 @@ Component({
12
12
  type: Boolean,
13
13
  value: false
14
14
  },
15
- isInVoice: {
15
+ selfInVoice: {
16
16
  type: Boolean,
17
17
  value: false,
18
18
  }
@@ -13,7 +13,7 @@
13
13
  mode=""
14
14
  />
15
15
  <view class="control-button-text"
16
- >{{isInVoice ? '切换视频' : '切换语音'}}</view
16
+ >{{selfInVoice ? '切换视频' : '切换语音'}}</view
17
17
  >
18
18
  </view>
19
19
  <view class="item-button" bindtap="_hangupClick">
@@ -9,7 +9,7 @@ Component({
9
9
  type: Boolean,
10
10
  value: true
11
11
  },
12
- isInVoice: {
12
+ selfInVoice: {
13
13
  type: Boolean,
14
14
  value: false,
15
15
  }
@@ -26,7 +26,7 @@
26
26
  bindaudiovolumenotify="_playerAudioVolumeNotify"
27
27
  />
28
28
  <view
29
- wx:if="{{isInVoice}}"
29
+ wx:if="{{selfInVoice}}"
30
30
  class="cover-view {{showSmall ? 'small' : 'big'}}"
31
31
  >
32
32
  <image
@@ -17,10 +17,14 @@ Component({
17
17
  type: String,
18
18
  value: null
19
19
  },
20
- isInVoice: {
20
+ selfInVoice: {
21
21
  type: Boolean,
22
- value: false,
22
+ value: false
23
23
  },
24
+ selfInVoice: {
25
+ type: Boolean,
26
+ value: false
27
+ }
24
28
  },
25
29
 
26
30
  /**
@@ -3,7 +3,7 @@
3
3
  wx:if="{{mainRemotePlayer}}"
4
4
  remoteUser="{{mainRemotePlayer}}"
5
5
  showSmall="{{false}}"
6
- isInVoice="{{isInVoice || remoteAudioStatus['' + mainRemotePlayer.userID]}}"
6
+ selfInVoice="{{selfInVoice || remoteAudioStatus['' + mainRemotePlayer.userID]}}"
7
7
  bind:playerStateChange="_playerStateChange"
8
8
  bind:playerFullscreenChange="_playerFullscreenChange"
9
9
  bind:playerNetStatus="_playerNetStatus"
@@ -33,7 +33,7 @@
33
33
  mode="{{pusher.mode}}"
34
34
  url="{{pusher.url}}"
35
35
  />
36
- <view wx:if="{{isInVoice}}" class="cover-view small">
36
+ <view wx:if="{{selfInVoice}}" class="cover-view small">
37
37
  <image class="pusher-cover-image" src="{{expertAvatar}}" />
38
38
  </view>
39
39
  </view>
@@ -46,7 +46,7 @@
46
46
  wx:if="{{item}}"
47
47
  remoteUser="{{item}}"
48
48
  showSmall="{{true}}"
49
- isInVoice="{{isInVoice || remoteAudioStatus['' + item.userID]}}"
49
+ selfInVoice="{{selfInVoice || remoteAudioStatus['' + item.userID]}}"
50
50
  bind:playerStateChange="_playerStateChange"
51
51
  bind:playerFullscreenChange="_playerFullscreenChange"
52
52
  bind:playerNetStatus="_playerNetStatus"
@@ -33,9 +33,9 @@ module.exports = Behavior({
33
33
  userIdList: [],
34
34
  hangupType: null,
35
35
  newCases: false,
36
- isInVoice: false,
37
36
  expertAvatar: null,
38
- remoteAudioStatus: {},
37
+ remoteAudioStatus: {}, // 远端用户语音视频状态
38
+ selfInVoice: false, // 自己是否处于语音状态
39
39
  },
40
40
 
41
41
  methods: {
@@ -218,28 +218,35 @@ module.exports = Behavior({
218
218
  * 切换语音和视频状态
219
219
  */
220
220
  _controllerChangeVoiceVideo() {
221
- const isInVoice = !this.data.isInVoice
222
- this.setData({
223
- isInVoice: isInVoice,
224
- })
225
- const isFromAgora = this.data.isFromAgora
221
+ this.switchSelfAudioState()
226
222
  message_api.bindData({
227
223
  'toUUID': this.data.isFamilyOrder ? this.data.order.patient.patientUuid : this.data.order.doctorUuid,
228
224
  'orderId': this.data.orderId
229
225
  })
230
- wx.statLog.sendStatLog(null, `切换语音视频,切换为${isInVoice ? '音频' : '视频'}`)
226
+ const selfInVoice = !this.data.selfInVoice
227
+ const isFromAgora = this.data.isFromAgora
228
+ if (selfInVoice) {
229
+ message_api.sendSwitch2Audio(isFromAgora)
230
+ } else {
231
+ message_api.sendSwitch2Video(isFromAgora)
232
+ }
233
+ },
234
+
235
+ switchSelfAudioState(toVoice) {
236
+ const selfInVoice = toVoice || !this.data.selfInVoice
237
+ this.setData({
238
+ selfInVoice: selfInVoice,
239
+ })
240
+
241
+ wx.statLog.sendStatLog(null, `切换语音视频,切换为${selfInVoice ? '音频' : '视频'}`)
231
242
  if (this.data.isFromAgora) {
232
243
  wx.statLog.sendStatLog(null, '切换语音视频(声网RTC)')
233
- this.selectComponent('#artc').switchAudioVideo(isInVoice)
244
+ this.selectComponent('#artc').switchAudioVideo(selfInVoice)
234
245
  } else {
235
246
  wx.statLog.sendStatLog(null, '切换语音视频(腾讯RTC)')
236
- this.selectComponent('#trtc').switchAudioVideo(isInVoice)
237
- }
238
- if (isInVoice) {
239
- message_api.sendSwitch2Audio(isFromAgora)
240
- } else {
241
- message_api.sendSwitch2Video(isFromAgora)
247
+ this.selectComponent('#trtc').switchAudioVideo(selfInVoice)
242
248
  }
249
+
243
250
  },
244
251
 
245
252
  /**
@@ -137,7 +137,7 @@ Page({
137
137
  event: imManager.EventNames.IMCustomMessage,
138
138
  'listener': (params) => {
139
139
  wx.statLog.sendStatLog(this.data.orderId, `收到IM消息(${JSON.stringify(params)})`)
140
- console.error(`收到IM消息(${JSON.stringify(params)})`)
140
+ // console.error(`收到IM消息(${JSON.stringify(params)})`)
141
141
  if (params) {
142
142
  this.onMessage(params.command, params.uuid)
143
143
  }
@@ -180,14 +180,14 @@ Page({
180
180
  case defines.commands.switchToAudioAgora:
181
181
  // this.updateUserAudioStatus(uuid, true)
182
182
  // this.setData({
183
- // isInVoice: true,
183
+ // selfInVoice: true,
184
184
  // })
185
185
  break
186
186
  case defines.commands.switchToVideoWMP:
187
187
  case defines.commands.switchToVideoAgora:
188
188
  // this.updateUserAudioStatus(uuid, false)
189
189
  // this.setData({
190
- // isInVoice: false,
190
+ // selfInVoice: false,
191
191
  // })
192
192
  break
193
193
  }
@@ -215,26 +215,26 @@ Page({
215
215
  }
216
216
  },
217
217
 
218
- updateUserAudioStatus(data) { //uuid, toAudio
218
+ updateUserAudioStatus(data) {
219
219
  const {
220
220
  userId,
221
221
  audio
222
222
  } = data.detail
223
223
  let remoteAudioStatus = this.data.remoteAudioStatus
224
224
  remoteAudioStatus[userId] = audio
225
- let inAudio = true
226
- this.data.userIdList.forEach((userId) => {
227
- if (!remoteAudioStatus[userId]) {
228
- inAudio = false
229
- }
230
- });
225
+ // let toAudio = true
226
+ // this.data.userIdList.forEach((userId) => {
227
+ // if (!remoteAudioStatus[userId]) {
228
+ // toAudio = false
229
+ // }
230
+ // });
231
+
231
232
  if (this.data.isFromAgora) {
232
233
  this.selectComponent('#artc').updateAudioStatus(remoteAudioStatus)
233
234
  } else {
234
235
  this.selectComponent('#trtc').updateAudioStatus(remoteAudioStatus)
235
236
  }
236
237
  this.setData({
237
- isInVoice: inAudio,
238
238
  remoteAudioStatus: remoteAudioStatus,
239
239
  })
240
240
  }
@@ -6,7 +6,7 @@
6
6
  orderId="{{orderId}}"
7
7
  order="{{order}}"
8
8
  callback="{{callback}}"
9
- isInVoice="{{isInVoice}}"
9
+ selfInVoice="{{selfInVoice}}"
10
10
  smallVideoTop="{{smallVideoTop}}"
11
11
  isFamilyOrder="{{isFamilyOrder}}"
12
12
  expertAvatar="{{expertAvatar}}"
@@ -25,7 +25,7 @@
25
25
  orderId="{{orderId}}"
26
26
  order="{{order}}"
27
27
  callback="{{callback}}"
28
- isInVoice="{{isInVoice}}"
28
+ selfInVoice="{{selfInVoice}}"
29
29
  smallVideoTop="{{smallVideoTop}}"
30
30
  isFamilyOrder="{{isFamilyOrder}}"
31
31
  expertAvatar="{{expertAvatar}}"
@@ -44,7 +44,7 @@
44
44
  startChatTime="{{startChatTime}}"
45
45
  newCases="{{newCases}}"
46
46
  callback="{{callback}}"
47
- isInVoice="{{isInVoice}}"
47
+ selfInVoice="{{selfInVoice}}"
48
48
  bind:hangup="_controllerHangup"
49
49
  bind:changeVoice="_controllerChangeVoiceVideo"
50
50
  bind:clickViewCase="_viewCase"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-doctor-sdk",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "和缓名医小程序SDK",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"