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