hh-doctor-sdk 0.1.8 → 0.2.0
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/consultation-detail-page.json +2 -1
- package/components/consultation/detail/consultation-detail-page.wxml +2 -0
- package/components/consultation/detail/consultation-detail-page.wxss +7 -0
- package/components/consultation/list/consultation-list-page.js +4 -0
- package/components/consultation/list/consultation-list-page.json +2 -1
- package/components/consultation/reply/consultation-reply-page.wxml +1 -1
- package/components/consultation/reply/consultation-reply-page.wxss +7 -0
- package/components/public/doctor-loader.js +0 -4
- package/components/video-chat/agora-rtc/agora-rtc.js +8 -1
- package/components/video-chat/video-chat.js +10 -2
- package/package.json +1 -1
|
@@ -38,6 +38,13 @@ page {
|
|
|
38
38
|
height: 215rpx;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
consultation-header-media-scroll-view ::-webkit-scrollbar {
|
|
42
|
+
display: none;
|
|
43
|
+
width: 0;
|
|
44
|
+
height: 0;
|
|
45
|
+
color: transparent;
|
|
46
|
+
}
|
|
47
|
+
|
|
41
48
|
.doctor-info-container {
|
|
42
49
|
display: flex;
|
|
43
50
|
border-top: 1rpx #dcdcdcff solid;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const doctorLoader = require('../../public/doctor-loader')
|
|
2
|
+
const cache = require('../../public/cache-data')
|
|
2
3
|
|
|
3
4
|
Page({
|
|
4
5
|
|
|
@@ -39,6 +40,9 @@ Page({
|
|
|
39
40
|
wx.statLog.sendStatLog(null, '打开咨询单列表界面')
|
|
40
41
|
const doctorId = wx.getStorageSync('doctorId') || ''
|
|
41
42
|
const isTest = (getApp().globalData.profileName || 'prod') == 'test'
|
|
43
|
+
cache.cache({
|
|
44
|
+
isTest: isTest
|
|
45
|
+
})
|
|
42
46
|
doctorLoader.loadDoctor({
|
|
43
47
|
doctorId: doctorId,
|
|
44
48
|
isTest: isTest,
|
|
@@ -17,14 +17,10 @@ function loadDoctor(options, callback) {
|
|
|
17
17
|
// 由于后续所有联网请求都需要doctorId所以在此缓存doctorId在联网公共参数会用到
|
|
18
18
|
if (doctorId === cache.doctorId() && cache.doctor() !== null) {
|
|
19
19
|
// 如果传入的doctorId和以前已经加载过的doctorId一致并且doctor数据不为空可以不再次加载doctor数据
|
|
20
|
-
cache.cache({
|
|
21
|
-
isTest: options.isTest || false
|
|
22
|
-
})
|
|
23
20
|
} else {
|
|
24
21
|
// 如果传入是新的doctorId,重新缓存doctorId并重置doctor为空
|
|
25
22
|
cache.cache({
|
|
26
23
|
doctorId: doctorId,
|
|
27
|
-
isTest: options.isTest || false,
|
|
28
24
|
doctor: null
|
|
29
25
|
})
|
|
30
26
|
}
|
|
@@ -89,6 +89,7 @@ Component({
|
|
|
89
89
|
await this.client.unpublish()
|
|
90
90
|
await this.client.leave()
|
|
91
91
|
// await this.client.destory()
|
|
92
|
+
wx.statLog.sendStatLog(null, '(声网)本人离开房间')
|
|
92
93
|
this.triggerEvent("directHangup")
|
|
93
94
|
},
|
|
94
95
|
|
|
@@ -101,6 +102,7 @@ Component({
|
|
|
101
102
|
this.addMedia(0, uuid, url, {
|
|
102
103
|
key: ts
|
|
103
104
|
})
|
|
105
|
+
wx.statLog.sendStatLog(null, '(声网)本人加入房间')
|
|
104
106
|
this.triggerEvent('sendLog', logApi.logTypes.connect)
|
|
105
107
|
this.triggerEvent('sendCallMessage')
|
|
106
108
|
},
|
|
@@ -143,7 +145,7 @@ Component({
|
|
|
143
145
|
}
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
|
-
|
|
148
|
+
wx.statLog.sendStatLog(null, `(声网)${uid}加入房间`)
|
|
147
149
|
if (!matchItem) {
|
|
148
150
|
this.addMedia(1, uid, url, {
|
|
149
151
|
key: ts,
|
|
@@ -159,6 +161,7 @@ Component({
|
|
|
159
161
|
|
|
160
162
|
this.client.on("stream-removed", e => {
|
|
161
163
|
let uid = e.uid;
|
|
164
|
+
wx.statLog.sendStatLog(null, `(声网)${uid}离开房间`)
|
|
162
165
|
this.removeMedia(uid)
|
|
163
166
|
})
|
|
164
167
|
|
|
@@ -166,6 +169,7 @@ Component({
|
|
|
166
169
|
let errObj = err || {};
|
|
167
170
|
let code = errObj.code || 0;
|
|
168
171
|
let reason = errObj.reason || "";
|
|
172
|
+
wx.statLog.sendStatLog(null, `(声网)发生错误(${code} -> ${reason})`)
|
|
169
173
|
if (code === 501 || code === 904) {
|
|
170
174
|
this.reconnect()
|
|
171
175
|
}
|
|
@@ -189,6 +193,7 @@ Component({
|
|
|
189
193
|
|
|
190
194
|
this.client.on("mute-video", (e) => {
|
|
191
195
|
const uuid = e.uid
|
|
196
|
+
wx.statLog.sendStatLog(null, `(声网)远端用户切换为音频(${uuid})`)
|
|
192
197
|
this.triggerEvent('updateUserAudioStatus', {
|
|
193
198
|
userId: uuid,
|
|
194
199
|
audio: true
|
|
@@ -197,6 +202,7 @@ Component({
|
|
|
197
202
|
|
|
198
203
|
this.client.on("unmute-video", (e) => {
|
|
199
204
|
const uuid = e.uid
|
|
205
|
+
wx.statLog.sendStatLog(null, `(声网)远端用户切换为视频(${uuid})`)
|
|
200
206
|
this.triggerEvent('updateUserAudioStatus', {
|
|
201
207
|
userId: uuid,
|
|
202
208
|
audio: false
|
|
@@ -402,6 +408,7 @@ Component({
|
|
|
402
408
|
}
|
|
403
409
|
},
|
|
404
410
|
switchAudioVideo(toAudio) {
|
|
411
|
+
wx.statLog.sendStatLog(null, `(声网)切换为${toAudio ? '音频' : '视频'}`)
|
|
405
412
|
if (toAudio) {
|
|
406
413
|
this.client.muteLocal('video')
|
|
407
414
|
} else {
|
|
@@ -114,12 +114,14 @@ Component({
|
|
|
114
114
|
const TRTC_EVENT = this.TRTC.EVENT
|
|
115
115
|
// 初始化事件订阅
|
|
116
116
|
this.TRTC.on(TRTC_EVENT.LOCAL_JOIN, (event) => {
|
|
117
|
+
wx.statLog.sendStatLog(null, '本人加入房间')
|
|
117
118
|
this.triggerEvent('sendLog', logApi.logTypes.connect)
|
|
118
119
|
if (!this.properties.callback) {
|
|
119
120
|
this.triggerEvent('sendCallMessage')
|
|
120
121
|
}
|
|
121
122
|
})
|
|
122
123
|
this.TRTC.on(TRTC_EVENT.LOCAL_LEAVE, (event) => {
|
|
124
|
+
wx.statLog.sendStatLog(null, '本人离开房间')
|
|
123
125
|
this.triggerEvent("directHangup")
|
|
124
126
|
})
|
|
125
127
|
this.TRTC.on(TRTC_EVENT.ERROR, (event) => {
|
|
@@ -131,6 +133,7 @@ Component({
|
|
|
131
133
|
const {
|
|
132
134
|
userID
|
|
133
135
|
} = event.data
|
|
136
|
+
wx.statLog.sendStatLog(null, `${userID}加入房间`)
|
|
134
137
|
this.triggerEvent('updateVideoState', 'chatting')
|
|
135
138
|
this.triggerEvent('remoteUserJoin', `${userID}`)
|
|
136
139
|
}
|
|
@@ -141,6 +144,7 @@ Component({
|
|
|
141
144
|
userID,
|
|
142
145
|
playerList
|
|
143
146
|
} = event.data
|
|
147
|
+
wx.statLog.sendStatLog(null, `${userID}离开房间`)
|
|
144
148
|
this.triggerEvent('remoteUserLeave', `${userID}`)
|
|
145
149
|
this._updatePlayerList(playerList)
|
|
146
150
|
})
|
|
@@ -149,6 +153,7 @@ Component({
|
|
|
149
153
|
const {
|
|
150
154
|
player
|
|
151
155
|
} = event.data
|
|
156
|
+
wx.statLog.sendStatLog(null, `${player.userID}远端用户开始推送视频`)
|
|
152
157
|
this.triggerEvent('updateUserAudioStatus', {
|
|
153
158
|
userId: player.userID,
|
|
154
159
|
audio: false
|
|
@@ -163,6 +168,7 @@ Component({
|
|
|
163
168
|
const {
|
|
164
169
|
player
|
|
165
170
|
} = event.data
|
|
171
|
+
wx.statLog.sendStatLog(null, `${player.userID}远端用户停止推送视频`)
|
|
166
172
|
this.triggerEvent('updateUserAudioStatus', {
|
|
167
173
|
userId: player.userID,
|
|
168
174
|
audio: true
|
|
@@ -177,6 +183,7 @@ Component({
|
|
|
177
183
|
const {
|
|
178
184
|
player
|
|
179
185
|
} = event.data
|
|
186
|
+
wx.statLog.sendStatLog(null, `${player.userID}远端用户开始推送音频`)
|
|
180
187
|
this.setPlayerAttributesHandler(player, {
|
|
181
188
|
muteAudio: false
|
|
182
189
|
})
|
|
@@ -187,6 +194,7 @@ Component({
|
|
|
187
194
|
const {
|
|
188
195
|
player
|
|
189
196
|
} = event.data
|
|
197
|
+
wx.statLog.sendStatLog(null, `${player.userID}远端用户停止推送音频`)
|
|
190
198
|
this.setPlayerAttributesHandler(player, {
|
|
191
199
|
muteAudio: true
|
|
192
200
|
})
|
|
@@ -288,6 +296,7 @@ Component({
|
|
|
288
296
|
mainRemotePlayer: null,
|
|
289
297
|
remotePlayerList: null
|
|
290
298
|
})
|
|
299
|
+
wx.statLog.sendStatLog(null, '远端用户都离开了房间自己也需要离开房间,停止推送音视频')
|
|
291
300
|
// 此时房间内远端用户都离开了,需要自己也离开房间
|
|
292
301
|
this.setPusherAttributesHandler({
|
|
293
302
|
enableCamera: false,
|
|
@@ -296,13 +305,12 @@ Component({
|
|
|
296
305
|
}
|
|
297
306
|
},
|
|
298
307
|
switchAudioVideo(toAudio) {
|
|
308
|
+
wx.statLog.sendStatLog(null, `切换为${toAudio ? '音频' : '视频'}`)
|
|
299
309
|
if (toAudio) {
|
|
300
|
-
// this.TRTC.getPusherInstance().pause()
|
|
301
310
|
this.setPusherAttributesHandler({
|
|
302
311
|
enableCamera: false,
|
|
303
312
|
})
|
|
304
313
|
} else {
|
|
305
|
-
// this.TRTC.getPusherInstance().resume()
|
|
306
314
|
this.setPusherAttributesHandler({
|
|
307
315
|
enableCamera: true,
|
|
308
316
|
})
|