@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.
- package/README.md +93 -0
- package/common/avatar/avatar.vue +86 -0
- package/common/avatar/index.js +3 -0
- package/common/badge/badge.vue +105 -0
- package/common/badge/index.js +3 -0
- package/common/context-menu/context-menu-box.vue +61 -0
- package/common/context-menu/context-menu-group.vue +162 -0
- package/common/context-menu/context-menu-item.vue +179 -0
- package/common/context-menu/context-menu.vue +201 -0
- package/common/context-menu/index.js +3 -0
- package/common/context-menu/utils.js +138 -0
- package/common/friend-avatar/default.svg +1 -0
- package/common/friend-avatar/friend-avatar.vue +29 -0
- package/common/friend-avatar/index.js +3 -0
- package/common/image/index.js +3 -0
- package/common/index.js +17 -0
- package/common/room-avatar/default.svg +6 -0
- package/common/room-avatar/index.js +3 -0
- package/common/room-avatar/room-avatar.vue +29 -0
- package/common/scroll-load-more/index.js +3 -0
- package/common/scroll-load-more/scroll-load-more.vue +195 -0
- package/common/user-avatar/default.svg +1 -0
- package/common/user-avatar/index.js +3 -0
- package/common/user-avatar/user-avatar.vue +29 -0
- package/components/account-select/account-select-skeleton.vue +56 -0
- package/components/account-select/account-select.vue +205 -0
- package/components/account-select/all.svg +1 -0
- package/components/account-select/index.js +3 -0
- package/components/chat-editor/MENTION_TOKEN_SUMMARY.md +74 -0
- package/components/chat-editor/chat-editor-button/chat-editor-button.vue +78 -0
- package/components/chat-editor/chat-editor-suggestions/chat-editor-suggestions.vue +329 -0
- package/components/chat-editor/chat-editor-toolbar/chat-editor-toolbar-item.vue +28 -0
- package/components/chat-editor/chat-editor-toolbar/chat-editor-toolbar.vue +17 -0
- package/components/chat-editor/chat-editor.vue +933 -0
- package/components/chat-editor/index.js +12 -0
- package/components/chat-editor/utils.js +189 -0
- package/components/chat-friend-profile/chat-friend-profile.vue +118 -0
- package/components/chat-friend-profile/index.js +3 -0
- package/components/chat-layout/chat-layout.vue +71 -0
- package/components/chat-layout/index.js +3 -0
- package/components/chat-panel/chat-panel-box.vue +350 -0
- package/components/chat-panel/chat-panel-chat.vue +121 -0
- package/components/chat-panel/chat-panel-chats.vue +674 -0
- package/components/chat-panel/chat-panel-empty.vue +32 -0
- package/components/chat-panel/chat-panel-increment.vue +80 -0
- package/components/chat-panel/chat-panel-inner-msg.vue +25 -0
- package/components/chat-panel/chat-panel-loading.vue +29 -0
- package/components/chat-panel/chat-panel-nearest.vue +136 -0
- package/components/chat-panel/chat-panel.vue +292 -0
- package/components/chat-panel/index.js +3 -0
- package/components/chat-panel/util.js +83 -0
- package/components/chat-room-profile/chat-room-profile.vue +103 -0
- package/components/chat-room-profile/index.js +3 -0
- package/components/contacts-friend-select/contacts-friend-select-skeleton.vue +41 -0
- package/components/contacts-friend-select/contacts-friend-select.vue +204 -0
- package/components/contacts-friend-select/index.js +3 -0
- package/components/contacts-group-select/contacts-group-select-item.vue +98 -0
- package/components/contacts-group-select/contacts-group-select-skeleton.vue +81 -0
- package/components/contacts-group-select/contacts-group-select.vue +396 -0
- package/components/contacts-group-select/index.js +3 -0
- package/components/contacts-room-select/contacts-room-select-skeleton.vue +41 -0
- package/components/contacts-room-select/contacts-room-select.vue +208 -0
- package/components/contacts-room-select/index.js +3 -0
- package/components/index.js +43 -0
- package/components/layout/index.js +3 -0
- package/components/layout/layout.vue +70 -0
- package/components/session-select/index.js +11 -0
- package/components/session-select/session-select-item-skeleton.vue +59 -0
- package/components/session-select/session-select-item.vue +190 -0
- package/components/session-select/session-select.vue +386 -0
- package/components/wechat-chat-control/calling/calling.vue +227 -0
- package/components/wechat-chat-control/calling/phone-fill.svg +1 -0
- package/components/wechat-chat-control/calling/vidicon-fill.svg +1 -0
- package/components/wechat-chat-control/channel-live/channel-live.vue +198 -0
- package/components/wechat-chat-control/channel-live/quote-icon.svg +1 -0
- package/components/wechat-chat-control/channel-video/channel-video.vue +180 -0
- package/components/wechat-chat-control/channel-video/quote-icon.svg +1 -0
- package/components/wechat-chat-control/channel-video-card/channel-video-card.vue +139 -0
- package/components/wechat-chat-control/channel-video-card/quote-icon.svg +1 -0
- package/components/wechat-chat-control/company-card/company-card.vue +136 -0
- package/components/wechat-chat-control/company-card/quote-icon.svg +1 -0
- package/components/wechat-chat-control/custom-expression/custom-expression.vue +45 -0
- package/components/wechat-chat-control/empty/empty.vue +27 -0
- package/components/wechat-chat-control/file-url/file-url.vue +307 -0
- package/components/wechat-chat-control/file-url/icons/file-excel-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-info-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-music-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-pdf-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-ppt-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-settings-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-text-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-unknow-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-word-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-zip-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/index.js +24 -0
- package/components/wechat-chat-control/image/image.vue +344 -0
- package/components/wechat-chat-control/image/index.js +1 -0
- package/components/wechat-chat-control/image/util.js +29 -0
- package/components/wechat-chat-control/index.js +104 -0
- package/components/wechat-chat-control/jx-sys-text/jx-sys-text.vue +28 -0
- package/components/wechat-chat-control/location/location.vue +179 -0
- package/components/wechat-chat-control/location/offline-bg.png +0 -0
- package/components/wechat-chat-control/member-change/member-change.vue +37 -0
- package/components/wechat-chat-control/music/icons/163.png +0 -0
- package/components/wechat-chat-control/music/icons/163.svg +12 -0
- package/components/wechat-chat-control/music/icons/default.png +0 -0
- package/components/wechat-chat-control/music/icons/default.svg +1 -0
- package/components/wechat-chat-control/music/icons/kuwo.png +0 -0
- package/components/wechat-chat-control/music/icons/qq.png +0 -0
- package/components/wechat-chat-control/music/icons/qq.svg +1 -0
- package/components/wechat-chat-control/music/music.vue +156 -0
- package/components/wechat-chat-control/music/utils.js +30 -0
- package/components/wechat-chat-control/quote-message/quote-message.vue +257 -0
- package/components/wechat-chat-control/real-time-position/icon.svg +1 -0
- package/components/wechat-chat-control/real-time-position/real-time-position.vue +57 -0
- package/components/wechat-chat-control/red-envelopes/quote-icon.svg +1 -0
- package/components/wechat-chat-control/red-envelopes/red-envelope.svg +1 -0
- package/components/wechat-chat-control/red-envelopes/red-envelopes.vue +168 -0
- package/components/wechat-chat-control/revoke-me-message/revoke-me-message.vue +41 -0
- package/components/wechat-chat-control/revoke-other-message/revoke-other-message.vue +41 -0
- package/components/wechat-chat-control/revoke-you-message/revoke-you-message.vue +41 -0
- package/components/wechat-chat-control/room-calling/phone-fill.svg +1 -0
- package/components/wechat-chat-control/room-calling/room-calling.vue +52 -0
- package/components/wechat-chat-control/room-calling/vidicon-fill.svg +1 -0
- package/components/wechat-chat-control/share-card/quote-icon.svg +1 -0
- package/components/wechat-chat-control/share-card/share-card.vue +140 -0
- package/components/wechat-chat-control/system/system.vue +122 -0
- package/components/wechat-chat-control/system-batch-message/system-batch-message.vue +28 -0
- package/components/wechat-chat-control/system-money/system-money.vue +39 -0
- package/components/wechat-chat-control/text/icons/icon.svg +6 -0
- package/components/wechat-chat-control/text/text.vue +164 -0
- package/components/wechat-chat-control/text-with-at/text-with-at.vue +88 -0
- package/components/wechat-chat-control/transfer/collection.svg +1 -0
- package/components/wechat-chat-control/transfer/quote-icon.svg +1 -0
- package/components/wechat-chat-control/transfer/red-transfer.svg +1 -0
- package/components/wechat-chat-control/transfer/refund.svg +1 -0
- package/components/wechat-chat-control/transfer/transfer.svg +1 -0
- package/components/wechat-chat-control/transfer/transfer.vue +263 -0
- package/components/wechat-chat-control/unknow/unknow.vue +21 -0
- package/components/wechat-chat-control/url/icons/link.svg +1 -0
- package/components/wechat-chat-control/url/icons/video.svg +6 -0
- package/components/wechat-chat-control/url/miniprogram.svg +1 -0
- package/components/wechat-chat-control/url/url-file.vue +47 -0
- package/components/wechat-chat-control/url/url-link.vue +169 -0
- package/components/wechat-chat-control/url/url-merge.vue +164 -0
- package/components/wechat-chat-control/url/url-miniprogram.vue +259 -0
- package/components/wechat-chat-control/url/url.vue +116 -0
- package/components/wechat-chat-control/util.js +234 -0
- package/components/wechat-chat-control/video/icons/video.svg +1 -0
- package/components/wechat-chat-control/video/video.vue +304 -0
- package/components/wechat-chat-control/voice/icons/voice.svg +1 -0
- package/components/wechat-chat-control/voice/voice.vue +464 -0
- package/components/wechat-chat-control/wechat-chat-control-config-item.vue +24 -0
- package/components/wechat-chat-control/wechat-chat-control-config-msg.vue +21 -0
- package/components/wechat-chat-control/wechat-chat-control-config.vue +57 -0
- package/components/wechat-chat-panel/chat-panel-chat-status/chat-panel-chat-status.vue +69 -0
- package/components/wechat-chat-panel/chat-panel-item.vue +695 -0
- package/components/wechat-chat-panel/chat-panel.vue +257 -0
- package/components/wechat-chat-panel/index.js +3 -0
- package/components/wework-chat-control/calling/calling.vue +223 -0
- package/components/wework-chat-control/calling/phone-fill.svg +1 -0
- package/components/wework-chat-control/calling/vidicon-fill.svg +1 -0
- package/components/wework-chat-control/channel-live/channel-live.vue +198 -0
- package/components/wework-chat-control/channel-live/quote-icon.svg +1 -0
- package/components/wework-chat-control/channel-video/channel-video.vue +180 -0
- package/components/wework-chat-control/channel-video/quote-icon.svg +1 -0
- package/components/wework-chat-control/company-card/company-card.vue +136 -0
- package/components/wework-chat-control/company-card/quote-icon.svg +1 -0
- package/components/wework-chat-control/custom-expression/custom-expression.vue +34 -0
- package/components/wework-chat-control/empty/empty.vue +27 -0
- package/components/wework-chat-control/expression/expression.vue +53 -0
- package/components/wework-chat-control/file-url/file-url.vue +247 -0
- package/components/wework-chat-control/file-url/icons/file-excel-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-info-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-music-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-pdf-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-ppt-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-settings-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-text-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-unknow-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-word-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-zip-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/index.js +24 -0
- package/components/wework-chat-control/image/image.vue +296 -0
- package/components/wework-chat-control/image/index.js +1 -0
- package/components/wework-chat-control/image/util.js +21 -0
- package/components/wework-chat-control/index.js +105 -0
- package/components/wework-chat-control/jx-sys-text/jx-sys-text.vue +28 -0
- package/components/wework-chat-control/link/link.vue +100 -0
- package/components/wework-chat-control/location/location.vue +181 -0
- package/components/wework-chat-control/location/offline-bg.png +0 -0
- package/components/wework-chat-control/red-envelopes/quote-icon.svg +1 -0
- package/components/wework-chat-control/red-envelopes/red-envelope.svg +1 -0
- package/components/wework-chat-control/red-envelopes/red-envelopes.vue +168 -0
- package/components/wework-chat-control/share-card/quote-icon.svg +1 -0
- package/components/wework-chat-control/share-card/share-card.vue +140 -0
- package/components/wework-chat-control/text/icons/icon.svg +6 -0
- package/components/wework-chat-control/text/text.vue +157 -0
- package/components/wework-chat-control/unknow/unknow.vue +21 -0
- package/components/wework-chat-control/url/icons/link.svg +1 -0
- package/components/wework-chat-control/url/icons/video.svg +6 -0
- package/components/wework-chat-control/url/miniprogram.svg +1 -0
- package/components/wework-chat-control/url/url-file.vue +37 -0
- package/components/wework-chat-control/url/url-link.vue +169 -0
- package/components/wework-chat-control/url/url-merge.vue +164 -0
- package/components/wework-chat-control/url/url-miniprogram.vue +248 -0
- package/components/wework-chat-control/url/url.vue +103 -0
- package/components/wework-chat-control/util.js +223 -0
- package/components/wework-chat-control/video/icons/video.svg +1 -0
- package/components/wework-chat-control/video/video.vue +304 -0
- package/components/wework-chat-control/voice/icons/voice.svg +1 -0
- package/components/wework-chat-control/voice/voice.vue +464 -0
- package/components/wework-chat-panel/chat-panel-controls/company-card/company-card.vue +35 -0
- package/components/wework-chat-panel/chat-panel-controls/expression/expression.vue +36 -0
- package/components/wework-chat-panel/chat-panel-controls/file-url/file-url.vue +35 -0
- package/components/wework-chat-panel/chat-panel-controls/image/image.vue +36 -0
- package/components/wework-chat-panel/chat-panel-controls/index.js +35 -0
- package/components/wework-chat-panel/chat-panel-controls/jx-sys-text/jx-sys-text.vue +28 -0
- package/components/wework-chat-panel/chat-panel-controls/link/link.vue +35 -0
- package/components/wework-chat-panel/chat-panel-controls/location/location.vue +35 -0
- package/components/wework-chat-panel/chat-panel-controls/text/text.vue +43 -0
- package/components/wework-chat-panel/chat-panel-controls/unkonw/unkonw.vue +39 -0
- package/components/wework-chat-panel/chat-panel-controls/video/video.vue +37 -0
- package/components/wework-chat-panel/chat-panel-controls/voice/voice.vue +35 -0
- package/components/wework-chat-panel/chat-panel-item.vue +650 -0
- package/components/wework-chat-panel/chat-panel.vue +163 -0
- package/components/wework-chat-panel/index.js +3 -0
- package/package.json +23 -0
- package/services/client-chat/client-chat-wechat/client-chat-account.js +426 -0
- package/services/client-chat/client-chat-wechat/client-chat-concats.js +1029 -0
- package/services/client-chat/client-chat-wechat/client-chat-draft.js +92 -0
- package/services/client-chat/client-chat-wechat/client-chat-message.js +588 -0
- package/services/client-chat/client-chat-wechat/client-chat-session-manage.js +67 -0
- package/services/client-chat/client-chat-wechat/client-chat-session.js +1048 -0
- package/services/client-chat/client-chat-wechat/client-chat-socket.js +215 -0
- package/services/client-chat/client-chat-wechat/client-chat.js +1065 -0
- package/services/client-chat/client-chat-wechat/index.js +3 -0
- package/services/client-chat/client-chat-wechat/utils.js +82 -0
- package/services/client-chat/client-chat-wework/client-chat-account.js +310 -0
- package/services/client-chat/client-chat-wework/client-chat-concats.js +772 -0
- package/services/client-chat/client-chat-wework/client-chat-message.js +278 -0
- package/services/client-chat/client-chat-wework/client-chat-session.js +929 -0
- package/services/client-chat/client-chat-wework/client-chat-socket.js +64 -0
- package/services/client-chat/client-chat-wework/client-chat.js +330 -0
- package/services/client-chat/client-chat-wework/index.js +3 -0
- package/services/client-chat/client-chat-wework/utils.js +82 -0
- package/services/index.js +10 -0
- package/services/socket/index.js +5 -0
- package/services/socket/socket.js +797 -0
- package/services/socket/utils.js +7 -0
- package/uni-common/account-portray/account-portray.vue +51 -0
- package/uni-common/account-select/account-select-item.vue +172 -0
- package/uni-common/account-select/account-select.vue +252 -0
- package/uni-common/all-friend-avatar/all-friend-avatar.vue +49 -0
- package/uni-common/friend-avatar/default.svg +1 -0
- package/uni-common/friend-avatar/friend-avatar.vue +27 -0
- package/uni-common/friend-avatar/index.js +3 -0
- package/uni-common/friend-loader/friend-loader.vue +53 -0
- package/uni-common/friend-portray/friend-portray.vue +56 -0
- package/uni-common/group-avatar/default.svg +1 -0
- package/uni-common/group-avatar/group-avatar.vue +18 -0
- package/uni-common/group-avatar/index.js +3 -0
- package/uni-common/room-avatar/default.svg +6 -0
- package/uni-common/room-avatar/index.js +3 -0
- package/uni-common/room-avatar/room-avatar.vue +27 -0
- package/uni-common/room-loader/room-loader.vue +53 -0
- package/uni-common/room-portray/room-portray.vue +56 -0
- package/uni-components/chat-control/calling/calling.vue +91 -0
- package/uni-components/chat-control/calling/phone-fill.svg +1 -0
- package/uni-components/chat-control/calling/vidicon-fill.svg +1 -0
- package/uni-components/chat-control/channel-video/channel-video.vue +89 -0
- package/uni-components/chat-control/channel-video-card/channel-video-card.vue +105 -0
- package/uni-components/chat-control/channel-video-live/channel-video-live.vue +92 -0
- package/uni-components/chat-control/chat-control-config-item/chat-control-config-item.vue +20 -0
- package/uni-components/chat-control/chat-control-config-item/index.js +3 -0
- package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-app.vue +25 -0
- package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-h5.vue +21 -0
- package/uni-components/chat-control/chat-control-config.vue +59 -0
- package/uni-components/chat-control/chat-control.vue +218 -0
- package/uni-components/chat-control/company-card/company-card.vue +123 -0
- package/uni-components/chat-control/const.js +28 -0
- package/uni-components/chat-control/expression/expression.vue +41 -0
- package/uni-components/chat-control/image/image.vue +68 -0
- package/uni-components/chat-control/index.js +89 -0
- package/uni-components/chat-control/location/location.vue +110 -0
- package/uni-components/chat-control/member-change/member-change.vue +32 -0
- package/uni-components/chat-control/quote-message/quote-message.vue +216 -0
- package/uni-components/chat-control/real-time-position/real-time-position.vue +62 -0
- package/uni-components/chat-control/redpacket/red-envelope.svg +1 -0
- package/uni-components/chat-control/redpacket/redpacket.vue +75 -0
- package/uni-components/chat-control/share-card/share-card.vue +101 -0
- package/uni-components/chat-control/system/system.vue +69 -0
- package/uni-components/chat-control/system-batch-message/system-batch-message.vue +30 -0
- package/uni-components/chat-control/system-text/system-text.vue +32 -0
- package/uni-components/chat-control/text/text.vue +67 -0
- package/uni-components/chat-control/text-with-at/text-with-at.vue +51 -0
- package/uni-components/chat-control/transfer/red-transfer.svg +1 -0
- package/uni-components/chat-control/transfer/transfer.vue +80 -0
- package/uni-components/chat-control/unkonw/unkonw.vue +37 -0
- package/uni-components/chat-control/url/icons/file-excel-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-info-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-music-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-pdf-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-ppt-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-settings-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-text-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-unknow-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-word-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-zip-line.svg +1 -0
- package/uni-components/chat-control/url/icons/index.js +24 -0
- package/uni-components/chat-control/url/miniprogram.svg +1 -0
- package/uni-components/chat-control/url/url-miniprogram.vue +116 -0
- package/uni-components/chat-control/url/url.vue +306 -0
- package/uni-components/chat-control/url-new/icons/file-excel-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-info-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-music-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-pdf-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-ppt-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-settings-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-text-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-unknow-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-word-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-zip-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/index.js +24 -0
- package/uni-components/chat-control/url-new/url-new.vue +110 -0
- package/uni-components/chat-control/utils.js +12 -0
- package/uni-components/chat-control/video/video.vue +156 -0
- package/uni-components/chat-control/voice/voice.vue +166 -0
- package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-collect.vue +84 -0
- package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-system.vue +28 -0
- package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet.vue +85 -0
- package/uni-components/chat-editor/chat-editor-func/chat-editor-func.vue +157 -0
- package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at-panel.vue +158 -0
- package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at.vue +61 -0
- package/uni-components/chat-editor/chat-editor-func-button/chat-editor-func-button.vue +58 -0
- package/uni-components/chat-editor/chat-editor-func-file/chat-editor-func-file.vue +54 -0
- package/uni-components/chat-editor/chat-editor-func-image/chat-editor-func-image.vue +42 -0
- package/uni-components/chat-editor/chat-editor-func-video/chat-editor-func-video.vue +42 -0
- package/uni-components/chat-editor/chat-editor-func-voice/chat-editor-func-voice.vue +25 -0
- package/uni-components/chat-editor/chat-editor-message-send/chat-editor-message-send.vue +158 -0
- package/uni-components/chat-editor/chat-editor-quote/chat-editor-quote.vue +75 -0
- package/uni-components/chat-editor/chat-editor.vue +257 -0
- package/uni-components/chat-editor/index.js +10 -0
- package/uni-components/chat-editor/util.js +65 -0
- package/uni-components/chat-panel/chat-panel-chats-box.vue +238 -0
- package/uni-components/chat-panel/chat-panel-chats-forward/chat-panel-chats-forward.vue +273 -0
- package/uni-components/chat-panel/chat-panel-chats-item.vue +578 -0
- package/uni-components/chat-panel/chat-panel-chats-status/chat-panel-chats-status.vue +71 -0
- package/uni-components/chat-panel/chat-panel-chats.vue +368 -0
- package/uni-components/chat-panel/chat-panel.vue +227 -0
- package/uni-components/contacts-group-select/contacts-group-select-item.vue +85 -0
- package/uni-components/contacts-group-select/contacts-group-select-panel.vue +119 -0
- package/uni-components/contacts-group-select/contacts-group-select.vue +150 -0
- package/utils/color.js +178 -0
- package/utils/data.js +11 -0
- package/utils/date.js +107 -0
- package/utils/event.js +3 -0
- package/utils/file.js +26 -0
- package/utils/index.js +5 -0
- package/utils/json.js +40 -0
- package/utils/log.js +243 -0
- package/utils/queue.js +97 -0
- package/utils/regexp.js +9 -0
- package/utils/string.js +66 -0
- package/utils/url.js +48 -0
- package/utils/util.js +130 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sdk-chat-control-location" :class="['sdk-chat-control-location--' + type]">
|
|
3
|
+
<template v-if="type === 'default'">
|
|
4
|
+
<div class="sdk-chat-control-location__main">
|
|
5
|
+
<div class="sdk-chat-control-location__head">
|
|
6
|
+
<h4 class="sdk-chat-control-location__title">{{address}}</h4>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="sdk-chat-control-location__body">
|
|
9
|
+
<div v-if="offline" class="sdk-chat-control-location__offline">
|
|
10
|
+
<div class="sdk-chat-control-location__offline-label">腾讯地图经纬度坐标:</div>
|
|
11
|
+
<div class="sdk-chat-control-location__offline-value">{{longitude}}、{{latitude}}</div>
|
|
12
|
+
<div class="sdk-chat-control-location__offline-tips">提示:离线模式无法显示地图</div>
|
|
13
|
+
</div>
|
|
14
|
+
<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>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
<template v-else-if="type === 'quote'">
|
|
19
|
+
<div class="sdk-chat-control-location__main">
|
|
20
|
+
<span class="sdk-chat-control-location__icon">
|
|
21
|
+
<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>
|
|
22
|
+
</span>
|
|
23
|
+
<span class="sdk-chat-control-location__title">{{address}}</span>
|
|
24
|
+
<ac-static-map :map-key="mapKey" :enable-link="false" width="52" height="52" :lng="longitude" :lat="latitude" @map-created="handleStaticMapCreated"></ac-static-map>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
<script>
|
|
30
|
+
import AcStaticMap from '@aochuang/common/common/static-map'
|
|
31
|
+
import { parseXml } from '../../../utils/json'
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'SdkChatControlLocation',
|
|
35
|
+
components: {
|
|
36
|
+
AcStaticMap
|
|
37
|
+
},
|
|
38
|
+
props: {
|
|
39
|
+
id: {
|
|
40
|
+
type: String
|
|
41
|
+
},
|
|
42
|
+
content: {
|
|
43
|
+
type: String
|
|
44
|
+
},
|
|
45
|
+
type: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: 'default',
|
|
48
|
+
validator (value) {
|
|
49
|
+
return ['quote', 'default'].includes(value)
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* 离线模式
|
|
54
|
+
* 微聊天面板下载到本地浏览时会没有网络
|
|
55
|
+
*/
|
|
56
|
+
offline: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
},
|
|
60
|
+
mapKey: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: true
|
|
63
|
+
},
|
|
64
|
+
updateChatBoxProp: {
|
|
65
|
+
type: Function
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
computed: {
|
|
69
|
+
nextContent () {
|
|
70
|
+
// 政企版有这种数据,需要去除一下
|
|
71
|
+
// jojo4943:<br><msg><br> <location x="28.231337" y="113.041611" scale="15" label="湖南省长沙市开福区国润月湖郡7栋" maptype="roadmap" poiname="马栏山博创园" poiid="qqmap_1533871097335282393" buildingId="" floorName="" poiCategoryTips="房产小区:产业园区" poiBusinessHour="" poiPhone="" poiPriceTips="" isFromPoiList="true" adcode="430105" cityname="长沙市" fromusername="jojo4943" /><br></msg><br>
|
|
72
|
+
return parseXml((this.content || '').replace(/^.*?(?=<)/, '').replace(/<br>/ig, '')) || {}
|
|
73
|
+
},
|
|
74
|
+
address () {
|
|
75
|
+
return (this.nextContent.msg.location.cityname || '') + (this.nextContent.msg.location.label || '') + (this.nextContent.msg.location.poiname || '')
|
|
76
|
+
},
|
|
77
|
+
latitude () {
|
|
78
|
+
return Number(this.nextContent.msg.location.x)
|
|
79
|
+
},
|
|
80
|
+
longitude () {
|
|
81
|
+
return Number(this.nextContent.msg.location.y)
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
methods: {
|
|
85
|
+
handleStaticMapCreated ({ mapHref }) {
|
|
86
|
+
this.updateChatBoxProp && this.updateChatBoxProp('href', mapHref)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
</script>
|
|
91
|
+
<style lang="less">
|
|
92
|
+
.sdk-chat-control-location--default {
|
|
93
|
+
.sdk-chat-control-location__body{
|
|
94
|
+
line-height: 0;
|
|
95
|
+
}
|
|
96
|
+
.sdk-chat-control-location__head{
|
|
97
|
+
padding: 4px 12px;
|
|
98
|
+
}
|
|
99
|
+
.sdk-chat-control-location__title{
|
|
100
|
+
font-weight: normal;
|
|
101
|
+
margin: 4px 0;
|
|
102
|
+
line-height: 1.7em;
|
|
103
|
+
color: #484848;
|
|
104
|
+
}
|
|
105
|
+
.sdk-chat-control-location__description{
|
|
106
|
+
color: #888;
|
|
107
|
+
line-height: 1.7em;
|
|
108
|
+
margin: 4px 0;
|
|
109
|
+
}
|
|
110
|
+
.sdk-chat-control-location__offline{
|
|
111
|
+
height: 160px;
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
line-height: 1.7em;
|
|
116
|
+
padding-bottom: 36px;
|
|
117
|
+
box-sizing: border-box;
|
|
118
|
+
position: relative;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
&:after{
|
|
121
|
+
content: '';
|
|
122
|
+
position: absolute;
|
|
123
|
+
left: 0;
|
|
124
|
+
right: 0;
|
|
125
|
+
top: 0;
|
|
126
|
+
bottom: 0;
|
|
127
|
+
background: url(./offline-bg.png) no-repeat 0 0 #f3f9f9;
|
|
128
|
+
background-size: cover;
|
|
129
|
+
filter: blur(4px)
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
.sdk-chat-control-location__offline-value{
|
|
133
|
+
font-size: 20px;
|
|
134
|
+
}
|
|
135
|
+
.sdk-chat-control-location__offline-value,
|
|
136
|
+
.sdk-chat-control-location__offline-label{
|
|
137
|
+
padding: 6px 12px;
|
|
138
|
+
position: relative;
|
|
139
|
+
z-index: 3;
|
|
140
|
+
}
|
|
141
|
+
.sdk-chat-control-location__offline-tips{
|
|
142
|
+
position: absolute;
|
|
143
|
+
left: 0;
|
|
144
|
+
bottom: 0;
|
|
145
|
+
height: 24px;
|
|
146
|
+
line-height: 24px;
|
|
147
|
+
padding: 6px 12px;
|
|
148
|
+
color: #999;
|
|
149
|
+
z-index: 3;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
.sdk-chat-control-location__body{
|
|
153
|
+
overflow: hidden;
|
|
154
|
+
}
|
|
155
|
+
.sdk-chat-control-location--quote {
|
|
156
|
+
.sdk-chat-control-location__main{
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: row;
|
|
159
|
+
max-width: 360px;
|
|
160
|
+
}
|
|
161
|
+
.sdk-chat-control-location__icon{
|
|
162
|
+
display: inline-block;
|
|
163
|
+
width: 18px;
|
|
164
|
+
height: 18px;
|
|
165
|
+
margin-right: 4px;
|
|
166
|
+
min-width: 18px;
|
|
167
|
+
vertical-align: top;
|
|
168
|
+
margin-top: 2px;
|
|
169
|
+
color: #999;
|
|
170
|
+
svg {
|
|
171
|
+
width: 100%;
|
|
172
|
+
height: 100%;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
.sdk-chat-control-location__title{
|
|
176
|
+
margin-right: 6px;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
</style>
|
|
Binary file
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sdk-chat-control-member-change">
|
|
3
|
+
{{ text }}
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<script>
|
|
7
|
+
import { parse } from '../../../utils/json'
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
name: 'SdkChatControlMemberChange',
|
|
11
|
+
props: {
|
|
12
|
+
id: {
|
|
13
|
+
type: String
|
|
14
|
+
},
|
|
15
|
+
content: {
|
|
16
|
+
type: [Object, String]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
computed: {
|
|
20
|
+
nextContent () {
|
|
21
|
+
return parse(this.content) || {}
|
|
22
|
+
},
|
|
23
|
+
text () {
|
|
24
|
+
return this.nextContent.content
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
<style lang="less">
|
|
30
|
+
.sdk-chat-control-member-change{
|
|
31
|
+
text-align: center;
|
|
32
|
+
color: #999;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
width: 100%;
|
|
35
|
+
padding: 12px;
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="595.28" height="595.28" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<metadata/>
|
|
3
|
+
|
|
4
|
+
<g>
|
|
5
|
+
<title>background</title>
|
|
6
|
+
<rect fill="none" id="canvas_background" height="402" width="582" y="-1" x="-1"/>
|
|
7
|
+
</g>
|
|
8
|
+
<g>
|
|
9
|
+
<title>Layer 1</title>
|
|
10
|
+
<path stroke-width="0" id="svg_32" d="m141.306,56.734681c-8.167,-5.286 -18.158,-8.186 -28.464,-8.699l-2.292,-8.414l0.076,0.081c-0.104,-0.252 -0.171,-0.497 -0.266,-0.734l-0.676,-2.491c-1.559,-7.192 1.284,-10.62 2.748,-11.855c0.257,-0.185 0.514,-0.375 0.789,-0.556c6.712,-4.463 16.276,2.686 16.818,3.109c4.249,4.079 12.007,5.089 16.19,0.91c4.24,-4.221 3.232,-12.114 -0.989,-16.328c-6.598,-6.574 -26.819,-17.12 -44.036,-5.676c-15.468,10.284 -15.782,24.759 -13.234,33.123l3.091,11.317c-5.181,1.483 -10.125,3.605 -14.66,6.372c-16.942,10.351 -25.432,27.813 -23.312,47.925c2.187,20.625 17.655,35.613 36.792,35.613c20.307,0 36.84,-16.488 36.84,-36.75c-0.267,-4.839 -0.219,-4.78 -0.855,-9.108c-0.646,-4.216 -6.884,-24.046 -6.884,-24.046c3.822,0.884 7.416,2.327 10.516,4.331c34.938,22.648 20.402,58.697 19.736,60.27c-9.611,23.029 -30.604,36.776 -57.556,37.722c-17.579,0.618 -34.425,-5.933 -47.421,-18.451c-13.719,-13.193 -21.572,-31.682 -21.572,-50.718c0,-28.668 18.073,-54.706 44.988,-64.776c5.6,-2.094 10.134,-8.067 7.035,-15.007c-2.443,-5.452 -9.042,-7.327 -14.65,-5.222c-35.329,13.215 -59.058,47.379 -59.058,85.005c0,24.871 10.277,49.023 28.198,66.267c16.523,15.903 37.791,24.557 60.161,24.557c1.027,0 2.044,-0.017 3.061,-0.055c35.281,-1.238 64.002,-20.305 76.789,-50.91c7.986,-18.591 12.445,-60.657 -27.903,-86.806zm-36.26,46.948c0,8.342 -6.808,15.13 -15.164,15.13c-9.289,0 -14.413,-8.43 -15.23,-16.264c-1.578,-14.926 6.237,-23.047 13.082,-27.226c2.767,-1.689 5.819,-3.018 9.003,-3.979c0,0 7.378,23.404 7.957,27.033c0.628,4.008 0.352,5.306 0.352,5.306z" fill="#E60012"/>
|
|
11
|
+
</g>
|
|
12
|
+
</svg>
|
|
Binary file
|
|
@@ -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="1604404752051" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6436" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M682.9 399.9c-19.9-29.6-27.2-66.5-23.8-119.6 0-0.4-0.1-0.9 0-1.3 0-0.9 0-1.7-0.1-2.5l-0.3-2.4c-0.1-0.8-0.3-1.5-0.5-2.2-0.2-0.8-0.5-1.6-0.8-2.3-0.3-0.7-0.6-1.3-0.9-2l-1.2-2.1c-0.4-0.6-0.9-1.2-1.3-1.8-0.5-0.6-1-1.2-1.6-1.8-0.5-0.6-1.1-1.1-1.7-1.6-0.6-0.5-1.3-1-1.9-1.5-0.6-0.4-1.2-0.8-1.9-1.2l-2.4-1.2c-0.4-0.2-0.7-0.4-1.1-0.5-0.3-0.1-0.6-0.1-0.9-0.2-0.8-0.3-1.7-0.5-2.5-0.6-0.8-0.2-1.6-0.3-2.3-0.4-0.4 0-0.7-0.2-1.1-0.2-0.5 0-0.9 0.1-1.4 0.1-0.8 0-1.5 0-2.3 0.1-1 0.1-2 0.2-3 0.4-0.5 0.1-0.9 0.2-1.3 0.3-1.2 0.3-2.4 0.7-3.5 1.2l-0.6 0.3c-1.3 0.6-2.5 1.3-3.6 2.1-0.1 0.1-0.2 0.2-0.3 0.2-1.1 0.8-2.2 1.7-3.1 2.8l-0.5 0.5c-0.9 1-1.7 2-2.4 3.1l-0.6 0.9c-0.6 1-1.1 2.1-1.5 3.2-0.1 0.3-0.3 0.5-0.4 0.8l-149 405.7-4.6 10.2c-8.6 19.3-23.5 29.9-46.8 33.2-11.2 1.6-23.8 1-39.4-2.1-15.4-3.1-28.6-10.7-37-21.5-5.5-7-11.4-18.5-8.4-33.7 5.1-25.2 32.2-39.6 63.1-33.4l6.9 1.4c9.4 1.9 18.8 6.8 27.8 12 1.5 0.8 4.1 2 5.7 2.5 12.9 4 26.6-3.2 30.6-16.1 3.7-11.9-2.2-24.6-13.3-29.5-11.6-6.6-25.4-13.6-41.2-16.8l-6.9-1.4c-57.2-11.5-110.2 20-120.6 71.7-5.2 26 1.1 52.1 17.8 73.4 15.6 19.9 39 33.8 66.9 39.4 12.5 2.5 24.2 3.8 35.3 3.8 6.8 0 13.3-0.5 19.7-1.4 39.7-5.8 68.9-27.1 84.3-61.5l4.9-10.9c0.2-0.4 0.2-0.8 0.4-1.1 0.1-0.2 0.2-0.3 0.3-0.6L621.7 385c4.9 14.3 11.5 28.5 20.6 42.1 8.3 12.4 17.1 23 25.5 33.2 23.7 28.8 35.9 45.1 31.9 74.6-1.8 13.4 7.5 25.7 20.9 27.5 1.1 0.2 2.2 0.2 3.3 0.2 12 0 22.5-8.9 24.2-21.1 7.1-52-19.3-84-42.6-112.3-7.7-9.2-15.6-18.8-22.6-29.3z" fill="#333333" p-id="6437"></path><path d="M700.9 789.4c-55.4 37.6-120.3 57.4-187.6 57.4-184.7 0-335-150.3-335-335 0-66.4 19.4-130.5 56-185.5 7.5-11.2 4.4-26.4-6.8-33.9s-26.4-4.4-33.9 6.8c-42 63-64.2 136.5-64.2 212.6 0 211.6 172.2 383.8 383.8 383.8 77.1 0 151.4-22.8 215-65.8 11.2-7.6 14.1-22.7 6.5-33.9-7.5-11.2-22.7-14.1-33.8-6.5zM513.3 128c-82 0-160.2 25.5-226.1 73.6-10.9 8-13.3 23.2-5.3 34.1 8 10.9 23.2 13.3 34.1 5.3 57.6-42 125.8-64.3 197.3-64.3 184.7 0 335 150.3 335 335 0 71.5-22.2 139.7-64.3 197.3-7.9 10.9-5.6 26.2 5.3 34.1 4.4 3.2 9.4 4.7 14.4 4.7 7.5 0 15-3.5 19.7-10 48.2-66 73.6-144.2 73.6-226.1 0.1-211.5-172.1-383.7-383.7-383.7z" fill="#333333" p-id="6438"></path></svg>
|
|
Binary file
|
|
Binary file
|
|
@@ -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="1710381071549" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4321" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M26.815226 538.816181A485.183819 485.183819 0 1 0 511.999044 53.508885 485.183819 485.183819 0 0 0 26.815226 538.816181z m0 0" fill="#F8C913" p-id="4322"></path><path d="M659.883797 12.349756c-18.151176 20.78536-57.170031 38.977696-109.030534 51.901662-88.121696 20.78536-106.272872 25.930252-132.244283 41.488403a190.896043 190.896043 0 0 0-43.793314 30.869347C354.030305 154.883821 338.513314 188.593148 343.740523 199.006408c2.510707 5.144891 51.901662 75.19773 111.541241 160.808719 59.639579 82.976805 116.686132 166.077088 129.733576 184.228264a275.766168 275.766168 0 0 1 20.579565 34.285555c0 2.510707-10.41326 0-20.579565-2.634185-41.61188-13.006285-114.298903 0-166.077087 25.930252a268.522161 268.522161 0 0 0-101.251459 100.592912 181.635239 181.635239 0 0 0-7.902553 137.14222 192.130817 192.130817 0 0 0 93.266588 98.781911c34.285555 18.151176 41.488403 18.151176 85.610989 20.579565a228.638964 228.638964 0 0 0 77.831914-5.144892c96.024249-28.564436 165.95361-103.762166 171.427774-192.007339 2.634184-49.390955-2.634184-64.825629-67.418654-179.001054-101.374936-176.119915-192.213135-336.928634-192.213135-339.727455 0 0 18.192335-2.510707 41.488403-5.144891a171.427774 171.427774 0 0 0 150.518937-90.550085c13.129762-23.419545 13.129762-31.19862 13.129762-80.466098a238.31136 238.31136 0 0 0-5.144891-62.314922c-2.634184-7.779075-5.268369-5.144891-18.151176 7.779075z m0 0" fill="#02B053" p-id="4323"></path></svg>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sdk-wechat-chat-panel-control-share-music" :class="['sdk-wechat-chat-panel-control-share-music--' + type]">
|
|
3
|
+
<template v-if="type === 'default'">
|
|
4
|
+
<div class="sdk-wechat-chat-panel-control-share-music__main">
|
|
5
|
+
<div class="sdk-wechat-chat-panel-control-share-music__cover">
|
|
6
|
+
<ui-image :src="cover" width="100%" height="100%" fit="cover" :radius="0"></ui-image>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="sdk-wechat-chat-panel-control-share-music__content">
|
|
9
|
+
<div class="sdk-wechat-chat-panel-control-share-music__row">
|
|
10
|
+
<div class="sdk-wechat-chat-panel-control-share-music__title">{{ title }}</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="sdk-wechat-chat-panel-control-share-music__row">
|
|
13
|
+
<div class="sdk-wechat-chat-panel-control-share-music__description">{{ desc }}</div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="sdk-wechat-chat-panel-control-share-music__other">
|
|
18
|
+
<span class="sdk-wechat-chat-panel-control-share-music__other-icon" :style="{'background-image': `url(${provide.icon})`}"></span>
|
|
19
|
+
<span class="sdk-wechat-chat-panel-control-share-music__other-text">{{ provide.name }}</span>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
<template v-else-if="type === 'quote'">
|
|
23
|
+
<div class="sdk-wechat-chat-panel-control-share-music__icon">
|
|
24
|
+
<svg t="1752134148267" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="25999" width="200" height="200"><path d="M512 577.493333V128h341.333333v85.333333h-256v512a170.666667 170.666667 0 1 1-85.333333-147.84zM426.666667 810.666667a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z" fill="currentColor" p-id="26000"></path></svg>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="sdk-wechat-chat-panel-control-share-music__title">{{ title }}</div>
|
|
27
|
+
<div class="sdk-wechat-chat-panel-control-share-music__cover">
|
|
28
|
+
<ui-image :src="cover" width="100%" height="100%" fit="cover" :radius="0"></ui-image>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
<script>
|
|
34
|
+
import { parseXml } from '../../../utils/json'
|
|
35
|
+
import { getProvideMetaByUrl } from './utils'
|
|
36
|
+
|
|
37
|
+
export default {
|
|
38
|
+
name: 'SdkChatControlShareMusic',
|
|
39
|
+
props: {
|
|
40
|
+
id: {
|
|
41
|
+
type: String
|
|
42
|
+
},
|
|
43
|
+
content: {
|
|
44
|
+
type: String
|
|
45
|
+
},
|
|
46
|
+
type: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'default',
|
|
49
|
+
validator (value) {
|
|
50
|
+
return ['quote', 'default'].includes(value)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
computed: {
|
|
55
|
+
nextContent () {
|
|
56
|
+
return parseXml(this.content) || {}
|
|
57
|
+
},
|
|
58
|
+
cover () {
|
|
59
|
+
return this.nextContent.msg && this.nextContent.msg.appmsg && this.nextContent.msg.appmsg.songalbumurl
|
|
60
|
+
},
|
|
61
|
+
url () {
|
|
62
|
+
return this.nextContent.msg && this.nextContent.msg.appmsg && this.nextContent.msg.appmsg.url
|
|
63
|
+
},
|
|
64
|
+
title () {
|
|
65
|
+
return this.nextContent.msg && this.nextContent.msg.appmsg && this.nextContent.msg.appmsg.title
|
|
66
|
+
},
|
|
67
|
+
desc () {
|
|
68
|
+
return this.nextContent.msg && this.nextContent.msg.appmsg && this.nextContent.msg.appmsg.des
|
|
69
|
+
},
|
|
70
|
+
provide () {
|
|
71
|
+
return getProvideMetaByUrl(this.url)
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
76
|
+
<style lang="less">
|
|
77
|
+
.sdk-wechat-chat-panel-control-share-music--default {
|
|
78
|
+
.sdk-wechat-chat-panel-control-share-music__main{
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: row;
|
|
81
|
+
width: 248px;
|
|
82
|
+
padding: 6px;
|
|
83
|
+
}
|
|
84
|
+
.sdk-wechat-chat-panel-control-share-music__cover{
|
|
85
|
+
width: 60px;
|
|
86
|
+
height: 60px;
|
|
87
|
+
border-top-left-radius: 2px;
|
|
88
|
+
border-bottom-left-radius: 2px;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
}
|
|
91
|
+
.sdk-wechat-chat-panel-control-share-music__content {
|
|
92
|
+
height: 60px;
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
flex: 1;
|
|
97
|
+
min-width: 0;
|
|
98
|
+
padding: 12px;
|
|
99
|
+
box-sizing: border-box!important;
|
|
100
|
+
}
|
|
101
|
+
.sdk-wechat-chat-panel-control-share-music__title,
|
|
102
|
+
.sdk-wechat-chat-panel-control-share-music__description{
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
text-overflow: ellipsis;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
}
|
|
107
|
+
.sdk-wechat-chat-panel-control-share-music__description{
|
|
108
|
+
color: #999;
|
|
109
|
+
}
|
|
110
|
+
.sdk-wechat-chat-panel-control-share-music__other{
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: row;
|
|
113
|
+
align-items: center;
|
|
114
|
+
border-top: 1px solid #eee;
|
|
115
|
+
padding: 3px 6px;
|
|
116
|
+
}
|
|
117
|
+
.sdk-wechat-chat-panel-control-share-music__other-icon{
|
|
118
|
+
width: 16px;
|
|
119
|
+
height: 16px;
|
|
120
|
+
background-position: 50% 50%;
|
|
121
|
+
background-size: cover;
|
|
122
|
+
background-repeat: no-repeat;
|
|
123
|
+
display: inline-block;
|
|
124
|
+
margin-right: 4px;
|
|
125
|
+
}
|
|
126
|
+
.sdk-wechat-chat-panel-control-share-music__other-text {
|
|
127
|
+
color: #666;
|
|
128
|
+
font-size: 12px;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
.sdk-wechat-chat-panel-control-share-music--quote {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: row;
|
|
134
|
+
.sdk-wechat-chat-panel-control-share-music__icon {
|
|
135
|
+
display: inline-block;
|
|
136
|
+
width: 18px;
|
|
137
|
+
height: 18px;
|
|
138
|
+
margin-right: 4px;
|
|
139
|
+
min-width: 18px;
|
|
140
|
+
vertical-align: top;
|
|
141
|
+
margin-top: 2px;
|
|
142
|
+
color: #999;
|
|
143
|
+
svg {
|
|
144
|
+
width: 100%;
|
|
145
|
+
height: 100%;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
.sdk-wechat-chat-panel-control-share-music__cover {
|
|
149
|
+
width: 52px;
|
|
150
|
+
height: 52px;
|
|
151
|
+
}
|
|
152
|
+
.sdk-wechat-chat-panel-control-share-music__title{
|
|
153
|
+
margin-right: 6px;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { parseUrl } from '../../../utils/url'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 根据音乐播放地址获取厂商名称
|
|
5
|
+
*/
|
|
6
|
+
export function getProvideMetaByUrl (url) {
|
|
7
|
+
const urlMeta = parseUrl(url)
|
|
8
|
+
if (!urlMeta) {
|
|
9
|
+
return
|
|
10
|
+
}
|
|
11
|
+
const provideMap = {
|
|
12
|
+
qq: {
|
|
13
|
+
name: 'QQ音乐',
|
|
14
|
+
icon: require('./icons/qq.svg')
|
|
15
|
+
},
|
|
16
|
+
163: {
|
|
17
|
+
name: '网易音乐',
|
|
18
|
+
icon: require('./icons/163.png')
|
|
19
|
+
},
|
|
20
|
+
kuwo: {
|
|
21
|
+
name: '酷我音乐',
|
|
22
|
+
icon: require('./icons/kuwo.png')
|
|
23
|
+
},
|
|
24
|
+
unknow: {
|
|
25
|
+
name: '音乐',
|
|
26
|
+
icon: require('./icons/default.png')
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return provideMap[urlMeta.domain.toLowerCase()] || provideMap.unknow
|
|
30
|
+
}
|