hh-doctor-sdk 0.0.1 → 0.0.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.
Files changed (24) hide show
  1. package/components/consultation/detail/behaviors/consultation-header-media-behaviors.js +23 -4
  2. package/components/consultation/detail/consultation-detail-page.wxml +9 -2
  3. package/components/consultation/detail/consultation-detail-page.wxss +21 -0
  4. package/components/consultation/list/consultation-list-page.js +35 -15
  5. package/components/consultation/list/consultation-list-page.wxml +1 -1
  6. package/components/consultation/list/consultation-list-page.wxss +0 -5
  7. package/components/hh-doctor.js +2 -2
  8. package/components/public/behaviors/order-base-behaviors.js +8 -0
  9. package/components/public/cache-data.js +5 -5
  10. package/components/public/im-manager.js +16 -21
  11. package/components/uikit/css/common.wxss +5 -0
  12. package/components/uikit/web-view-page/web-view-page.js +3 -3
  13. package/components/uikit/web-view-page/web-view-page.wxml +3 -3
  14. package/components/utils/uiUtil.js +7 -0
  15. package/components/video-chat/agora-rtc/agora-player/agora-player.wxml +4 -2
  16. package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.wxml +3 -3
  17. package/components/video-chat/agora-rtc/agora-rtc.wxml +6 -4
  18. package/components/video-chat/video-chat.wxml +3 -3
  19. package/components/video-chat/video-chat.wxss +3 -1
  20. package/components/video-chat-page/behaviors/chat-files-behaviors.js +21 -37
  21. package/components/video-chat-page/behaviors/video-chat-behaviors.js +0 -1
  22. package/components/video-chat-page/video-chat-page.js +3 -0
  23. package/components/video-chat-page/video-chat-page.wxml +1 -1
  24. package/package.json +1 -1
@@ -30,7 +30,7 @@ module.exports = Behavior({
30
30
  /**
31
31
  * 构建多媒体文件数据
32
32
  * @param {*} index 分组下标
33
- * @param {*} type 类型 0.图片 1.pdf 3.DICOM 4. 视频
33
+ * @param {*} type 类型 0.图片 1.pdf 2.DICOM 4.视频 5.URL DICOM
34
34
  * @param {*} label 显示标题
35
35
  * @param {*} files 文件列表
36
36
  */
@@ -76,6 +76,20 @@ module.exports = Behavior({
76
76
  groupIndex++
77
77
  }
78
78
  }
79
+ } else {
80
+ // url 类型组件为链接跳转,每个链接作为一个分组使用单独直接点击跳转
81
+ if (value.contentCaseImageList && value.contentCaseImageList.length > 0) {
82
+ const urlList = value.contentCaseImageList.map((res) => {
83
+ const groupItem = this.mediaItem(groupIndex, 5, res.imagedesc, [{
84
+ type: 'url',
85
+ 'url': res.imageurl,
86
+ thumb: 'https://image.hh-medic.com/icon/pacs/hh_consulation_dicom_icon.png'
87
+ }], 'https://image.hh-medic.com/icon/pacs/hh_consulation_dicom_icon.png', '点击查看')
88
+ groupIndex++
89
+ return groupItem
90
+ })
91
+ mediaGroups = mediaGroups.concat(urlList)
92
+ }
79
93
  }
80
94
  })
81
95
 
@@ -104,6 +118,9 @@ module.exports = Behavior({
104
118
  const {
105
119
  index
106
120
  } = event.detail
121
+ this.setData({
122
+ showPreview: true,
123
+ })
107
124
  const media = this.data.mediaInfo[index]
108
125
  if ([0, 4].includes(media.type)) { //图片或视频
109
126
  const firstPic = media.files[0].url //统一用构建的数据所以不能使用原始数据判断
@@ -120,14 +137,16 @@ module.exports = Behavior({
120
137
  sources: this.data._mediaFiles,
121
138
  })
122
139
  }
123
- this.setData({
124
- showPreview: true,
125
- })
126
140
  } else if (media.type == 1) { // PDF
127
141
  const files = media.files
128
142
  pdfViewer.viewPdfs(files)
129
143
  } else if (media.type == 2) {
130
144
  this.viewDicoms()
145
+ } else if (media.type == 5) {
146
+ if (media.files && media.files.length > 0) {
147
+ const url = media.files[0].url
148
+ hhNavigation.webPage(url)
149
+ }
131
150
  }
132
151
  },
133
152
 
@@ -1,12 +1,19 @@
1
1
  <import src="../detail/widget/chat-cell-template/chat-cell-template" />
2
- <view class="match-parent">
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
+ >
3
10
  <scroll-view class="scroll-view" scroll-y scroll-into-view="{{scrollTo}}">
4
11
  <view class="consultation-header" wx:if="{{order}}">
5
12
  <block wx:for="{{headerTexts}}" wx:key="text">
6
13
  <detail-text
7
14
  label="{{item.label}}"
8
15
  content="{{item.content || ''}}"
9
- ></detail-text>
16
+ />
10
17
  </block>
11
18
  <scroll-view
12
19
  wx:if="{{mediaInfo.length > 0}}"
@@ -6,6 +6,11 @@ page {
6
6
  height: 100%;
7
7
  }
8
8
 
9
+ .body-display {
10
+ display: flex;
11
+ flex-direction: column;
12
+ }
13
+
9
14
  .message-bottom {
10
15
  width: 100%;
11
16
  height: 80rpx;
@@ -49,3 +54,19 @@ page {
49
54
  display: flex;
50
55
  flex-direction: column;
51
56
  }
57
+
58
+ .set-time-tip {
59
+ display: flex;
60
+ flex-direction: row;
61
+ background-color: #fffae6;
62
+ padding: 20rpx 30rpx;
63
+ color: #f01414;
64
+ align-items: center;
65
+ font-size: 30rpx;
66
+ }
67
+
68
+ .set-time-tip-image {
69
+ width: 30rpx;
70
+ height: 30rpx;
71
+ margin-right: 10rpx;
72
+ }
@@ -1,5 +1,7 @@
1
1
  const doctorLoader = require('../../public/doctor-loader')
2
-
2
+ const {
3
+ judgeLogin
4
+ } = require('../../utils/uiUtil')
3
5
  Page({
4
6
 
5
7
 
@@ -16,16 +18,7 @@ Page({
16
18
  * 生命周期函数--监听页面加载
17
19
  */
18
20
  onLoad(options) {
19
- wx.statLog.sendStatLog(null, '打开咨询单列表界面')
20
- const doctorId = options.doctorId
21
- doctorLoader.loadDoctor({
22
- doctorId: doctorId,
23
- isTest: options.isTest,
24
- }, (result) => {
25
- if (result) {
26
- this.loadList()
27
- }
28
- })
21
+
29
22
  },
30
23
 
31
24
  /**
@@ -37,11 +30,38 @@ Page({
37
30
  * 生命周期函数--监听页面显示
38
31
  */
39
32
  onShow() {
40
- if (this.data.needRefresh) {
41
- this.setData({
42
- needRefresh: false,
33
+ if (judgeLogin()) {
34
+ wx.statLog.sendStatLog(null, '打开咨询单列表界面')
35
+ const doctorId = wx.getStorageSync('doctorId') || ''
36
+ const isTest = (getApp().globalData.profileName || 'prod') == 'test'
37
+ doctorLoader.loadDoctor({
38
+ doctorId: doctorId,
39
+ isTest: isTest,
40
+ }, (result) => {
41
+ if (result) {
42
+ this.loadList()
43
+ }
44
+ })
45
+ } else {
46
+ wx.showModal({
47
+ showCancel: true,
48
+ cancelText: '取消',
49
+ confirmText: '去登录',
50
+ confirmColor: "#0066ff",
51
+ content: "您还未登录,是否去登录?",
52
+ complete: (res) => {
53
+ if (res.cancel) {
54
+ wx.switchTab({
55
+ url: '/pages/recommend/recommend',
56
+ })
57
+ }
58
+ if (res.confirm) {
59
+ wx.navigateTo({
60
+ url: '/pkgMine/pages/mine/loginpage',
61
+ })
62
+ }
63
+ }
43
64
  })
44
- this.loadList()
45
65
  }
46
66
  },
47
67
 
@@ -9,7 +9,7 @@
9
9
  <view wx:if="{{group.showSection}}" class="order-group"
10
10
  >{{group.title}}</view
11
11
  >
12
- <view class="order-list">
12
+ <view class="chatting-body">
13
13
  <block
14
14
  wx:for="{{group.list}}"
15
15
  wx:key="order"
@@ -17,11 +17,6 @@ page {
17
17
  flex-direction: column;
18
18
  }
19
19
 
20
- .order-list {
21
- display: flex;
22
- flex-direction: column;
23
- }
24
-
25
20
  .order-group {
26
21
  font-size: 28rpx;
27
22
  color: #333333;
@@ -10,7 +10,7 @@ function initTim() {
10
10
  return
11
11
  }
12
12
  const imManager = require('./public/im-manager')
13
- imManager.init()
13
+ // imManager.init()
14
14
  wx.hhImManager = imManager
15
15
  }
16
16
 
@@ -25,7 +25,7 @@ function initSDK() {
25
25
  initStatLog()
26
26
  initEventBus()
27
27
  initTim()
28
- wx.baseNavigationPath = '/miniprogram_npm/hh-sdk-test-demo/'
28
+ wx.baseNavigationPath = '/miniprogram_npm/hh-doctor-sdk/'
29
29
  }
30
30
 
31
31
  module.exports = {
@@ -9,6 +9,7 @@ module.exports = Behavior({
9
9
  orderId: null, // 订单Id
10
10
  order: null, // 订单
11
11
  feedbackStar: null,
12
+ notifySetVideoTime: false,
12
13
  },
13
14
 
14
15
  methods: {
@@ -29,9 +30,16 @@ module.exports = Behavior({
29
30
  wx.hideLoading()
30
31
  const order = res.data.order
31
32
  const feedbackStar = res.data.feedbackStar
33
+ let notifySetVideoTime = false
34
+ if (order && order.orderService && order.orderService.provideType === 'video') {
35
+ if ((order.provideTime || 0) < 1000) {
36
+ notifySetVideoTime = true
37
+ }
38
+ }
32
39
  this.setData({
33
40
  order: order,
34
41
  feedbackStar: feedbackStar,
42
+ notifySetVideoTime: notifySetVideoTime,
35
43
  }, () => {
36
44
  if (callback) {
37
45
  callback()
@@ -3,11 +3,11 @@ function cache(data) {
3
3
  if (data.doctorId && data.doctorId !== null && data.doctorId !== '') {
4
4
  generateSessionId()
5
5
  }
6
- if (data.doctor != null) {
7
- const token = data.doctor.videoToken
8
- const uuid = data.doctor.uuid
9
- wx.hhImManager.loginIm(uuid, token)
10
- }
6
+ // if (data.doctor != null) {
7
+ // const token = data.doctor.videoToken
8
+ // const uuid = data.doctor.uuid
9
+ // wx.hhImManager.loginIm(uuid, token)
10
+ // }
11
11
  const newData = Object.assign(doctorOptions, data)
12
12
  wx.doctorOptions = newData
13
13
  }
@@ -10,9 +10,6 @@ const hhNavigation = require('../hh-navigation')
10
10
  const cache = require('../public/cache-data')
11
11
 
12
12
  var chat
13
- var isLogined = false
14
- var isReady = false
15
- var isInit = false
16
13
 
17
14
  let onMessageReceived = function (event) {
18
15
  const messageList = event.data;
@@ -30,7 +27,6 @@ let onMessageReceived = function (event) {
30
27
  } catch (ex) {
31
28
 
32
29
  }
33
-
34
30
  }
35
31
  });
36
32
  };
@@ -47,29 +43,32 @@ function onMessage(message) {
47
43
 
48
44
  let onSdkReady = function (event) {
49
45
  wx.statLog.sendStatLog(null, `IM SDK Ready`)
50
- isReady = true
51
46
  };
52
47
 
53
48
  let onSdkNotReady = function (event) {
54
49
  wx.statLog.sendStatLog(null, `IM SDK Not Ready ${JSON.stringify(event)}`)
55
- isReady = false
50
+ console.error('销毁腾讯IM实例 onSdkNotReady')
56
51
  };
57
52
 
58
53
  function init() {
59
- if (isInit) {
54
+ if (chat != null) {
60
55
  return
61
56
  }
62
57
  wx.statLog.sendStatLog(null, `初始化 IM 管理类`)
58
+ console.error('初始化 IM 管理类')
63
59
  let options = {
64
60
  SDKAppID: '1400073238'
65
61
  }
66
62
  chat = TencentCloudChat.create(options)
67
63
  chat.setLogLevel(0)
68
-
69
64
  chat.on(TencentCloudChat.EVENT.SDK_READY, onSdkReady);
70
65
  chat.on(TencentCloudChat.EVENT.SDK_NOT_READY, onSdkNotReady);
71
66
  chat.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessageReceived);
72
- isInit = true
67
+
68
+
69
+ const uuid = cache.uuid()
70
+ const token = cache.videoToken()
71
+ loginIm(uuid, token)
73
72
  }
74
73
 
75
74
  /**
@@ -78,13 +77,13 @@ function init() {
78
77
  * @param {*} userSig 用户UserSign
79
78
  */
80
79
  function loginIm(userID, userSig) {
81
- wx.statLog.sendStatLog(null, `开始登录腾讯IM`)
80
+ wx.statLog.sendStatLog(null, '开始登录腾讯IM')
81
+ console.error('开始登录腾讯IM')
82
82
  if (chat) {
83
83
  chat.login({
84
84
  userID: userID.toString(),
85
85
  userSig
86
86
  }).then((res) => {
87
- isLogined = true
88
87
  wx.eventBus.post({
89
88
  params: {
90
89
  result: true
@@ -97,7 +96,7 @@ function loginIm(userID, userSig) {
97
96
  wx.statLog.sendStatLog(null, `登录腾讯IM完成`)
98
97
  }).catch((error) => {
99
98
  wx.statLog.sendStatLog(null, `登录腾讯IM失败 ${JSON.stringify(error)}`)
100
- isLogined = false
99
+ // isLogined = false
101
100
  wx.eventBus.post({
102
101
  params: {
103
102
  result: false
@@ -109,20 +108,16 @@ function loginIm(userID, userSig) {
109
108
  }
110
109
 
111
110
  function logoutIm() {
112
- if (isLogined) {
113
- if (chat) {
114
- chat.logout().then(() => {
115
- isLogined = false
116
- }).catch(() => {
117
- isLogined = false
118
- })
119
- }
111
+ if (chat) {
112
+ chat.logout().then(() => {}).catch(() => {})
120
113
  }
121
114
  }
122
115
 
123
116
  function destory() {
124
117
  if (chat) {
125
- chat.destory()
118
+ console.error('销毁腾讯IM实例')
119
+ chat.destroy()
120
+ chat = null
126
121
  }
127
122
  }
128
123
 
@@ -11,9 +11,14 @@
11
11
  position: absolute;
12
12
  }
13
13
 
14
+ .position-relative {
15
+ position: relative;
16
+ }
17
+
14
18
  .scroll-view {
15
19
  width: 100%;
16
20
  height: 100%;
21
+ overflow: scroll;
17
22
  margin-bottom: constant(safe-area-inset-bottom); /* 兼容 IOS<11.2 */
18
23
  margin-bottom: env(safe-area-inset-bottom); /* 兼容 IOS>11.2 */
19
24
  }
@@ -71,16 +71,16 @@ Page({
71
71
 
72
72
  },
73
73
 
74
- _bindMessage(data) {
74
+ bindMessage(data) {
75
75
 
76
76
  },
77
77
 
78
- _bindLoad(data) {
78
+ bindLoad(data) {
79
79
  const url = data.detail.src
80
80
  wx.hideLoading()
81
81
  },
82
82
 
83
- _bindError(data) {
83
+ bindError(data) {
84
84
  wx.hideLoading()
85
85
  wx.navigateBack()
86
86
  }
@@ -1,6 +1,6 @@
1
1
  <web-view
2
2
  src="{{url}}"
3
- bindmessage="_bindMessage"
4
- bindload="_bindLoad"
5
- binderror="_bindError"
3
+ bindmessage="bindMessage"
4
+ bindload="bindLoad"
5
+ binderror="bindError"
6
6
  ></web-view>
@@ -0,0 +1,7 @@
1
+ function judgeLogin() {
2
+ return true
3
+ }
4
+
5
+ module.exports = {
6
+ judgeLogin,
7
+ }
@@ -1,7 +1,9 @@
1
- <view class="{{showSmall ? 'remote_small' : 'match-parent position-absolute'}}">
1
+ <view
2
+ class="{{showSmall ? 'remote_small position-relative' : 'match-parent position-absolute'}}"
3
+ >
2
4
  <live-player
3
5
  wx:if="{{uid}}"
4
- class="{{showSmall ? 'remote_small' : 'match-parent position-absolute'}}"
6
+ class="match-parent"
5
7
  id="player-{{uid}}"
6
8
  uid="{{uid}}"
7
9
  debug="{{false}}"
@@ -1,10 +1,10 @@
1
1
  <view
2
2
  style="margin-top: {{chatting ? smallVideoTop : 0}}px;"
3
- class="{{chatting ? 'local-view' : 'match-parent black-background position-absolute'}}"
3
+ class="{{chatting ? 'local-view position-relative' : 'match-parent black-background position-absolute'}}"
4
4
  >
5
5
  <live-pusher
6
6
  wx:if="{{url}}"
7
- class="match-parent position-absolute"
7
+ class="match-parent"
8
8
  url="{{url}}"
9
9
  debug="{{false}}"
10
10
  mode="RTC"
@@ -16,7 +16,7 @@
16
16
  enable-camera="{{true}}"
17
17
  bindstatechange="recorderStateChange"
18
18
  />
19
- <view wx:if="{{isInVoice}}" class="cover-view small">
19
+ <view wx:if="{{isInVoice}}" class="cover-view position-absolute small">
20
20
  <image class="pusher-cover-image" src="{{expertAvatar}}" />
21
21
  </view>
22
22
  </view>
@@ -8,7 +8,9 @@
8
8
  bindnetstatus="onPlayerNetstatus"
9
9
  bindstatechange="onPlayerStatechange"
10
10
  />
11
- <view class="{{mainRemotePlayer ? 'small-item-container' :'fullscreen'}}">
11
+ <view
12
+ class="{{mainRemotePlayer ? 'small-item-container position-absolute' :'fullscreen'}}"
13
+ >
12
14
  <agora-pusher
13
15
  wx:if="{{pusher}}"
14
16
  id="rtc-pusher"
@@ -20,7 +22,7 @@
20
22
  chatting="{{mainRemotePlayer != null}}"
21
23
  isInVoice="{{isInVoice}}"
22
24
  />
23
- <view
25
+ <block
24
26
  wx:if="{{remotePlayerList}}"
25
27
  wx:for="{{remotePlayerList}}"
26
28
  wx:key="uid"
@@ -28,12 +30,12 @@
28
30
  <agora-player
29
31
  wx:if="{{item}}"
30
32
  id="rtc-player-{{item.uid}}"
31
- showSmall="{{false}}"
33
+ showSmall="{{true}}"
32
34
  uid="{{item.uid}}"
33
35
  url="{{item.url}}"
34
36
  isInVoice="{{isInVoice}}"
35
37
  bindnetstatus="onPlayerNetstatus"
36
38
  bindstatechange="onPlayerStatechange"
37
39
  />
38
- </view>
40
+ </block>
39
41
  </view>
@@ -14,7 +14,7 @@
14
14
  >
15
15
  <view
16
16
  style="margin-top: {{mainRemotePlayer ? smallVideoTop : 0}}px;"
17
- class="{{mainRemotePlayer ? 'local-view' : 'match-parent position-absolute'}}"
17
+ class="{{mainRemotePlayer ? 'local-view position-relative' : 'match-parent position-absolute'}}"
18
18
  >
19
19
  <live-pusher
20
20
  class="match-parent"
@@ -37,7 +37,7 @@
37
37
  <image class="pusher-cover-image" src="{{expertAvatar}}" />
38
38
  </view>
39
39
  </view>
40
- <view
40
+ <block
41
41
  wx:if="{{remotePlayerList}}"
42
42
  wx:for="{{remotePlayerList}}"
43
43
  wx:key="userID"
@@ -52,5 +52,5 @@
52
52
  bind:playerNetStatus="_playerNetStatus"
53
53
  bind:playerAudioVolumeNotify="_playerAudioVolumeNotify"
54
54
  />
55
- </view>
55
+ </block>
56
56
  </view>
@@ -1,6 +1,8 @@
1
1
  @import "../uikit/css/common.wxss";
2
2
 
3
3
  .small-item-container {
4
+ display: flex;
5
+ flex-direction: column;
4
6
  position: absolute;
5
7
  right: 10rpx;
6
8
  top: 10rpx;
@@ -8,7 +10,6 @@
8
10
  }
9
11
 
10
12
  .local-view {
11
- position: absolute;
12
13
  width: 100%;
13
14
  height: 300rpx;
14
15
  }
@@ -78,6 +79,7 @@
78
79
  width: 100%;
79
80
  height: 300rpx;
80
81
  margin-top: 20rpx;
82
+ position: absolute;
81
83
  }
82
84
 
83
85
  .voice-mode-avatar {
@@ -2,7 +2,6 @@ const dicomApi = require('../../apis/dicom-api')
2
2
  const pdfViewer = require('../../public/pdf-viewer')
3
3
  const hhNavigation = require('../../hh-navigation')
4
4
  const orderApi = require('../../apis/order-app-api')
5
- const caseImageFilter = require('../../consultation/detail/widget/case-image-filter')
6
5
 
7
6
  module.exports = Behavior({
8
7
  data: {
@@ -25,7 +24,21 @@ module.exports = Behavior({
25
24
  const type = component.type
26
25
  const fileList = component.contentCaseImageList
27
26
  if (type === 'url') {
28
-
27
+ // url 类型组件为链接跳转,每个链接作为一个分组使用单独直接点击跳转
28
+ if (fileList && fileList.length > 0) {
29
+ const urlFileList = fileList.map((res) => {
30
+ const item = {
31
+ type: 'url',
32
+ 'url': res.imageurl,
33
+ thumb: 'https://image.hh-medic.com/icon/pacs/hh_consulation_dicom_icon.png'
34
+ }
35
+ return item
36
+ })
37
+ groups.push({
38
+ title: component.name,
39
+ files: urlFileList
40
+ })
41
+ }
29
42
  } else {
30
43
  let images = fileList.filter((file) => !file.imageurl.includes('.pdf'))
31
44
  let pdfs = fileList.filter((file) => file.imageurl.includes('.pdf')) //imagedesc
@@ -115,6 +128,11 @@ module.exports = Behavior({
115
128
  }],
116
129
  mediaFiles: mediaFiles
117
130
  })
131
+ } else {
132
+ resolve({
133
+ caseGroups: [],
134
+ mediaFiles: []
135
+ })
118
136
  }
119
137
  }).catch((err) => {
120
138
  resolve({
@@ -129,6 +147,7 @@ module.exports = Behavior({
129
147
  })
130
148
 
131
149
  Promise.all(promises).then((res) => {
150
+ wx.hideLoading()
132
151
  let caseGroups = []
133
152
  let mediaFiles = []
134
153
  for (const result of res) {
@@ -168,40 +187,8 @@ module.exports = Behavior({
168
187
  }
169
188
  const files = this.data.pdfFiles
170
189
  pdfViewer.viewPdfs(files)
171
- // if (files.length == 1) {
172
- // this.viewPdf(files[0].url)
173
- // } else {
174
- // const items = files.map((file) => {
175
- // return file.name
176
- // })
177
- // wx.showActionSheet({
178
- // itemList: items,
179
- // success: (res) => {
180
- // const url = files[res.tapIndex].url
181
- // this.viewPdf(url)
182
- // },
183
- // fail: function (ers) {
184
-
185
- // }
186
- // })
187
- // }
188
190
  },
189
191
 
190
- // viewPdf(url) {
191
- // wx.downloadFile({
192
- // url: url,
193
- // success: function (res) {
194
- // const filePath = res.tempFilePath
195
- // wx.openDocument({
196
- // filePath: filePath,
197
- // success: function () {
198
-
199
- // }
200
- // })
201
- // }
202
- // })
203
- // },
204
-
205
192
  viewDicoms() {
206
193
  if (this.data.dicoms.length == 0) {
207
194
  wx.showToast({
@@ -235,9 +222,6 @@ module.exports = Behavior({
235
222
  viewDicom(id) {
236
223
  const url = dicomApi.dicomUrl(id)
237
224
  hhNavigation.webPage(url)
238
- // wx.navigateTo({
239
- // url: `/components/uikit/web-view-page/web-view-page?url=${encodeURIComponent(url)}`,
240
- // })
241
225
  },
242
226
  }
243
227
  })
@@ -303,7 +303,6 @@ module.exports = Behavior({
303
303
  newCases: false
304
304
  })
305
305
  this.loadFiles(this.data.order, () => {
306
- wx.hideLoading()
307
306
  this.selectComponent('#casePop').show()
308
307
  })
309
308
  },
@@ -31,6 +31,7 @@ Page({
31
31
  if (!this.checkParams(options)) {
32
32
  return
33
33
  }
34
+ wx.hhImManager.init()
34
35
  this._sendLog('打开呼叫界面')
35
36
  wx.statLog.sendStatLog(this.data.orderId, '打开呼叫界面')
36
37
  this.bindIMMessageEvent()
@@ -64,6 +65,7 @@ Page({
64
65
  */
65
66
  onUnload() {
66
67
  this.unBindIMMessageEvent()
68
+ wx.hhImManager.destroy()
67
69
  },
68
70
 
69
71
  /**
@@ -135,6 +137,7 @@ Page({
135
137
  event: imManager.EventNames.IMCustomMessage,
136
138
  'listener': (params) => {
137
139
  wx.statLog.sendStatLog(this.data.orderId, `收到IM消息(${JSON.stringify(params)})`)
140
+ console.error(`收到IM消息(${JSON.stringify(params)})`)
138
141
  if (params) {
139
142
  this.onMessage(params.command)
140
143
  }
@@ -81,7 +81,7 @@
81
81
  bind:clickMedia="clickMedia"
82
82
  title="{{item.title}}"
83
83
  files="{{item.files}}"
84
- ></case-group>
84
+ />
85
85
  </block>
86
86
  </scroll-view>
87
87
  </view>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-doctor-sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "和缓名医小程序SDK",
5
5
  "devDependencies": {},
6
6
  "scripts": {