@aochuang/client-sdk 1.0.278

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 (366) hide show
  1. package/README.md +93 -0
  2. package/common/avatar/avatar.vue +86 -0
  3. package/common/avatar/index.js +3 -0
  4. package/common/badge/badge.vue +105 -0
  5. package/common/badge/index.js +3 -0
  6. package/common/context-menu/context-menu-box.vue +61 -0
  7. package/common/context-menu/context-menu-group.vue +162 -0
  8. package/common/context-menu/context-menu-item.vue +179 -0
  9. package/common/context-menu/context-menu.vue +201 -0
  10. package/common/context-menu/index.js +3 -0
  11. package/common/context-menu/utils.js +138 -0
  12. package/common/friend-avatar/default.svg +1 -0
  13. package/common/friend-avatar/friend-avatar.vue +29 -0
  14. package/common/friend-avatar/index.js +3 -0
  15. package/common/image/index.js +3 -0
  16. package/common/index.js +17 -0
  17. package/common/room-avatar/default.svg +6 -0
  18. package/common/room-avatar/index.js +3 -0
  19. package/common/room-avatar/room-avatar.vue +29 -0
  20. package/common/scroll-load-more/index.js +3 -0
  21. package/common/scroll-load-more/scroll-load-more.vue +195 -0
  22. package/common/user-avatar/default.svg +1 -0
  23. package/common/user-avatar/index.js +3 -0
  24. package/common/user-avatar/user-avatar.vue +29 -0
  25. package/components/account-select/account-select-skeleton.vue +56 -0
  26. package/components/account-select/account-select.vue +205 -0
  27. package/components/account-select/all.svg +1 -0
  28. package/components/account-select/index.js +3 -0
  29. package/components/chat-editor/MENTION_TOKEN_SUMMARY.md +74 -0
  30. package/components/chat-editor/chat-editor-button/chat-editor-button.vue +78 -0
  31. package/components/chat-editor/chat-editor-suggestions/chat-editor-suggestions.vue +329 -0
  32. package/components/chat-editor/chat-editor-toolbar/chat-editor-toolbar-item.vue +28 -0
  33. package/components/chat-editor/chat-editor-toolbar/chat-editor-toolbar.vue +17 -0
  34. package/components/chat-editor/chat-editor.vue +933 -0
  35. package/components/chat-editor/index.js +12 -0
  36. package/components/chat-editor/utils.js +189 -0
  37. package/components/chat-friend-profile/chat-friend-profile.vue +118 -0
  38. package/components/chat-friend-profile/index.js +3 -0
  39. package/components/chat-layout/chat-layout.vue +71 -0
  40. package/components/chat-layout/index.js +3 -0
  41. package/components/chat-panel/chat-panel-box.vue +350 -0
  42. package/components/chat-panel/chat-panel-chat.vue +121 -0
  43. package/components/chat-panel/chat-panel-chats.vue +674 -0
  44. package/components/chat-panel/chat-panel-empty.vue +32 -0
  45. package/components/chat-panel/chat-panel-increment.vue +80 -0
  46. package/components/chat-panel/chat-panel-inner-msg.vue +25 -0
  47. package/components/chat-panel/chat-panel-loading.vue +29 -0
  48. package/components/chat-panel/chat-panel-nearest.vue +136 -0
  49. package/components/chat-panel/chat-panel.vue +292 -0
  50. package/components/chat-panel/index.js +3 -0
  51. package/components/chat-panel/util.js +83 -0
  52. package/components/chat-room-profile/chat-room-profile.vue +103 -0
  53. package/components/chat-room-profile/index.js +3 -0
  54. package/components/contacts-friend-select/contacts-friend-select-skeleton.vue +41 -0
  55. package/components/contacts-friend-select/contacts-friend-select.vue +204 -0
  56. package/components/contacts-friend-select/index.js +3 -0
  57. package/components/contacts-group-select/contacts-group-select-item.vue +98 -0
  58. package/components/contacts-group-select/contacts-group-select-skeleton.vue +81 -0
  59. package/components/contacts-group-select/contacts-group-select.vue +396 -0
  60. package/components/contacts-group-select/index.js +3 -0
  61. package/components/contacts-room-select/contacts-room-select-skeleton.vue +41 -0
  62. package/components/contacts-room-select/contacts-room-select.vue +208 -0
  63. package/components/contacts-room-select/index.js +3 -0
  64. package/components/index.js +43 -0
  65. package/components/layout/index.js +3 -0
  66. package/components/layout/layout.vue +70 -0
  67. package/components/session-select/index.js +11 -0
  68. package/components/session-select/session-select-item-skeleton.vue +59 -0
  69. package/components/session-select/session-select-item.vue +190 -0
  70. package/components/session-select/session-select.vue +386 -0
  71. package/components/wechat-chat-control/calling/calling.vue +227 -0
  72. package/components/wechat-chat-control/calling/phone-fill.svg +1 -0
  73. package/components/wechat-chat-control/calling/vidicon-fill.svg +1 -0
  74. package/components/wechat-chat-control/channel-live/channel-live.vue +198 -0
  75. package/components/wechat-chat-control/channel-live/quote-icon.svg +1 -0
  76. package/components/wechat-chat-control/channel-video/channel-video.vue +180 -0
  77. package/components/wechat-chat-control/channel-video/quote-icon.svg +1 -0
  78. package/components/wechat-chat-control/channel-video-card/channel-video-card.vue +139 -0
  79. package/components/wechat-chat-control/channel-video-card/quote-icon.svg +1 -0
  80. package/components/wechat-chat-control/company-card/company-card.vue +136 -0
  81. package/components/wechat-chat-control/company-card/quote-icon.svg +1 -0
  82. package/components/wechat-chat-control/custom-expression/custom-expression.vue +45 -0
  83. package/components/wechat-chat-control/empty/empty.vue +27 -0
  84. package/components/wechat-chat-control/file-url/file-url.vue +307 -0
  85. package/components/wechat-chat-control/file-url/icons/file-excel-line.svg +1 -0
  86. package/components/wechat-chat-control/file-url/icons/file-info-line.svg +1 -0
  87. package/components/wechat-chat-control/file-url/icons/file-music-line.svg +1 -0
  88. package/components/wechat-chat-control/file-url/icons/file-pdf-line.svg +1 -0
  89. package/components/wechat-chat-control/file-url/icons/file-ppt-line.svg +1 -0
  90. package/components/wechat-chat-control/file-url/icons/file-settings-line.svg +1 -0
  91. package/components/wechat-chat-control/file-url/icons/file-text-line.svg +1 -0
  92. package/components/wechat-chat-control/file-url/icons/file-unknow-line.svg +1 -0
  93. package/components/wechat-chat-control/file-url/icons/file-word-line.svg +1 -0
  94. package/components/wechat-chat-control/file-url/icons/file-zip-line.svg +1 -0
  95. package/components/wechat-chat-control/file-url/icons/index.js +24 -0
  96. package/components/wechat-chat-control/image/image.vue +344 -0
  97. package/components/wechat-chat-control/image/index.js +1 -0
  98. package/components/wechat-chat-control/image/util.js +29 -0
  99. package/components/wechat-chat-control/index.js +104 -0
  100. package/components/wechat-chat-control/jx-sys-text/jx-sys-text.vue +28 -0
  101. package/components/wechat-chat-control/location/location.vue +179 -0
  102. package/components/wechat-chat-control/location/offline-bg.png +0 -0
  103. package/components/wechat-chat-control/member-change/member-change.vue +37 -0
  104. package/components/wechat-chat-control/music/icons/163.png +0 -0
  105. package/components/wechat-chat-control/music/icons/163.svg +12 -0
  106. package/components/wechat-chat-control/music/icons/default.png +0 -0
  107. package/components/wechat-chat-control/music/icons/default.svg +1 -0
  108. package/components/wechat-chat-control/music/icons/kuwo.png +0 -0
  109. package/components/wechat-chat-control/music/icons/qq.png +0 -0
  110. package/components/wechat-chat-control/music/icons/qq.svg +1 -0
  111. package/components/wechat-chat-control/music/music.vue +156 -0
  112. package/components/wechat-chat-control/music/utils.js +30 -0
  113. package/components/wechat-chat-control/quote-message/quote-message.vue +257 -0
  114. package/components/wechat-chat-control/real-time-position/icon.svg +1 -0
  115. package/components/wechat-chat-control/real-time-position/real-time-position.vue +57 -0
  116. package/components/wechat-chat-control/red-envelopes/quote-icon.svg +1 -0
  117. package/components/wechat-chat-control/red-envelopes/red-envelope.svg +1 -0
  118. package/components/wechat-chat-control/red-envelopes/red-envelopes.vue +168 -0
  119. package/components/wechat-chat-control/revoke-me-message/revoke-me-message.vue +41 -0
  120. package/components/wechat-chat-control/revoke-other-message/revoke-other-message.vue +41 -0
  121. package/components/wechat-chat-control/revoke-you-message/revoke-you-message.vue +41 -0
  122. package/components/wechat-chat-control/room-calling/phone-fill.svg +1 -0
  123. package/components/wechat-chat-control/room-calling/room-calling.vue +52 -0
  124. package/components/wechat-chat-control/room-calling/vidicon-fill.svg +1 -0
  125. package/components/wechat-chat-control/share-card/quote-icon.svg +1 -0
  126. package/components/wechat-chat-control/share-card/share-card.vue +140 -0
  127. package/components/wechat-chat-control/system/system.vue +122 -0
  128. package/components/wechat-chat-control/system-batch-message/system-batch-message.vue +28 -0
  129. package/components/wechat-chat-control/system-money/system-money.vue +39 -0
  130. package/components/wechat-chat-control/text/icons/icon.svg +6 -0
  131. package/components/wechat-chat-control/text/text.vue +164 -0
  132. package/components/wechat-chat-control/text-with-at/text-with-at.vue +88 -0
  133. package/components/wechat-chat-control/transfer/collection.svg +1 -0
  134. package/components/wechat-chat-control/transfer/quote-icon.svg +1 -0
  135. package/components/wechat-chat-control/transfer/red-transfer.svg +1 -0
  136. package/components/wechat-chat-control/transfer/refund.svg +1 -0
  137. package/components/wechat-chat-control/transfer/transfer.svg +1 -0
  138. package/components/wechat-chat-control/transfer/transfer.vue +263 -0
  139. package/components/wechat-chat-control/unknow/unknow.vue +21 -0
  140. package/components/wechat-chat-control/url/icons/link.svg +1 -0
  141. package/components/wechat-chat-control/url/icons/video.svg +6 -0
  142. package/components/wechat-chat-control/url/miniprogram.svg +1 -0
  143. package/components/wechat-chat-control/url/url-file.vue +47 -0
  144. package/components/wechat-chat-control/url/url-link.vue +169 -0
  145. package/components/wechat-chat-control/url/url-merge.vue +164 -0
  146. package/components/wechat-chat-control/url/url-miniprogram.vue +259 -0
  147. package/components/wechat-chat-control/url/url.vue +116 -0
  148. package/components/wechat-chat-control/util.js +234 -0
  149. package/components/wechat-chat-control/video/icons/video.svg +1 -0
  150. package/components/wechat-chat-control/video/video.vue +304 -0
  151. package/components/wechat-chat-control/voice/icons/voice.svg +1 -0
  152. package/components/wechat-chat-control/voice/voice.vue +464 -0
  153. package/components/wechat-chat-control/wechat-chat-control-config-item.vue +24 -0
  154. package/components/wechat-chat-control/wechat-chat-control-config-msg.vue +21 -0
  155. package/components/wechat-chat-control/wechat-chat-control-config.vue +57 -0
  156. package/components/wechat-chat-panel/chat-panel-chat-status/chat-panel-chat-status.vue +69 -0
  157. package/components/wechat-chat-panel/chat-panel-item.vue +695 -0
  158. package/components/wechat-chat-panel/chat-panel.vue +257 -0
  159. package/components/wechat-chat-panel/index.js +3 -0
  160. package/components/wework-chat-control/calling/calling.vue +223 -0
  161. package/components/wework-chat-control/calling/phone-fill.svg +1 -0
  162. package/components/wework-chat-control/calling/vidicon-fill.svg +1 -0
  163. package/components/wework-chat-control/channel-live/channel-live.vue +198 -0
  164. package/components/wework-chat-control/channel-live/quote-icon.svg +1 -0
  165. package/components/wework-chat-control/channel-video/channel-video.vue +180 -0
  166. package/components/wework-chat-control/channel-video/quote-icon.svg +1 -0
  167. package/components/wework-chat-control/company-card/company-card.vue +136 -0
  168. package/components/wework-chat-control/company-card/quote-icon.svg +1 -0
  169. package/components/wework-chat-control/custom-expression/custom-expression.vue +34 -0
  170. package/components/wework-chat-control/empty/empty.vue +27 -0
  171. package/components/wework-chat-control/expression/expression.vue +53 -0
  172. package/components/wework-chat-control/file-url/file-url.vue +247 -0
  173. package/components/wework-chat-control/file-url/icons/file-excel-line.svg +1 -0
  174. package/components/wework-chat-control/file-url/icons/file-info-line.svg +1 -0
  175. package/components/wework-chat-control/file-url/icons/file-music-line.svg +1 -0
  176. package/components/wework-chat-control/file-url/icons/file-pdf-line.svg +1 -0
  177. package/components/wework-chat-control/file-url/icons/file-ppt-line.svg +1 -0
  178. package/components/wework-chat-control/file-url/icons/file-settings-line.svg +1 -0
  179. package/components/wework-chat-control/file-url/icons/file-text-line.svg +1 -0
  180. package/components/wework-chat-control/file-url/icons/file-unknow-line.svg +1 -0
  181. package/components/wework-chat-control/file-url/icons/file-word-line.svg +1 -0
  182. package/components/wework-chat-control/file-url/icons/file-zip-line.svg +1 -0
  183. package/components/wework-chat-control/file-url/icons/index.js +24 -0
  184. package/components/wework-chat-control/image/image.vue +296 -0
  185. package/components/wework-chat-control/image/index.js +1 -0
  186. package/components/wework-chat-control/image/util.js +21 -0
  187. package/components/wework-chat-control/index.js +105 -0
  188. package/components/wework-chat-control/jx-sys-text/jx-sys-text.vue +28 -0
  189. package/components/wework-chat-control/link/link.vue +100 -0
  190. package/components/wework-chat-control/location/location.vue +181 -0
  191. package/components/wework-chat-control/location/offline-bg.png +0 -0
  192. package/components/wework-chat-control/red-envelopes/quote-icon.svg +1 -0
  193. package/components/wework-chat-control/red-envelopes/red-envelope.svg +1 -0
  194. package/components/wework-chat-control/red-envelopes/red-envelopes.vue +168 -0
  195. package/components/wework-chat-control/share-card/quote-icon.svg +1 -0
  196. package/components/wework-chat-control/share-card/share-card.vue +140 -0
  197. package/components/wework-chat-control/text/icons/icon.svg +6 -0
  198. package/components/wework-chat-control/text/text.vue +157 -0
  199. package/components/wework-chat-control/unknow/unknow.vue +21 -0
  200. package/components/wework-chat-control/url/icons/link.svg +1 -0
  201. package/components/wework-chat-control/url/icons/video.svg +6 -0
  202. package/components/wework-chat-control/url/miniprogram.svg +1 -0
  203. package/components/wework-chat-control/url/url-file.vue +37 -0
  204. package/components/wework-chat-control/url/url-link.vue +169 -0
  205. package/components/wework-chat-control/url/url-merge.vue +164 -0
  206. package/components/wework-chat-control/url/url-miniprogram.vue +248 -0
  207. package/components/wework-chat-control/url/url.vue +103 -0
  208. package/components/wework-chat-control/util.js +223 -0
  209. package/components/wework-chat-control/video/icons/video.svg +1 -0
  210. package/components/wework-chat-control/video/video.vue +304 -0
  211. package/components/wework-chat-control/voice/icons/voice.svg +1 -0
  212. package/components/wework-chat-control/voice/voice.vue +464 -0
  213. package/components/wework-chat-panel/chat-panel-controls/company-card/company-card.vue +35 -0
  214. package/components/wework-chat-panel/chat-panel-controls/expression/expression.vue +36 -0
  215. package/components/wework-chat-panel/chat-panel-controls/file-url/file-url.vue +35 -0
  216. package/components/wework-chat-panel/chat-panel-controls/image/image.vue +36 -0
  217. package/components/wework-chat-panel/chat-panel-controls/index.js +35 -0
  218. package/components/wework-chat-panel/chat-panel-controls/jx-sys-text/jx-sys-text.vue +28 -0
  219. package/components/wework-chat-panel/chat-panel-controls/link/link.vue +35 -0
  220. package/components/wework-chat-panel/chat-panel-controls/location/location.vue +35 -0
  221. package/components/wework-chat-panel/chat-panel-controls/text/text.vue +43 -0
  222. package/components/wework-chat-panel/chat-panel-controls/unkonw/unkonw.vue +39 -0
  223. package/components/wework-chat-panel/chat-panel-controls/video/video.vue +37 -0
  224. package/components/wework-chat-panel/chat-panel-controls/voice/voice.vue +35 -0
  225. package/components/wework-chat-panel/chat-panel-item.vue +650 -0
  226. package/components/wework-chat-panel/chat-panel.vue +163 -0
  227. package/components/wework-chat-panel/index.js +3 -0
  228. package/package.json +23 -0
  229. package/services/client-chat/client-chat-wechat/client-chat-account.js +426 -0
  230. package/services/client-chat/client-chat-wechat/client-chat-concats.js +1029 -0
  231. package/services/client-chat/client-chat-wechat/client-chat-draft.js +92 -0
  232. package/services/client-chat/client-chat-wechat/client-chat-message.js +588 -0
  233. package/services/client-chat/client-chat-wechat/client-chat-session-manage.js +67 -0
  234. package/services/client-chat/client-chat-wechat/client-chat-session.js +1048 -0
  235. package/services/client-chat/client-chat-wechat/client-chat-socket.js +215 -0
  236. package/services/client-chat/client-chat-wechat/client-chat.js +1065 -0
  237. package/services/client-chat/client-chat-wechat/index.js +3 -0
  238. package/services/client-chat/client-chat-wechat/utils.js +82 -0
  239. package/services/client-chat/client-chat-wework/client-chat-account.js +310 -0
  240. package/services/client-chat/client-chat-wework/client-chat-concats.js +772 -0
  241. package/services/client-chat/client-chat-wework/client-chat-message.js +278 -0
  242. package/services/client-chat/client-chat-wework/client-chat-session.js +929 -0
  243. package/services/client-chat/client-chat-wework/client-chat-socket.js +64 -0
  244. package/services/client-chat/client-chat-wework/client-chat.js +330 -0
  245. package/services/client-chat/client-chat-wework/index.js +3 -0
  246. package/services/client-chat/client-chat-wework/utils.js +82 -0
  247. package/services/index.js +10 -0
  248. package/services/socket/index.js +5 -0
  249. package/services/socket/socket.js +797 -0
  250. package/services/socket/utils.js +7 -0
  251. package/uni-common/account-portray/account-portray.vue +51 -0
  252. package/uni-common/account-select/account-select-item.vue +172 -0
  253. package/uni-common/account-select/account-select.vue +252 -0
  254. package/uni-common/all-friend-avatar/all-friend-avatar.vue +49 -0
  255. package/uni-common/friend-avatar/default.svg +1 -0
  256. package/uni-common/friend-avatar/friend-avatar.vue +27 -0
  257. package/uni-common/friend-avatar/index.js +3 -0
  258. package/uni-common/friend-loader/friend-loader.vue +53 -0
  259. package/uni-common/friend-portray/friend-portray.vue +56 -0
  260. package/uni-common/group-avatar/default.svg +1 -0
  261. package/uni-common/group-avatar/group-avatar.vue +18 -0
  262. package/uni-common/group-avatar/index.js +3 -0
  263. package/uni-common/room-avatar/default.svg +6 -0
  264. package/uni-common/room-avatar/index.js +3 -0
  265. package/uni-common/room-avatar/room-avatar.vue +27 -0
  266. package/uni-common/room-loader/room-loader.vue +53 -0
  267. package/uni-common/room-portray/room-portray.vue +56 -0
  268. package/uni-components/chat-control/calling/calling.vue +91 -0
  269. package/uni-components/chat-control/calling/phone-fill.svg +1 -0
  270. package/uni-components/chat-control/calling/vidicon-fill.svg +1 -0
  271. package/uni-components/chat-control/channel-video/channel-video.vue +89 -0
  272. package/uni-components/chat-control/channel-video-card/channel-video-card.vue +105 -0
  273. package/uni-components/chat-control/channel-video-live/channel-video-live.vue +92 -0
  274. package/uni-components/chat-control/chat-control-config-item/chat-control-config-item.vue +20 -0
  275. package/uni-components/chat-control/chat-control-config-item/index.js +3 -0
  276. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-app.vue +25 -0
  277. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-h5.vue +21 -0
  278. package/uni-components/chat-control/chat-control-config.vue +59 -0
  279. package/uni-components/chat-control/chat-control.vue +218 -0
  280. package/uni-components/chat-control/company-card/company-card.vue +123 -0
  281. package/uni-components/chat-control/const.js +28 -0
  282. package/uni-components/chat-control/expression/expression.vue +41 -0
  283. package/uni-components/chat-control/image/image.vue +68 -0
  284. package/uni-components/chat-control/index.js +89 -0
  285. package/uni-components/chat-control/location/location.vue +110 -0
  286. package/uni-components/chat-control/member-change/member-change.vue +32 -0
  287. package/uni-components/chat-control/quote-message/quote-message.vue +216 -0
  288. package/uni-components/chat-control/real-time-position/real-time-position.vue +62 -0
  289. package/uni-components/chat-control/redpacket/red-envelope.svg +1 -0
  290. package/uni-components/chat-control/redpacket/redpacket.vue +75 -0
  291. package/uni-components/chat-control/share-card/share-card.vue +101 -0
  292. package/uni-components/chat-control/system/system.vue +69 -0
  293. package/uni-components/chat-control/system-batch-message/system-batch-message.vue +30 -0
  294. package/uni-components/chat-control/system-text/system-text.vue +32 -0
  295. package/uni-components/chat-control/text/text.vue +67 -0
  296. package/uni-components/chat-control/text-with-at/text-with-at.vue +51 -0
  297. package/uni-components/chat-control/transfer/red-transfer.svg +1 -0
  298. package/uni-components/chat-control/transfer/transfer.vue +80 -0
  299. package/uni-components/chat-control/unkonw/unkonw.vue +37 -0
  300. package/uni-components/chat-control/url/icons/file-excel-line.svg +1 -0
  301. package/uni-components/chat-control/url/icons/file-info-line.svg +1 -0
  302. package/uni-components/chat-control/url/icons/file-music-line.svg +1 -0
  303. package/uni-components/chat-control/url/icons/file-pdf-line.svg +1 -0
  304. package/uni-components/chat-control/url/icons/file-ppt-line.svg +1 -0
  305. package/uni-components/chat-control/url/icons/file-settings-line.svg +1 -0
  306. package/uni-components/chat-control/url/icons/file-text-line.svg +1 -0
  307. package/uni-components/chat-control/url/icons/file-unknow-line.svg +1 -0
  308. package/uni-components/chat-control/url/icons/file-word-line.svg +1 -0
  309. package/uni-components/chat-control/url/icons/file-zip-line.svg +1 -0
  310. package/uni-components/chat-control/url/icons/index.js +24 -0
  311. package/uni-components/chat-control/url/miniprogram.svg +1 -0
  312. package/uni-components/chat-control/url/url-miniprogram.vue +116 -0
  313. package/uni-components/chat-control/url/url.vue +306 -0
  314. package/uni-components/chat-control/url-new/icons/file-excel-line.svg +1 -0
  315. package/uni-components/chat-control/url-new/icons/file-info-line.svg +1 -0
  316. package/uni-components/chat-control/url-new/icons/file-music-line.svg +1 -0
  317. package/uni-components/chat-control/url-new/icons/file-pdf-line.svg +1 -0
  318. package/uni-components/chat-control/url-new/icons/file-ppt-line.svg +1 -0
  319. package/uni-components/chat-control/url-new/icons/file-settings-line.svg +1 -0
  320. package/uni-components/chat-control/url-new/icons/file-text-line.svg +1 -0
  321. package/uni-components/chat-control/url-new/icons/file-unknow-line.svg +1 -0
  322. package/uni-components/chat-control/url-new/icons/file-word-line.svg +1 -0
  323. package/uni-components/chat-control/url-new/icons/file-zip-line.svg +1 -0
  324. package/uni-components/chat-control/url-new/icons/index.js +24 -0
  325. package/uni-components/chat-control/url-new/url-new.vue +110 -0
  326. package/uni-components/chat-control/utils.js +12 -0
  327. package/uni-components/chat-control/video/video.vue +156 -0
  328. package/uni-components/chat-control/voice/voice.vue +166 -0
  329. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-collect.vue +84 -0
  330. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-system.vue +28 -0
  331. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet.vue +85 -0
  332. package/uni-components/chat-editor/chat-editor-func/chat-editor-func.vue +157 -0
  333. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at-panel.vue +158 -0
  334. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at.vue +61 -0
  335. package/uni-components/chat-editor/chat-editor-func-button/chat-editor-func-button.vue +58 -0
  336. package/uni-components/chat-editor/chat-editor-func-file/chat-editor-func-file.vue +54 -0
  337. package/uni-components/chat-editor/chat-editor-func-image/chat-editor-func-image.vue +42 -0
  338. package/uni-components/chat-editor/chat-editor-func-video/chat-editor-func-video.vue +42 -0
  339. package/uni-components/chat-editor/chat-editor-func-voice/chat-editor-func-voice.vue +25 -0
  340. package/uni-components/chat-editor/chat-editor-message-send/chat-editor-message-send.vue +158 -0
  341. package/uni-components/chat-editor/chat-editor-quote/chat-editor-quote.vue +75 -0
  342. package/uni-components/chat-editor/chat-editor.vue +257 -0
  343. package/uni-components/chat-editor/index.js +10 -0
  344. package/uni-components/chat-editor/util.js +65 -0
  345. package/uni-components/chat-panel/chat-panel-chats-box.vue +238 -0
  346. package/uni-components/chat-panel/chat-panel-chats-forward/chat-panel-chats-forward.vue +273 -0
  347. package/uni-components/chat-panel/chat-panel-chats-item.vue +578 -0
  348. package/uni-components/chat-panel/chat-panel-chats-status/chat-panel-chats-status.vue +71 -0
  349. package/uni-components/chat-panel/chat-panel-chats.vue +368 -0
  350. package/uni-components/chat-panel/chat-panel.vue +227 -0
  351. package/uni-components/contacts-group-select/contacts-group-select-item.vue +85 -0
  352. package/uni-components/contacts-group-select/contacts-group-select-panel.vue +119 -0
  353. package/uni-components/contacts-group-select/contacts-group-select.vue +150 -0
  354. package/utils/color.js +178 -0
  355. package/utils/data.js +11 -0
  356. package/utils/date.js +107 -0
  357. package/utils/event.js +3 -0
  358. package/utils/file.js +26 -0
  359. package/utils/index.js +5 -0
  360. package/utils/json.js +40 -0
  361. package/utils/log.js +243 -0
  362. package/utils/queue.js +97 -0
  363. package/utils/regexp.js +9 -0
  364. package/utils/string.js +66 -0
  365. package/utils/url.js +48 -0
  366. package/utils/util.js +130 -0
@@ -0,0 +1,263 @@
1
+ <template>
2
+ <div class="sdk-chat-control-transfer" :class="['sdk-chat-control-transfer--' + type, { 'is-expire': isExpire }]">
3
+ <template v-if="type === 'default'">
4
+ <div class="sdk-chat-control-transfer__main">
5
+ <span class="sdk-chat-control-transfer__icon">
6
+ <img width="24px" :src="icon" alt="转账">
7
+ </span>
8
+ <div class="sdk-chat-control-transfer__info">
9
+ <div class="sdk-chat-control-transfer__desc" v-if="innerTitle" :title="innerTitle">{{innerTitle}}</div>
10
+ <div class="sdk-chat-control-transfer__text">{{feedesc}}</div>
11
+ </div>
12
+ </div>
13
+ <div class="sdk-chat-control-transfer__addon">
14
+ <span class="sdk-chat-control-transfer__category">微转账</span>
15
+ <div class="sdk-chat-control-transfer__action" v-if="paysubtype == 1">
16
+ <template v-if="receivable">
17
+ <span class="sdk-chat-control-transfer__action-item" @click="handleReceiveClick">
18
+ <span class="sdk-chat-control-transfer__action-item-icon" v-if="receiveing"><ui-loading size="mini"></ui-loading></span>
19
+ <span class="sdk-chat-control-transfer__action-item-text">领取</span>
20
+ </span>
21
+ </template>
22
+ <template v-if="refundable">
23
+ <span class="sdk-chat-control-transfer__action-item" @click="handleRefundClick">
24
+ <span class="sdk-chat-control-transfer__action-item-icon" v-if="refunding"><ui-loading size="mini"></ui-loading></span>
25
+ <span class="sdk-chat-control-transfer__action-item-text">退还</span>
26
+ </span>
27
+ </template>
28
+ </div>
29
+ </div>
30
+ </template>
31
+ <template v-else-if="type === 'quote'">
32
+ <div class="sdk-chat-control-transfer__icon"></div>
33
+ <div class="sdk-chat-control-transfer__title">{{innerTitle}}{{feedesc}}</div>
34
+ </template>
35
+ </div>
36
+ </template>
37
+ <script>
38
+ import { parse } from '../../../utils/json'
39
+
40
+ export default {
41
+ name: 'SdkChatControlTransfer',
42
+ props: {
43
+ id: {
44
+ type: String
45
+ },
46
+ type: {
47
+ type: String,
48
+ default: 'default',
49
+ validator (value) {
50
+ return ['quote', 'default'].includes(value)
51
+ }
52
+ },
53
+ content: {
54
+ type: [String, Object]
55
+ },
56
+ receivable: {
57
+ type: Boolean,
58
+ default: false
59
+ },
60
+ refundable: {
61
+ type: Boolean,
62
+ default: false
63
+ },
64
+ receiveMethod: {
65
+ type: Function
66
+ },
67
+ refundMethod: {
68
+ type: Function
69
+ },
70
+ updateChatBoxStyle: {
71
+ type: Function
72
+ }
73
+ },
74
+ data () {
75
+ return {
76
+ refunding: false,
77
+ receiveing: false
78
+ }
79
+ },
80
+ computed: {
81
+ nextContent () {
82
+ return parse(this.content) || {}
83
+ },
84
+ title () {
85
+ return this.nextContent.title
86
+ },
87
+ paysubtype () {
88
+ return this.nextContent.paysubtype
89
+ },
90
+ payMemo () {
91
+ return this.nextContent.payMemo
92
+ },
93
+ description () {
94
+ return this.nextContent.feedesc
95
+ },
96
+ feedesc () {
97
+ return this.description
98
+ },
99
+ isExpire () {
100
+ return this.paysubtype != 1
101
+ },
102
+ innerTitle () {
103
+ let rs
104
+ if (this.paysubtype == 1) {
105
+ rs = this.payMemo
106
+ } else if (this.paysubtype == 3) {
107
+ rs = '已收钱'
108
+ } else if (this.paysubtype == 4) {
109
+ rs = '已退还'
110
+ }
111
+ return rs || this.title
112
+ },
113
+ icon () {
114
+ let icon = require('./transfer.svg')
115
+ if (this.paysubtype == 3) {
116
+ icon = require('./collection.svg')
117
+ } else if (this.paysubtype == 4) {
118
+ icon = require('./refund.svg')
119
+ }
120
+ return icon
121
+ },
122
+ bgColor () {
123
+ let color = '#f59d4f'
124
+ if (this.paysubtype == 3 || this.paysubtype == 4) {
125
+ color = '#fecfa2'
126
+ }
127
+ return color
128
+ },
129
+ brColor () {
130
+ let color = '#f59d4f'
131
+ if (this.paysubtype == 3 || this.paysubtype == 4) {
132
+ color = '#fecfa2'
133
+ }
134
+ return color
135
+ }
136
+ },
137
+ created () {
138
+ if (this.isExpire && this.updateChatBoxStyle) {
139
+ this.updateChatBoxStyle({
140
+ brColor: '#f9b676',
141
+ bgColor: '#f9b676'
142
+ })
143
+ }
144
+ },
145
+ methods: {
146
+ handleRefundClick () {
147
+ const rs = this.refundMethod({
148
+ content: this.nextContent
149
+ })
150
+ if (rs && rs.finally) {
151
+ this.refunding = true
152
+ rs.finally(() => {
153
+ this.refunding = false
154
+ })
155
+ }
156
+ },
157
+ handleReceiveClick () {
158
+ const rs = this.receiveMethod({
159
+ content: this.nextContent
160
+ })
161
+ if (rs && rs.finally) {
162
+ this.receiveing = true
163
+ rs.finally(() => {
164
+ this.receiveing = false
165
+ })
166
+ }
167
+ }
168
+ }
169
+ }
170
+ </script>
171
+ <style lang="less">
172
+ .sdk-chat-control-transfer--default{
173
+ line-height: 1.5em;
174
+ &:not(.is-expire) {
175
+ background-color: #f79d46;
176
+ border: 1px solid #f79d46;
177
+ }
178
+ &.is-expire{
179
+ background-color: #f9b676;
180
+ border: 1px solid #f9b676;
181
+ }
182
+ .sdk-chat-control-transfer__main{
183
+ width: 212px;
184
+ padding: 12px;
185
+ display: flex;
186
+ flex-direction: row;
187
+ color: #fff;
188
+ }
189
+ .sdk-chat-control-transfer__info{
190
+ margin-top: -2px;
191
+ }
192
+ .sdk-chat-control-transfer__icon{
193
+ border: 1px solid #fff;
194
+ border-radius: 50%;
195
+ width: 30px;
196
+ height: 30px;
197
+ display: flex;
198
+ flex-direction: column;
199
+ justify-content: center;
200
+ align-items: center;
201
+ margin-right: 12px;
202
+ }
203
+ .sdk-chat-control-transfer__addon{
204
+ display: flex;
205
+ flex-direction: row;
206
+ align-items: center;
207
+ padding: 0 12px;
208
+ justify-content: space-between;
209
+ height: 24px;
210
+ line-height: 24px;
211
+ background-color: #fff;
212
+ border-bottom-left-radius: 3px;
213
+ border-bottom-right-radius: 3px;
214
+ }
215
+ .sdk-chat-control-transfer__category{
216
+ height: 24px;
217
+ line-height: 24px;
218
+ font-size: 12px;
219
+ display: block;
220
+ color: #999;
221
+ }
222
+ .sdk-chat-control-transfer__action{
223
+ display: flex;
224
+ flex-direction: row;
225
+ align-items: center;
226
+ }
227
+ .sdk-chat-control-transfer__action-item{
228
+ font-size: 12px;
229
+ opacity: 0.7;
230
+ cursor: pointer;
231
+ transition: all .25s;
232
+ display: flex;
233
+ flex-direction: row;
234
+ align-items: center;
235
+ margin-left: 12px;
236
+ &:hover {
237
+ opacity: 1;
238
+ }
239
+ }
240
+ .sdk-chat-control-transfer__action-item-icon {
241
+ margin-right: 4px;
242
+ }
243
+ }
244
+ .sdk-chat-control-transfer--quote {
245
+ display: flex;
246
+ flex-direction: row;
247
+ .sdk-chat-control-transfer__icon {
248
+ display: inline-block;
249
+ width: 18px;
250
+ height: 18px;
251
+ margin-right: 4px;
252
+ min-width: 18px;
253
+ vertical-align: top;
254
+ margin-top: 2px;
255
+ color: #999;
256
+ background: url('./quote-icon.svg') no-repeat 50% 50%;
257
+ background-size: cover;
258
+ }
259
+ .sdk-chat-control-transfer__title{
260
+ margin-right: 6px;
261
+ }
262
+ }
263
+ </style>
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <div class="sdk-chat-control-unkonw">未知消息类型</div>
3
+ </template>
4
+ <script>
5
+ export default {
6
+ name: 'SdkChatControlUnkonw',
7
+ props: {
8
+ id: {
9
+ type: String
10
+ },
11
+ content: {
12
+ type: [String, Object]
13
+ }
14
+ }
15
+ }
16
+ </script>
17
+ <style lang="less">
18
+ .sdk-chat-control-unkonw{
19
+ padding: 10px;
20
+ }
21
+ </style>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1752134896820" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3164" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M721.75097682 628.5429685L675.14697266 581.87304662l46.60400416-46.6040034a164.79492162 164.79492162 0 1 0-233.05297852-233.05297851L442.09399414 348.85302734 395.4570315 302.24902318 442.12695338 255.64501978a230.71289088 230.71289088 0 0 1 326.29394531 326.29394532l-46.6369634 46.6040034z m-93.20800832 93.20800832l-46.63696264 46.6040034a230.71289088 230.71289088 0 0 1-326.29394531-326.29394532l46.63696263-46.6040034L348.85302734 442.12695338l-46.60400416 46.6040034a164.79492162 164.79492162 0 1 0 233.05297852 233.05297851l46.60400416-46.6040034 46.63696264 46.6040034z m-23.33496094-349.59594778l46.6369634 46.6369634-233.05297852 233.02001928-46.6369634-46.60400416 233.05297852-233.02001928z" fill="#999" p-id="3165"></path></svg>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg t="1731930511288" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1740" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
4
+ <path d="M0 0h1024v1024H0z" fill="#3664f8" p-id="1741"></path>
5
+ <path d="M363.05881933 813.70136597c-38.19004631 0-76.38009265-15.27601854-106.93212971-45.82805559-61.10407412-61.10407412-61.10407412-156.57918994-1e-8-217.68326407l80.1990973-80.19909727 53.46606485 53.46606485-80.19909728 80.19909729c-30.55203706 30.55203706-30.55203706 76.38009265 0 106.93212972 30.55203706 30.55203706 76.38009265 30.55203706 106.9321297 0l106.93212971-106.93212972c15.27601854-15.27601854 22.9140278-34.3710417 22.91402781-53.46606487S538.73303243 512 527.27601854 496.72398146L485.26696757 458.53393514l53.46606486-53.46606484 42.00905096 42.00905095C607.47511582 473.80995369 622.75113434 512 622.75113434 554.00905096c0 42.00905096-15.27601854 80.19909727-45.82805558 106.93212971l-106.93212972 106.93212972C443.25791661 798.42534744 401.24886566 813.70136597 363.05881933 813.70136597z" fill="#ffffff" p-id="9488"></path><path d="M485.26696757 618.93212971L443.25791661 580.74208339c-61.10407412-61.10407412-61.10407412-156.57918994 0-217.68326406l106.9321297-106.93212971c61.10407412-61.10407412 156.57918994-61.10407412 217.68326407 0 61.10407412 61.10407412 61.10407412 156.57918994 1e-8 217.68326406l-80.1990973 80.19909728-53.46606485-53.46606485 80.19909728-80.19909729c30.55203706-30.55203706 30.55203706-76.38009265 0-106.93212972-30.55203706-30.55203706-80.19909727-30.55203706-106.9321297 0L496.72398146 416.52488418c-30.55203706 30.55203706-30.55203706 76.38009265 1e-8 106.93212971l42.00905096 42.00905097L485.26696757 618.93212971z" fill="#ffffff" p-id="9489"></path>
6
+ </svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1602418855817" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6268" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M712.388923 10.24A268.918154 268.918154 0 0 0 442.683077 279.788308v408.49723c0 74.830769-61.44 136.270769-136.192 136.27077-74.830769 0-138.870154-61.44-138.870154-138.948923 0-77.430154 61.44-136.113231 136.270769-136.113231a66.166154 66.166154 0 0 0 66.717539-66.796308 66.166154 66.166154 0 0 0-66.796308-66.717538A268.366769 268.366769 0 0 0 44.898462 675.052308C39.384615 824.556308 154.308923 949.956923 303.812923 955.470769a268.918154 268.918154 0 0 0 269.705846-269.784615V277.267692c0-74.830769 61.44-136.192 136.192-136.192 74.752 0 136.113231 61.44 136.113231 136.192 0 74.830769-61.44 136.192-133.435077 136.192H709.710769a66.166154 66.166154 0 0 0-66.796307 66.717539 66.166154 66.166154 0 0 0 66.796307 66.796307 268.918154 268.918154 0 0 0 269.627077-269.705846 264.428308 264.428308 0 0 0-267.027692-267.027692z" p-id="6269" fill="#999"></path></svg>
@@ -0,0 +1,47 @@
1
+ <script>
2
+ import fileUrl from '../file-url/file-url.vue'
3
+
4
+ export default {
5
+ name: 'SdkChatPanelControlsUrlFile',
6
+ functional: true,
7
+ props: {
8
+ id: {
9
+ type: String
10
+ },
11
+ content: {
12
+ type: [Object, String]
13
+ },
14
+ type: {
15
+ type: String
16
+ },
17
+ updateChatBoxProp: {
18
+ type: Function
19
+ },
20
+ allowDownload: {
21
+ type: [Boolean, Function],
22
+ default: false
23
+ },
24
+ previewMethod: {
25
+ type: Function
26
+ },
27
+ allowPreview: {
28
+ type: [Boolean, Function],
29
+ default: false
30
+ },
31
+ getDownloadTipsMethod: {
32
+ type: Function
33
+ },
34
+ downloadMethod: {
35
+ type: Function
36
+ },
37
+ cancelDownloadMethod: {
38
+ type: Function
39
+ }
40
+ },
41
+ render (h, c) {
42
+ return h(fileUrl, {
43
+ props: c.props
44
+ })
45
+ }
46
+ }
47
+ </script>
@@ -0,0 +1,169 @@
1
+ <template>
2
+ <div class="sdk-wechat-control-url-link" :class="['sdk-wechat-control-url-link--' + type, {'is-border': border}]">
3
+ <template v-if="type === 'default' || type === 'thumb'">
4
+ <div class="sdk-wechat-control-url-link__inner">
5
+ <div class="sdk-wechat-control-url-link__main">
6
+ <div class="sdk-wechat-control-url-link__info">
7
+ <strong class="sdk-wechat-control-url-link__title">{{title}}</strong>
8
+ <div class="sdk-wechat-control-url-link__description">{{description || url}}</div>
9
+ </div>
10
+ <div class="sdk-wechat-control-url-link__cover" v-if="cover" :style="{'background-image': `url(${cover})`}"></div>
11
+ </div>
12
+ <div class="sdk-wechat-control-url-link__foot">
13
+ 超链接
14
+ </div>
15
+ </div>
16
+ </template>
17
+ <template v-else-if="type === 'quote'">
18
+ <span class="sdk-wechat-control-url-link__title">{{title}}</span>
19
+ <div class="sdk-wechat-control-url-link__cover" v-if="cover" :style="{'background-image': `url(${cover})`}"></div>
20
+ </template>
21
+ </div>
22
+ </template>
23
+ <script>
24
+ import { parse } from '../../../utils/json'
25
+ import { formatOssPath } from '@aochuang/common/utils/oss'
26
+
27
+ export default {
28
+ name: 'SdkWecahtControlUrlLink',
29
+ props: {
30
+ id: {
31
+ type: String
32
+ },
33
+ type: {
34
+ type: String
35
+ },
36
+ content: {
37
+ type: [String, Object]
38
+ },
39
+ updateChatBoxProp: {
40
+ type: Function
41
+ }
42
+ },
43
+ inject: {
44
+ SdkChatPanelBox: {
45
+ default: null
46
+ }
47
+ },
48
+ computed: {
49
+ nextContent () {
50
+ return parse(this.content)
51
+ },
52
+ title () {
53
+ return this.nextContent.title
54
+ },
55
+ description () {
56
+ return this.nextContent.desc
57
+ },
58
+ cover () {
59
+ return formatOssPath(this.nextContent.thumbPath) || require('./icons/link.svg')
60
+ },
61
+ url () {
62
+ return this.nextContent.url
63
+ },
64
+ border () {
65
+ if (this.type === 'quote') {
66
+ return false
67
+ }
68
+ return !this.SdkChatPanelBox
69
+ }
70
+ },
71
+ created () {
72
+ if (this.url && this.updateChatBoxProp) {
73
+ this.updateChatBoxProp('href', this.url)
74
+ }
75
+ }
76
+ }
77
+ </script>
78
+ <style lang="less">
79
+ .sdk-wechat-control-url-link{
80
+ display: inline-block;
81
+ max-width: 100%;
82
+ &.is-border {
83
+ border: 1px solid #eee;
84
+ border-radius: 4px;
85
+ }
86
+ }
87
+ .sdk-wechat-control-url-link--default,
88
+ .sdk-wechat-control-url-link--thumb{
89
+ word-break: break-all;
90
+ line-height: 1.5em;
91
+ border-radius: 4px;
92
+ .sdk-wechat-control-url-link__inner{
93
+ max-width: 100%;
94
+ width: 248px;
95
+ color: #484848;
96
+ }
97
+ .sdk-wechat-control-url-link__main{
98
+ display: flex;
99
+ flex-direction: row;
100
+ padding-top: 3px;
101
+ padding: 6px 12px;
102
+ line-height: 1.5em;
103
+ }
104
+ .sdk-wechat-control-url-link__description{
105
+ color: #999;
106
+ word-break: break-all;
107
+ display: -webkit-box;
108
+ -webkit-box-orient: vertical;
109
+ -webkit-line-clamp: 3;
110
+ overflow: hidden;
111
+ }
112
+ .sdk-wechat-control-url-link__info{
113
+ flex: 1;
114
+ min-width: 0;
115
+ }
116
+ .sdk-wechat-control-url-link__title{
117
+ display: block;
118
+ margin-bottom: 4px;
119
+ display: -webkit-box;
120
+ -webkit-box-orient: vertical;
121
+ -webkit-line-clamp: 1; /* 限制显示3行 */
122
+ overflow: hidden;
123
+ }
124
+ .sdk-wechat-control-url-link__cover{
125
+ display: inline-block;
126
+ width: 48px;
127
+ height: 48px;
128
+ background-position: 50% 50%;
129
+ background-repeat: no-repeat;
130
+ background-size: cover;
131
+ margin-left: 12px;
132
+ margin-top: 12px;
133
+ background-color: rgba(0,0,0,.1);
134
+ }
135
+ .sdk-wechat-control-url-link__foot{
136
+ padding: 0 12px;
137
+ border-top: 1px solid #eee;
138
+ color: #999;
139
+ font-size: 12px;
140
+ height: 24px;
141
+ line-height: 24px;
142
+ box-sizing: content-box;
143
+ }
144
+ }
145
+ .sdk-wechat-control-url-link--thumb{
146
+ background-color: #fff;
147
+ .sdk-wechat-control-url-link__description{
148
+ -webkit-line-clamp: 2;
149
+ }
150
+ }
151
+ .sdk-wechat-control-url-link--quote {
152
+ display: flex;
153
+ flex-direction: row;
154
+ max-width: 320px;
155
+ .sdk-wechat-control-url-link__cover {
156
+ width: 52px;
157
+ height: 52px;
158
+ min-width: 52px;
159
+ background-position: 50% 50%;
160
+ background-repeat: no-repeat;
161
+ background-size: cover;
162
+ background-color: rgba(0,0,0,.1);
163
+ }
164
+ .sdk-wechat-control-url-link__title{
165
+ margin-right: 6px;
166
+ }
167
+ }
168
+ </style>
169
+
@@ -0,0 +1,164 @@
1
+ <template>
2
+ <div class="wechat-record-panel-chat-link-merged" :class="['wechat-record-panel-chat-link-merged--' + type]">
3
+ <template v-if="type === 'default' || type === 'thumb'">
4
+ <div class="wechat-record-panel-chat-link-merged__main" :class="{'is-loading': mergeding}" @click="handleLoadMergedMsg">
5
+ <span class="wechat-record-panel-chat-link-merged__trigger" v-if="!mergedData">
6
+ <ui-icon :name="mergeding ? 'loading' : 'arrow-down-circle-line'" :size="18"></ui-icon> 查看合并转发消息
7
+ </span>
8
+ <div class="wechat-record-panel-chat-link-merged__msgs" v-else-if="mergedData && mergedData.length">
9
+ <div
10
+ class="wechat-record-panel-chat-link-merged__msgs-item"
11
+ v-for="(item, index) in mergedData"
12
+ :key="index"
13
+ >
14
+ <div class="wechat-record-panel-chat-link-merged__msgs-item-head">
15
+ <span class="wechat-record-panel-chat-link-merged__msgs-item-user">{{ item.sourcename }}</span>
16
+ <span class="wechat-record-panel-chat-link-merged__msgs-item-date">{{ handleFormatSourceTime(item.sourcetime) }}</span>
17
+ </div>
18
+ <div class="wechat-record-panel-chat-link-merged__msgs-item-body">
19
+ <template v-if="item.datatype == '2'">
20
+ 【图片】
21
+ </template>
22
+ <template v-else>
23
+ <div class="wechat-record-panel-chat-link-merged__msgs-item-text" v-html="handleFormatMergedDesc(item.datadesc)"></div>
24
+ </template>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ <div v-else>暂无消息数据</div>
29
+ <div class="wechat-record-panel-chat-link-merged__msgs-foot">聊天记录</div>
30
+ </div>
31
+ </template>
32
+ <template v-else-if="type === 'quote'">
33
+ [聊天记录]合并的聊天记录
34
+ </template>
35
+ </div>
36
+ </template>
37
+ <script>
38
+ import axios from 'axios'
39
+ import { unUnicode, html2Escape } from '../../../utils/string'
40
+ import { parseXml } from '../../../utils/json'
41
+ import { formatOssPath } from '@aochuang/common/utils/oss'
42
+
43
+ export default {
44
+ name: 'AcWechatChatPanelControlUrlMerge',
45
+ props: {
46
+ id: {
47
+ type: String
48
+ },
49
+ type: {
50
+ type: String
51
+ },
52
+ content: {
53
+ type: String
54
+ },
55
+ beforeLoad: {
56
+ type: Function
57
+ }
58
+ },
59
+ data () {
60
+ return {
61
+ mergeding: false,
62
+ mergedData: null
63
+ }
64
+ },
65
+ methods: {
66
+ handleFormatMergedDesc (desc) {
67
+ return html2Escape(unUnicode(desc))
68
+ },
69
+ handleFormatSourceTime (date) {
70
+ if (!date) {
71
+ return date
72
+ }
73
+ return date.replace('&#x20;', ' ')
74
+ },
75
+ handleLoadMergedMsg () {
76
+ if (!this.content) {
77
+ return
78
+ }
79
+ if (this.mergeding) {
80
+ return
81
+ }
82
+ let ps = Promise.resolve()
83
+ if (this.beforeLoad) {
84
+ const rs = this.beforeLoad()
85
+ if (rs && rs.then) {
86
+ ps = rs
87
+ } else if (rs === false) {
88
+ return
89
+ }
90
+ }
91
+ ps.then(() => {
92
+ this.mergeding = true
93
+ axios.get(formatOssPath(this.content)).then(({ data }) => {
94
+ if (typeof data === 'string') {
95
+ const xmlData = parseXml(data)
96
+ if (xmlData && xmlData.recorditem && xmlData.recorditem.recordinfo && xmlData.recorditem.recordinfo.datalist) {
97
+ data = xmlData.recorditem.recordinfo.datalist.dataitem
98
+ }
99
+ }
100
+ this.mergeding = false
101
+ this.mergedData = (data || []).filter(v => {
102
+ return v.datadesc || v.sourcename || v.sourcetime
103
+ })
104
+ }, () => {
105
+ this.mergeding = false
106
+ })
107
+ })
108
+ }
109
+ }
110
+ }
111
+ </script>
112
+ <style lang="less">
113
+ .wechat-record-panel-chat-link-merged__main{
114
+ width: 340px;
115
+ &.is-loading{
116
+ cursor: not-allowed;
117
+ .wechat-record-panel-chat-link-merged__trigger {
118
+ color: #888;
119
+ }
120
+ }
121
+ }
122
+ .wechat-record-panel-chat-link-merged__trigger{
123
+ padding: 12px;
124
+ display: flex;
125
+ flex-direction: row;
126
+ align-items: center;
127
+ cursor: pointer;
128
+ .ui-icon{
129
+ vertical-align: top;
130
+ display: inline-block;
131
+ margin-right: 4px;
132
+ }
133
+ }
134
+ .wechat-record-panel-chat-link-merged__msgs{
135
+ padding: 6px 12px;
136
+ }
137
+ .wechat-record-panel-chat-link-merged__msgs-item{
138
+ padding: 6px 0;
139
+ border-bottom: 1px solid #eee;
140
+ &:last-child{
141
+ border-bottom: 0;
142
+ }
143
+ }
144
+ .wechat-record-panel-chat-link-merged__msgs-item-head{
145
+ margin-bottom: 4px;
146
+ display: flex;
147
+ justify-content: space-between;
148
+ color: #888;
149
+ }
150
+ .wechat-record-panel-chat-link-merged__msgs-foot{
151
+ padding: 0 12px;
152
+ border-top: 1px solid rgba(0,0,0,.1);
153
+ background-size: 12px;
154
+ font-size: 12px;
155
+ height: 24px;
156
+ line-height: 24px;
157
+ color: #888;
158
+ }
159
+ .wechat-record-panel-chat-link-merged--thumb {
160
+ border: 1px solid #eee;
161
+ border-radius: 3px;
162
+ display: inline-block;
163
+ }
164
+ </style>