@aochuang/client-sdk 1.0.363 → 1.0.364

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 (168) hide show
  1. package/components/index.js +1 -6
  2. package/components/layout/layout.vue +4 -1
  3. package/components/session-select/session-select-item.vue +9 -8
  4. package/components/wechat-chat-control/image/image.vue +8 -13
  5. package/components/wechat-chat-control/url/url-miniprogram.vue +5 -1
  6. package/components/wework-chat-control/channel-live/channel-live.vue +2 -7
  7. package/components/wework-chat-control/company-card/company-card.vue +1 -1
  8. package/components/wework-chat-control/custom-expression/custom-expression.vue +1 -2
  9. package/components/wework-chat-control/file-url/file-url.vue +16 -34
  10. package/components/wework-chat-control/image/image.vue +2 -137
  11. package/components/wework-chat-control/index.js +7 -15
  12. package/components/wework-chat-control/location/location.vue +3 -3
  13. package/components/wework-chat-control/red-envelopes/red-envelopes.vue +2 -3
  14. package/components/wework-chat-control/text/text.vue +144 -24
  15. package/components/wework-chat-control/url/url-miniprogram.vue +7 -6
  16. package/components/wework-chat-control/url/url.vue +2 -26
  17. package/components/wework-chat-control/util.js +17 -26
  18. package/components/wework-chat-control/video/video.vue +2 -10
  19. package/components/wework-chat-control/voice/voice.vue +2 -9
  20. package/components/wework-chat-panel/chat-panel-controls/company-card/company-card.vue +35 -0
  21. package/components/wework-chat-panel/chat-panel-controls/expression/expression.vue +36 -0
  22. package/components/wework-chat-panel/chat-panel-controls/file-url/file-url.vue +35 -0
  23. package/components/wework-chat-panel/chat-panel-controls/image/image.vue +36 -0
  24. package/components/wework-chat-panel/chat-panel-controls/index.js +35 -0
  25. package/components/wework-chat-panel/chat-panel-controls/jx-sys-text/jx-sys-text.vue +28 -0
  26. package/components/wework-chat-panel/chat-panel-controls/link/link.vue +35 -0
  27. package/components/wework-chat-panel/chat-panel-controls/location/location.vue +35 -0
  28. package/components/wework-chat-panel/chat-panel-controls/text/text.vue +43 -0
  29. package/components/wework-chat-panel/chat-panel-controls/unkonw/unkonw.vue +39 -0
  30. package/components/wework-chat-panel/chat-panel-controls/video/video.vue +37 -0
  31. package/components/wework-chat-panel/chat-panel-controls/voice/voice.vue +35 -0
  32. package/components/wework-chat-panel/chat-panel-item.vue +25 -56
  33. package/components/wework-chat-panel/chat-panel.vue +13 -96
  34. package/package.json +3 -10
  35. package/services/client-chat/client-chat-wechat/client-chat-session.js +196 -92
  36. package/services/client-chat/client-chat-wechat/client-chat.js +20 -33
  37. package/services/client-chat/client-chat-wework/client-chat-account.js +1 -84
  38. package/services/client-chat/client-chat-wework/client-chat-concats.js +17 -81
  39. package/services/client-chat/client-chat-wework/client-chat-message.js +5 -45
  40. package/services/client-chat/client-chat-wework/client-chat-session.js +4 -59
  41. package/services/client-chat/client-chat-wework/client-chat-socket.js +1 -13
  42. package/services/client-chat/client-chat-wework/client-chat.js +11 -320
  43. package/services/client-chat/client-chat-wework/utils.js +5 -5
  44. package/uni-common/account-portray/account-portray.vue +51 -0
  45. package/uni-common/account-select/account-select-item.vue +172 -0
  46. package/uni-common/account-select/account-select.vue +252 -0
  47. package/uni-common/all-friend-avatar/all-friend-avatar.vue +49 -0
  48. package/uni-common/friend-avatar/default.svg +1 -0
  49. package/uni-common/friend-avatar/friend-avatar.vue +27 -0
  50. package/uni-common/friend-avatar/index.js +3 -0
  51. package/uni-common/friend-loader/friend-loader.vue +53 -0
  52. package/uni-common/friend-portray/friend-portray.vue +56 -0
  53. package/uni-common/group-avatar/default.svg +1 -0
  54. package/uni-common/group-avatar/group-avatar.vue +18 -0
  55. package/uni-common/group-avatar/index.js +3 -0
  56. package/uni-common/room-avatar/default.svg +6 -0
  57. package/uni-common/room-avatar/index.js +3 -0
  58. package/uni-common/room-avatar/room-avatar.vue +27 -0
  59. package/uni-common/room-loader/room-loader.vue +53 -0
  60. package/uni-common/room-portray/room-portray.vue +56 -0
  61. package/uni-components/chat-control/calling/calling.vue +91 -0
  62. package/uni-components/chat-control/calling/phone-fill.svg +1 -0
  63. package/uni-components/chat-control/calling/vidicon-fill.svg +1 -0
  64. package/uni-components/chat-control/channel-video/channel-video.vue +89 -0
  65. package/uni-components/chat-control/channel-video-card/channel-video-card.vue +105 -0
  66. package/uni-components/chat-control/channel-video-live/channel-video-live.vue +92 -0
  67. package/uni-components/chat-control/chat-control-config-item/chat-control-config-item.vue +20 -0
  68. package/uni-components/chat-control/chat-control-config-item/index.js +3 -0
  69. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-app.vue +25 -0
  70. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-h5.vue +21 -0
  71. package/{components/wework-chat-control/wework-chat-control-config.vue → uni-components/chat-control/chat-control-config.vue} +13 -16
  72. package/uni-components/chat-control/chat-control.vue +218 -0
  73. package/uni-components/chat-control/company-card/company-card.vue +123 -0
  74. package/uni-components/chat-control/const.js +28 -0
  75. package/uni-components/chat-control/expression/expression.vue +41 -0
  76. package/uni-components/chat-control/image/image.vue +68 -0
  77. package/uni-components/chat-control/index.js +89 -0
  78. package/uni-components/chat-control/location/location.vue +110 -0
  79. package/uni-components/chat-control/member-change/member-change.vue +32 -0
  80. package/uni-components/chat-control/quote-message/quote-message.vue +216 -0
  81. package/uni-components/chat-control/real-time-position/real-time-position.vue +62 -0
  82. package/uni-components/chat-control/redpacket/red-envelope.svg +1 -0
  83. package/uni-components/chat-control/redpacket/redpacket.vue +75 -0
  84. package/uni-components/chat-control/share-card/share-card.vue +101 -0
  85. package/uni-components/chat-control/system/system.vue +69 -0
  86. package/uni-components/chat-control/system-batch-message/system-batch-message.vue +30 -0
  87. package/uni-components/chat-control/system-text/system-text.vue +32 -0
  88. package/uni-components/chat-control/text/text.vue +67 -0
  89. package/uni-components/chat-control/text-with-at/text-with-at.vue +51 -0
  90. package/uni-components/chat-control/transfer/red-transfer.svg +1 -0
  91. package/uni-components/chat-control/transfer/transfer.vue +80 -0
  92. package/uni-components/chat-control/unkonw/unkonw.vue +37 -0
  93. package/uni-components/chat-control/url/icons/file-excel-line.svg +1 -0
  94. package/uni-components/chat-control/url/icons/file-info-line.svg +1 -0
  95. package/uni-components/chat-control/url/icons/file-music-line.svg +1 -0
  96. package/uni-components/chat-control/url/icons/file-pdf-line.svg +1 -0
  97. package/uni-components/chat-control/url/icons/file-ppt-line.svg +1 -0
  98. package/uni-components/chat-control/url/icons/file-settings-line.svg +1 -0
  99. package/uni-components/chat-control/url/icons/file-text-line.svg +1 -0
  100. package/uni-components/chat-control/url/icons/file-unknow-line.svg +1 -0
  101. package/uni-components/chat-control/url/icons/file-word-line.svg +1 -0
  102. package/uni-components/chat-control/url/icons/file-zip-line.svg +1 -0
  103. package/uni-components/chat-control/url/icons/index.js +24 -0
  104. package/uni-components/chat-control/url/miniprogram.svg +1 -0
  105. package/uni-components/chat-control/url/url-miniprogram.vue +116 -0
  106. package/uni-components/chat-control/url/url.vue +306 -0
  107. package/uni-components/chat-control/url-new/icons/file-excel-line.svg +1 -0
  108. package/uni-components/chat-control/url-new/icons/file-info-line.svg +1 -0
  109. package/uni-components/chat-control/url-new/icons/file-music-line.svg +1 -0
  110. package/uni-components/chat-control/url-new/icons/file-pdf-line.svg +1 -0
  111. package/uni-components/chat-control/url-new/icons/file-ppt-line.svg +1 -0
  112. package/uni-components/chat-control/url-new/icons/file-settings-line.svg +1 -0
  113. package/uni-components/chat-control/url-new/icons/file-text-line.svg +1 -0
  114. package/uni-components/chat-control/url-new/icons/file-unknow-line.svg +1 -0
  115. package/uni-components/chat-control/url-new/icons/file-word-line.svg +1 -0
  116. package/uni-components/chat-control/url-new/icons/file-zip-line.svg +1 -0
  117. package/uni-components/chat-control/url-new/icons/index.js +24 -0
  118. package/uni-components/chat-control/url-new/url-new.vue +110 -0
  119. package/uni-components/chat-control/utils.js +12 -0
  120. package/uni-components/chat-control/video/video.vue +156 -0
  121. package/uni-components/chat-control/voice/voice.vue +166 -0
  122. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-collect.vue +84 -0
  123. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-system.vue +28 -0
  124. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet.vue +85 -0
  125. package/uni-components/chat-editor/chat-editor-func/chat-editor-func.vue +157 -0
  126. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at-panel.vue +158 -0
  127. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at.vue +61 -0
  128. package/uni-components/chat-editor/chat-editor-func-button/chat-editor-func-button.vue +58 -0
  129. package/uni-components/chat-editor/chat-editor-func-file/chat-editor-func-file.vue +54 -0
  130. package/uni-components/chat-editor/chat-editor-func-image/chat-editor-func-image.vue +42 -0
  131. package/uni-components/chat-editor/chat-editor-func-video/chat-editor-func-video.vue +42 -0
  132. package/uni-components/chat-editor/chat-editor-func-voice/chat-editor-func-voice.vue +25 -0
  133. package/uni-components/chat-editor/chat-editor-message-send/chat-editor-message-send.vue +158 -0
  134. package/uni-components/chat-editor/chat-editor-quote/chat-editor-quote.vue +75 -0
  135. package/uni-components/chat-editor/chat-editor.vue +257 -0
  136. package/uni-components/chat-editor/index.js +10 -0
  137. package/uni-components/chat-editor/util.js +65 -0
  138. package/uni-components/chat-panel/chat-panel-chats-box.vue +238 -0
  139. package/uni-components/chat-panel/chat-panel-chats-forward/chat-panel-chats-forward.vue +273 -0
  140. package/uni-components/chat-panel/chat-panel-chats-item.vue +578 -0
  141. package/uni-components/chat-panel/chat-panel-chats-status/chat-panel-chats-status.vue +71 -0
  142. package/uni-components/chat-panel/chat-panel-chats.vue +368 -0
  143. package/uni-components/chat-panel/chat-panel.vue +227 -0
  144. package/uni-components/contacts-group-select/contacts-group-select-item.vue +85 -0
  145. package/uni-components/contacts-group-select/contacts-group-select-panel.vue +119 -0
  146. package/uni-components/contacts-group-select/contacts-group-select.vue +150 -0
  147. package/common/.DS_Store +0 -0
  148. package/components/.DS_Store +0 -0
  149. package/components/wechat-chat-control/.DS_Store +0 -0
  150. package/components/wechat-chat-control/transfer/.DS_Store +0 -0
  151. package/components/wechat-chat-control/url/.DS_Store +0 -0
  152. package/components/wechat-chat-control/voice/.DS_Store +0 -0
  153. package/components/wework-chat-control/channel-card/channel-card.vue +0 -144
  154. package/components/wework-chat-control/link/.DS_Store +0 -0
  155. package/components/wework-chat-control/merge-message/merge-message-panel.vue +0 -63
  156. package/components/wework-chat-control/merge-message/merge-message.vue +0 -84
  157. package/components/wework-chat-control/merge-message/util.js +0 -59
  158. package/components/wework-chat-control/metting/enterprise-wechat.png +0 -0
  159. package/components/wework-chat-control/metting/meeting-video.svg +0 -4
  160. package/components/wework-chat-control/metting/metting.vue +0 -181
  161. package/components/wework-chat-control/text/text-default.vue +0 -99
  162. package/components/wework-chat-control/text/text-quote.vue +0 -105
  163. package/components/wework-chat-control/url/url-channel-live.vue +0 -53
  164. package/components/wework-chat-control/video/.DS_Store +0 -0
  165. package/components/wework-chat-control/wework-chat-control-config-item.vue +0 -24
  166. package/components/wework-chat-control/wework-chat-control-config-msg.vue +0 -25
  167. package/components/wework-chat-panel/chat-panel-chat-status/chat-panel-chat-status.vue +0 -73
  168. package/services/.DS_Store +0 -0
@@ -11,7 +11,6 @@ import ChatLayout from './chat-layout'
11
11
  import ChatFriendProfile from './chat-friend-profile'
12
12
  import ChatRoomProfile from './chat-room-profile'
13
13
  import { chatControls as WechatChatControls, WechatChatControlConfig, WechatChatControlConfigMsg, WechatChatControlConfigItem } from './wechat-chat-control'
14
- import { chatControls as WeworkChatControls, WeworkChatControlConfig, WeworkChatControlConfigMsg, WeworkChatControlConfigItem } from './wework-chat-control'
15
14
  import { MESSAGE_TYPE, formatShortMessage, formatShortSessionMessage } from './wechat-chat-control/util'
16
15
  import { MESSAGE_TYPE as MESSAGE_TYPE_W } from './wework-chat-control/util'
17
16
 
@@ -22,10 +21,6 @@ export default {
22
21
  WechatChatControlConfig,
23
22
  WechatChatControlConfigMsg,
24
23
  WechatChatControlConfigItem,
25
- WeworkChatControls,
26
- WeworkChatControlConfig,
27
- WeworkChatControlConfigMsg,
28
- WeworkChatControlConfigItem,
29
24
  MESSAGE_TYPE,
30
25
  MESSAGE_TYPE_W,
31
26
  AccountSelect,
@@ -45,4 +40,4 @@ export default {
45
40
  ChatRoomProfile,
46
41
  WechatChatPanel,
47
42
  WeworkChatPanel
48
- }
43
+ }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="sdk-layout">
3
- <div class="sdk-layout__sidebar" v-if="$slots.sidebar">
3
+ <div class="sdk-layout__sidebar" v-show="!hideSidebar" v-if="$slots.sidebar">
4
4
  <slot name="sidebar"></slot>
5
5
  </div>
6
6
  <div class="sdk-layout__wrap">
@@ -38,6 +38,9 @@ export default {
38
38
  initialSize: {
39
39
  type: Number,
40
40
  default: 270
41
+ },
42
+ hideSidebar: {
43
+ type: Boolean
41
44
  }
42
45
  },
43
46
  methods: {
@@ -5,13 +5,14 @@
5
5
  <div class="sdk-session-item__avatar-image">
6
6
  <slot name="avatar"></slot>
7
7
  </div>
8
- <span v-if="data[unreadMsgCountField]" class="sdk-session-item__avatar-badge" :class="{'is-mute': data[muteField]}">
9
- <sdk-badge
10
- :is-dot="data[muteField]"
11
- :value="data[unreadMsgCountField]"
12
- :max="99"
13
- ></sdk-badge>
14
- </span>
8
+ <sdk-badge
9
+ class="sdk-session-item__avatar-badge"
10
+ :class="{'is-mute': data[muteField]}"
11
+ v-if="data[unreadMsgCountField]"
12
+ :is-dot="data[muteField]"
13
+ :value="data[unreadMsgCountField]"
14
+ :max="99"
15
+ ></sdk-badge>
15
16
  </div>
16
17
  <div class="sdk-session-item__main">
17
18
  <div class="sdk-session-item__row">
@@ -141,7 +142,7 @@ export default {
141
142
  border-radius: 3px;
142
143
  }
143
144
  .sdk-session-item__avatar-badge{
144
- position: absolute;
145
+ position: absolute;
145
146
  &.is-mute {
146
147
  left: calc(~'100% - 7px');
147
148
  top: -6px;
@@ -92,7 +92,6 @@
92
92
  </template>
93
93
  <script>
94
94
  import { Image as UiImage, Button as UiButton, Icon as UiIcon } from '@aochuang/common/components'
95
- import { formatOssPath } from '@aochuang/common/utils/oss'
96
95
  import { isOriginImage, getNewImageSrc, isNewImage } from './util'
97
96
  import BiTooltip from '@aochuang/common/common/tooltip'
98
97
  import ImageDragableConfirm from './image-dragable-confirm.vue'
@@ -260,12 +259,6 @@ export default {
260
259
  isOriginImage () {
261
260
  return isOriginImage(this.src)
262
261
  },
263
- isPrivateOssImage () {
264
- if (!this.src) {
265
- return false
266
- }
267
- return formatOssPath(this.src) !== this.src
268
- },
269
262
  allowDefrost () {
270
263
  return !!this.defrostMethod
271
264
  }
@@ -283,12 +276,14 @@ export default {
283
276
  this.imageClickMethod && this.imageClickMethod()
284
277
  },
285
278
  handleImageDragStart (event) {
286
- if (!(this.enableDragOriginImage && this.isOriginImage) && !this.isPrivateOssImage) {
287
- return
288
- }
289
- event.preventDefault()
290
- event.stopPropagation()
291
- this.showDragOriginConfirm = true
279
+ // 先去掉这个逻辑,私有的oss或者大图先不管了,还是以前的逻辑,私有的我这里是可以的,黄哒哒电脑不行,这里逻辑都是和老的一样的,可能和系统有关系吧
280
+ // 先保持和以前一样的逻辑,不做这样的弹出交互了,客户不接受
281
+ // if (!(this.enableDragOriginImage && this.isOriginImage)) {
282
+ // return
283
+ // }
284
+ // event.preventDefault()
285
+ // event.stopPropagation()
286
+ // this.showDragOriginConfirm = true
292
287
  },
293
288
  handleDragOriginConfirmClosed () {
294
289
  this.showDragOriginConfirm = false
@@ -13,7 +13,7 @@
13
13
  {{title}}
14
14
  </div>
15
15
  <div class="sdk-chat-panel-control-url-miniprogram__content">
16
- <div v-if="cover" :style="{width: '100%', height: '100%', 'background-image': 'url('+ cover +')'}"></div>
16
+ <ui-image v-if="cover" :style="{width: '100%', height: '100%'}" :src="cover"></ui-image>
17
17
  </div>
18
18
  </div>
19
19
  <div class="sdk-chat-panel-control-url-miniprogram__foot">小程序</div>
@@ -50,11 +50,15 @@
50
50
  </div>
51
51
  </template>
52
52
  <script>
53
+ import { Image as UiImage } from '@aochuang/common/components'
53
54
  import { parse, parseXml } from '../../../utils/json'
54
55
  import { formatOssPath } from '@aochuang/common/utils/oss'
55
56
 
56
57
  export default {
57
58
  name: 'SdkChatPanelControlUrlMiniprogram',
59
+ components: {
60
+ UiImage
61
+ },
58
62
  props: {
59
63
  id: {
60
64
  type: String
@@ -78,7 +78,7 @@ export default {
78
78
  return formatOssPath(this.nextContent.coverUrl)
79
79
  },
80
80
  avatar () {
81
- return formatOssPath(this.nextContent.headUrl || this.nextContent.avatar)
81
+ return formatOssPath(this.nextContent.avatar)
82
82
  },
83
83
  nickname () {
84
84
  return this.nextContent.nickname
@@ -104,12 +104,6 @@ export default {
104
104
  border-radius: 4px;
105
105
  }
106
106
  }
107
- .sdk-chat-wework-panel-control-channel-live__cover {
108
- background-color: #000;
109
- }
110
- .sdk-chat-wework-panel-control-channel-live--default {
111
- width: 248px;
112
- }
113
107
  .sdk-chat-wework-panel-control-channel-live--default,
114
108
  .sdk-chat-wework-panel-control-channel-live--thumb {
115
109
  max-width: 280px;
@@ -119,6 +113,7 @@ export default {
119
113
  }
120
114
  .sdk-chat-wework-panel-control-channel-live__cover{
121
115
  height: 200px;
116
+ background-color: #eee;
122
117
  }
123
118
  .sdk-chat-wework-panel-control-channel-live__row{
124
119
  line-height: 1.5em;
@@ -62,7 +62,7 @@ export default {
62
62
  return formatOssPath(this.nextContent.bigheadimgurl)
63
63
  },
64
64
  category () {
65
- return '微名片'
65
+ return '企业微名片'
66
66
  }
67
67
  }
68
68
  }
@@ -21,10 +21,9 @@ export default {
21
21
  }
22
22
  },
23
23
  render (h, c) {
24
- const content = parse(c.props.content) || {}
25
24
  return h(Image, {
26
25
  props: {
27
- src: content.url,
26
+ src: parse(c.props.content).linkUrl,
28
27
  width: c.props.type === 'quote' ? '60px' : null,
29
28
  height: c.props.type === 'quote' ? '60px' : '120px',
30
29
  fit: 'contain'
@@ -7,11 +7,9 @@
7
7
  </div>
8
8
  <div class="sdk-chat-wework-control-file-url__toolbar">
9
9
  <span class="sdk-chat-wework-control-file-url__size" v-if="fileSize">{{fileSize}}</span>
10
- <span class="sdk-chat-wework-control-file-url__download" v-if="canDownload" @click.stop.prevent>
11
- <ui-button type="primary" link :loading="downloading" icon="download-line" :click="handleDownloadClick">
12
- 下载
13
- </ui-button>
14
- </span>
10
+ <!-- <span class="sdk-chat-wework-control-file-url__download" v-if="innerAllowDownload" @click.stop.prevent>
11
+ <ui-button type="primary" link :click="handleDownloadClick">下载</ui-button>
12
+ </span> -->
15
13
  </div>
16
14
  </span>
17
15
  <span v-if="fileIcon" class="sdk-chat-wework-control-file-url__icon">
@@ -30,7 +28,6 @@
30
28
  import FileIcon from './icons'
31
29
  import { parse } from '../../../utils/json'
32
30
  import { formatFileSize } from '../../../utils/file'
33
- import { formatOssPath } from '@aochuang/common/utils/oss'
34
31
 
35
32
  export default {
36
33
  name: 'SdkChatControlFileUrl',
@@ -69,17 +66,18 @@ export default {
69
66
  },
70
67
  data () {
71
68
  return {
72
- nextContent: {},
73
- downloading: false
69
+ nextContent: {}
74
70
  }
75
71
  },
76
72
  computed: {
77
73
  url () {
78
- const url = this.nextContent.resPath || this.nextContent.url || this.nextContent.resUrl
79
- return url ? formatOssPath(url) : url
74
+ return this.nextContent.url || this.nextContent.resUrl
80
75
  },
81
76
  name () {
82
- return this.nextContent.fileName || this.nextContent.title || this.url
77
+ if (!this.nextContent.title) {
78
+ return this.url
79
+ }
80
+ return this.nextContent.title
83
81
  },
84
82
  size () {
85
83
  return this.nextContent.totalLen
@@ -108,9 +106,6 @@ export default {
108
106
  }
109
107
  return this.allowDownload
110
108
  },
111
- canDownload () {
112
- return this.type !== 'quote' && this.innerAllowDownload && typeof this.downloadMethod === 'function'
113
- },
114
109
  border () {
115
110
  if (this.type === 'quote') {
116
111
  return false
@@ -120,37 +115,24 @@ export default {
120
115
  },
121
116
  created () {
122
117
  this.nextContent = parse(this.content) || {}
118
+ if (this.url && this.updateChatBoxProp) {
119
+ this.updateChatBoxProp('href', this.url)
120
+ }
123
121
  },
124
122
  methods: {
125
123
  handleDownloadClick () {
126
- if (!this.canDownload || this.downloading) {
124
+ if (!this.downloadMethod) {
127
125
  return
128
126
  }
129
- const updateContent = data => {
130
- if (!data || typeof data !== 'object' || Array.isArray(data)) {
131
- throw new Error('updateContentProps只支持更新数据对象')
132
- }
133
- this.nextContent = data
134
- this.$emit('content-update', data)
135
- }
136
- const result = this.downloadMethod({
127
+ return this.downloadMethod({
137
128
  content: this.nextContent,
138
129
  updateContentProp: (prop, value) => {
139
- if (!['resPath', 'url'].includes(prop)) {
130
+ if (!['url'].includes(prop)) {
140
131
  throw new Error('不支持的更新属性' + prop)
141
132
  }
142
133
  this.$set(this.nextContent, prop, value)
143
- this.$emit('content-update', this.nextContent)
144
- },
145
- updateContentProps: updateContent
134
+ }
146
135
  })
147
- if (result && result.finally) {
148
- this.downloading = true
149
- result.finally(() => {
150
- this.downloading = false
151
- })
152
- }
153
- return result
154
136
  }
155
137
  },
156
138
  beforeDestroy () {
@@ -1,24 +1,7 @@
1
1
  <template>
2
2
  <div class="sdk-chat-control-image" @click="handleClick">
3
3
  <div class="sdk-chat-control-image__main" :style="{'height': innerHeight, 'max-height': innerMaxHeight + 'px'}">
4
- <template v-if="showDownloadBox">
5
- <div class="sdk-chat-control-image__download" :class="{'is-downloading': downloading}" @click.stop="handleDownloadClick">
6
- <template v-if="downloading">
7
- <div class="sdk-chat-control-image__download-icon">
8
- <ui-loading size="mini"></ui-loading>
9
- </div>
10
- <div class="sdk-chat-control-image__download-text">下载中...</div>
11
- </template>
12
- <template v-else>
13
- <div class="sdk-chat-control-image__download-icon">
14
- <ui-icon name="download-line"></ui-icon>
15
- </div>
16
- <div class="sdk-chat-control-image__download-text">下载</div>
17
- </template>
18
- </div>
19
- <div class="sdk-chat-control-image__download-placeholder"></div>
20
- </template>
21
- <template v-else-if="allowDefrost">
4
+ <template v-if="allowDefrost">
22
5
  <template v-if="defrostMsg">
23
6
  <div class="sdk-chat-control-image__defrost">
24
7
  <div class="sdk-chat-control-image__defrost-icon">
@@ -93,7 +76,6 @@
93
76
  </template>
94
77
  <script>
95
78
  import { Image as UiImage, Button as UiButton, Icon as UiIcon, Loading as UiLoading } from '@aochuang/common/components'
96
- import { parse } from '../../../utils/json'
97
79
  import { isOriginImage, getNewImageSrc} from './util'
98
80
 
99
81
  export default {
@@ -116,17 +98,7 @@ export default {
116
98
  }
117
99
  },
118
100
  content: {
119
- type: [String, Object]
120
- },
121
- allowDownload: {
122
- type: [Boolean, Function],
123
- default: false
124
- },
125
- downloadMethod: {
126
- type: Function
127
- },
128
- cancelDownloadMethod: {
129
- type: Function
101
+ type: String
130
102
  },
131
103
  maxWidth: {
132
104
  type: Number,
@@ -178,35 +150,12 @@ export default {
178
150
  },
179
151
  data () {
180
152
  return {
181
- downloading: false,
182
- downloaded: false,
183
- nextContent: null,
184
153
  defrostMsg: null,
185
154
  errorMsg: null
186
155
  }
187
156
  },
188
157
  computed: {
189
- isDownloadContent () {
190
- return !!(this.nextContent && typeof this.nextContent === 'object' && !Array.isArray(this.nextContent))
191
- },
192
- innerAllowDownload () {
193
- if (typeof this.allowDownload === 'function') {
194
- return this.allowDownload({
195
- content: this.nextContent
196
- })
197
- }
198
- return this.allowDownload
199
- },
200
- showDownloadBox () {
201
- return this.type === 'default' && this.innerAllowDownload && this.isDownloadContent && !this.nextContent.resPath && !this.downloaded
202
- },
203
158
  src () {
204
- if (typeof this.nextContent === 'string') {
205
- return this.nextContent
206
- }
207
- if (this.nextContent && typeof this.nextContent === 'object') {
208
- return this.nextContent.resPath || this.nextContent.url || this.nextContent.thumbnailPath || this.nextContent.midThumbnailPath || ''
209
- }
210
159
  return this.content
211
160
  },
212
161
  innerWidth () {
@@ -261,9 +210,6 @@ export default {
261
210
  return !!this.defrostMethod
262
211
  }
263
212
  },
264
- created () {
265
- this.syncContentState()
266
- },
267
213
  methods: {
268
214
  handleClick () {
269
215
  this.$emit('click')
@@ -271,39 +217,6 @@ export default {
271
217
  handleImageClick () {
272
218
  this.imageClickMethod && this.imageClickMethod()
273
219
  },
274
- handleDownloadClick () {
275
- if (this.downloading) {
276
- return
277
- }
278
- if (!this.downloadMethod) {
279
- return
280
- }
281
- const rs = this.downloadMethod({
282
- content: this.nextContent,
283
- updateContentProp: (prop, value) => {
284
- if (!['url'].includes(prop)) {
285
- throw new Error('不支持的更新属性' + prop)
286
- }
287
- this.$set(this.nextContent, prop, value)
288
- },
289
- updateContentProps: (data) => {
290
- if (!data || typeof data !== 'object' || Array.isArray(data)) {
291
- throw new Error('updateContentProps只支持更新数据对象')
292
- }
293
- this.nextContent = data
294
- }
295
- })
296
- if (rs && rs.finally) {
297
- this.downloading = true
298
- rs.then(() => {
299
- this.downloaded = true
300
- }).finally(() => {
301
- this.downloading = false
302
- })
303
- } else {
304
- this.downloaded = true
305
- }
306
- },
307
220
  handleError () {
308
221
  if (!this.defrostMethod) {
309
222
  return
@@ -323,22 +236,7 @@ export default {
323
236
  handleRefreshClick () {
324
237
  this.errorMsg = null
325
238
  this.defrostMsg = null
326
- },
327
- syncContentState () {
328
- this.nextContent = parse(this.content)
329
- this.downloaded = false
330
- this.downloading = false
331
- this.errorMsg = null
332
- this.defrostMsg = null
333
239
  }
334
- },
335
- watch: {
336
- content () {
337
- this.syncContentState()
338
- }
339
- },
340
- beforeDestroy () {
341
- this.cancelDownloadMethod && this.cancelDownloadMethod()
342
240
  }
343
241
  }
344
242
  </script>
@@ -379,39 +277,6 @@ export default {
379
277
  display: inline-block;
380
278
  line-height: 1em;
381
279
  vertical-align: top;
382
- position: relative;
383
- }
384
- .sdk-chat-control-image__download{
385
- position: absolute;
386
- left: 0;
387
- top: 0;
388
- z-index: 10;
389
- width: 100%;
390
- height: 100%;
391
- background: #000;
392
- display: flex;
393
- flex-direction: column;
394
- align-items: center;
395
- justify-content: center;
396
- color: #ccc;
397
- cursor: pointer;
398
- &:not(.is-downloading):hover {
399
- color: #fff;
400
- }
401
- }
402
- .sdk-chat-control-image__download.is-downloading{
403
- cursor: default;
404
- }
405
- .sdk-chat-control-image__download-icon{
406
- line-height: 1;
407
- margin-bottom: 6px;
408
- }
409
- .sdk-chat-control-image__download-text{
410
- font-size: 12px;
411
- }
412
- .sdk-chat-control-image__download-placeholder{
413
- width: 100%;
414
- height: 100%;
415
280
  }
416
281
  .sdk-chat-control-image__hd{
417
282
  position: absolute;
@@ -19,9 +19,6 @@ import jxSysText from './jx-sys-text/jx-sys-text.vue'
19
19
  // import textWithAt from './text-with-at/text-with-at.vue'
20
20
  import channelVideo from './channel-video/channel-video.vue'
21
21
  import channelLive from './channel-live/channel-live.vue'
22
- import metting from './metting/metting.vue'
23
- import mergeMessage from './merge-message/merge-message.vue'
24
- import mergeMessagePanel from './merge-message/merge-message-panel.vue'
25
22
  // import channelVideoCard from './channel-video-card/channel-video-card.vue'
26
23
  // import music from './music/music.vue'
27
24
  // import transfer from './transfer/transfer.vue'
@@ -29,9 +26,9 @@ import url from './url/url.vue'
29
26
  // import quoteMessage from './quote-message/quote-message.vue'
30
27
  import empty from './empty/empty.vue'
31
28
  import unknow from './unknow/unknow.vue'
32
- import WeworkChatControlConfig from './wework-chat-control-config.vue'
33
- import WeworkChatControlConfigMsg from './wework-chat-control-config-msg.vue'
34
- import WeworkChatControlConfigItem from './wework-chat-control-config-item.vue'
29
+ // import WechatChatControlConfig from './wechat-chat-control-config.vue'
30
+ // import WechatChatControlConfigMsg from './wechat-chat-control-config-msg.vue'
31
+ // import WechatChatControlConfigItem from './wechat-chat-control-config-item.vue'
35
32
  // import revokeMeMessage from './revoke-me-message/revoke-me-message.vue'
36
33
  // import revokeOtherMessage from './revoke-other-message/revoke-other-message.vue'
37
34
  // import revokeYouMessage from './revoke-you-message/revoke-you-message.vue'
@@ -48,8 +45,8 @@ export const chatControls = {
48
45
  [MESSAGE_TYPE.COMPANY_CARD]: companyCard,
49
46
  [MESSAGE_TYPE.VIDEO]: video,
50
47
  [MESSAGE_TYPE.CUSTOM_EXPRESSION]: customExpression,
48
+ [MESSAGE_TYPE.CUSTOM_EXPRESSION_W]: customExpression,
51
49
  [MESSAGE_TYPE.LOCATION]: location,
52
- [MESSAGE_TYPE.URLFile]: fileUrl,
53
50
  [MESSAGE_TYPE.URL]: url,
54
51
  [MESSAGE_TYPE.URLNew]: fileUrl,
55
52
  // [MESSAGE_TYPE.CALLING]: calling,
@@ -65,8 +62,6 @@ export const chatControls = {
65
62
  [MESSAGE_TYPE.CHANNEL_VIDEO]: channelVideo,
66
63
  // [MESSAGE_TYPE.CHANNEL_VIDEO_CARD]: channelVideoCard, // 视频号名片
67
64
  [MESSAGE_TYPE.CHANNEL_VIDEO_LIVE]: channelLive, // 视频号直播
68
- [MESSAGE_TYPE.MEETING]: metting,
69
- [MESSAGE_TYPE.MERGE_MESSAGE]: mergeMessage,
70
65
  // [MESSAGE_TYPE.SYSTEM_BATCH_MESSAGE]: systemBatchMessage,
71
66
  // [MESSAGE_TYPE.REVOKE_ME_MESSAGE]: revokeMeMessage,
72
67
  // [MESSAGE_TYPE.REVOKE_OTHER_MESSAGE]: revokeOtherMessage,
@@ -98,9 +93,6 @@ export {
98
93
  channelVideo, // 视频号
99
94
  // channelVideoCard,
100
95
  channelLive, // 视频号直播
101
- metting,
102
- mergeMessage,
103
- mergeMessagePanel,
104
96
  // music,
105
97
  // transfer,
106
98
  empty,
@@ -108,7 +100,7 @@ export {
108
100
  // revokeMeMessage,
109
101
  // revokeOtherMessage,
110
102
  // revokeYouMessage,
111
- WeworkChatControlConfig,
112
- WeworkChatControlConfigMsg,
113
- WeworkChatControlConfigItem
103
+ // WechatChatControlConfig,
104
+ // WechatChatControlConfigMsg,
105
+ // WechatChatControlConfigItem
114
106
  }
@@ -8,11 +8,11 @@
8
8
  </div>
9
9
  <div class="sdk-chat-wework-control-location__body">
10
10
  <div v-if="offline" class="sdk-chat-wework-control-location__offline">
11
- <div class="sdk-chat-wework-control-location__offline-label">高德地图经纬度坐标:</div>
11
+ <div class="sdk-chat-wework-control-location__offline-label">腾讯地图经纬度坐标:</div>
12
12
  <div class="sdk-chat-wework-control-location__offline-value">{{longitude}}、{{latitude}}</div>
13
13
  <div class="sdk-chat-wework-control-location__offline-tips">提示:离线模式无法显示地图</div>
14
14
  </div>
15
- <ac-static-map type="amap" :map-key="mapKey" v-else :enable-link="false" width="280" height="160" :lng="longitude" :lat="latitude" @map-created="handleStaticMapCreated"></ac-static-map>
15
+ <ac-static-map :map-key="mapKey" v-else :enable-link="false" width="280" height="160" :lng="longitude" :lat="latitude" @map-created="handleStaticMapCreated"></ac-static-map>
16
16
  </div>
17
17
  </div>
18
18
  </template>
@@ -22,7 +22,7 @@
22
22
  <svg t="1752133896251" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="25831" width="200" height="200"><path d="M512 1012.394667l-271.530667-271.530667a384 384 0 1 1 543.061334 0L512 1012.394667z m211.2-331.861334a298.666667 298.666667 0 1 0-422.4 0L512 891.733333l211.2-211.2zM512 554.666667a85.333333 85.333333 0 1 1 0-170.666667 85.333333 85.333333 0 0 1 0 170.666667z" fill="currentColor" p-id="25832"></path></svg>
23
23
  </span>
24
24
  <span class="sdk-chat-wework-control-location__title">{{address}}</span>
25
- <ac-static-map type="amap" :map-key="mapKey" :enable-link="false" width="52" height="52" :lng="longitude" :lat="latitude" @map-created="handleStaticMapCreated"></ac-static-map>
25
+ <ac-static-map :map-key="mapKey" :enable-link="false" width="52" height="52" :lng="longitude" :lat="latitude" @map-created="handleStaticMapCreated"></ac-static-map>
26
26
  </div>
27
27
  </template>
28
28
  </div>
@@ -63,10 +63,10 @@ export default {
63
63
  return parse(this.content) || {}
64
64
  },
65
65
  title () {
66
- return this.nextContent.content
66
+ return this.nextContent.wish
67
67
  },
68
68
  description () {
69
- return this.nextContent.receiveText
69
+ return ''
70
70
  },
71
71
  category () {
72
72
  return '微红包'
@@ -105,7 +105,6 @@ export default {
105
105
  flex: 1;
106
106
  min-width: 0;
107
107
  line-height: 1.3em;
108
- padding-top: 6px;
109
108
  }
110
109
  .sdk-wework-control-redpacket__title{
111
110
  line-height: 22px;