@aochuang/client-sdk 1.0.356 → 1.0.359

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 (159) hide show
  1. package/components/index.js +1 -6
  2. package/components/session-select/session-select-item.vue +9 -8
  3. package/components/wechat-chat-control/image/image.vue +8 -13
  4. package/components/wechat-chat-control/url/url-miniprogram.vue +5 -1
  5. package/components/wework-chat-control/channel-live/channel-live.vue +2 -7
  6. package/components/wework-chat-control/company-card/company-card.vue +1 -1
  7. package/components/wework-chat-control/custom-expression/custom-expression.vue +1 -2
  8. package/components/wework-chat-control/file-url/file-url.vue +16 -34
  9. package/components/wework-chat-control/image/image.vue +2 -137
  10. package/components/wework-chat-control/index.js +7 -10
  11. package/components/wework-chat-control/location/location.vue +3 -3
  12. package/components/wework-chat-control/text/text.vue +144 -24
  13. package/components/wework-chat-control/url/url-miniprogram.vue +7 -6
  14. package/components/wework-chat-control/url/url.vue +2 -26
  15. package/components/wework-chat-control/util.js +19 -22
  16. package/components/wework-chat-control/video/video.vue +2 -10
  17. package/components/wework-chat-control/voice/voice.vue +1 -1
  18. package/components/wework-chat-panel/chat-panel-controls/company-card/company-card.vue +35 -0
  19. package/components/wework-chat-panel/chat-panel-controls/expression/expression.vue +36 -0
  20. package/components/wework-chat-panel/chat-panel-controls/file-url/file-url.vue +35 -0
  21. package/components/wework-chat-panel/chat-panel-controls/image/image.vue +36 -0
  22. package/components/wework-chat-panel/chat-panel-controls/index.js +35 -0
  23. package/components/wework-chat-panel/chat-panel-controls/jx-sys-text/jx-sys-text.vue +28 -0
  24. package/components/wework-chat-panel/chat-panel-controls/link/link.vue +35 -0
  25. package/components/wework-chat-panel/chat-panel-controls/location/location.vue +35 -0
  26. package/components/wework-chat-panel/chat-panel-controls/text/text.vue +43 -0
  27. package/components/wework-chat-panel/chat-panel-controls/unkonw/unkonw.vue +39 -0
  28. package/components/wework-chat-panel/chat-panel-controls/video/video.vue +37 -0
  29. package/components/wework-chat-panel/chat-panel-controls/voice/voice.vue +35 -0
  30. package/components/wework-chat-panel/chat-panel-item.vue +28 -38
  31. package/components/wework-chat-panel/chat-panel.vue +13 -96
  32. package/package.json +3 -10
  33. package/services/client-chat/client-chat-wechat/client-chat-session.js +196 -92
  34. package/services/client-chat/client-chat-wechat/client-chat.js +20 -33
  35. package/services/client-chat/client-chat-wework/client-chat-concats.js +17 -81
  36. package/services/client-chat/client-chat-wework/client-chat-message.js +5 -45
  37. package/services/client-chat/client-chat-wework/client-chat-session.js +2 -50
  38. package/services/client-chat/client-chat-wework/client-chat-socket.js +1 -9
  39. package/services/client-chat/client-chat-wework/client-chat.js +11 -281
  40. package/services/client-chat/client-chat-wework/utils.js +5 -5
  41. package/uni-common/account-portray/account-portray.vue +51 -0
  42. package/uni-common/account-select/account-select-item.vue +172 -0
  43. package/uni-common/account-select/account-select.vue +252 -0
  44. package/uni-common/all-friend-avatar/all-friend-avatar.vue +49 -0
  45. package/uni-common/friend-avatar/default.svg +1 -0
  46. package/uni-common/friend-avatar/friend-avatar.vue +27 -0
  47. package/uni-common/friend-avatar/index.js +3 -0
  48. package/uni-common/friend-loader/friend-loader.vue +53 -0
  49. package/uni-common/friend-portray/friend-portray.vue +56 -0
  50. package/uni-common/group-avatar/default.svg +1 -0
  51. package/uni-common/group-avatar/group-avatar.vue +18 -0
  52. package/uni-common/group-avatar/index.js +3 -0
  53. package/uni-common/room-avatar/default.svg +6 -0
  54. package/uni-common/room-avatar/index.js +3 -0
  55. package/uni-common/room-avatar/room-avatar.vue +27 -0
  56. package/uni-common/room-loader/room-loader.vue +53 -0
  57. package/uni-common/room-portray/room-portray.vue +56 -0
  58. package/uni-components/chat-control/calling/calling.vue +91 -0
  59. package/uni-components/chat-control/calling/phone-fill.svg +1 -0
  60. package/uni-components/chat-control/calling/vidicon-fill.svg +1 -0
  61. package/uni-components/chat-control/channel-video/channel-video.vue +89 -0
  62. package/uni-components/chat-control/channel-video-card/channel-video-card.vue +105 -0
  63. package/uni-components/chat-control/channel-video-live/channel-video-live.vue +92 -0
  64. package/uni-components/chat-control/chat-control-config-item/chat-control-config-item.vue +20 -0
  65. package/uni-components/chat-control/chat-control-config-item/index.js +3 -0
  66. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-app.vue +25 -0
  67. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-h5.vue +21 -0
  68. package/{components/wework-chat-control/wework-chat-control-config.vue → uni-components/chat-control/chat-control-config.vue} +13 -16
  69. package/uni-components/chat-control/chat-control.vue +218 -0
  70. package/uni-components/chat-control/company-card/company-card.vue +123 -0
  71. package/uni-components/chat-control/const.js +28 -0
  72. package/uni-components/chat-control/expression/expression.vue +41 -0
  73. package/uni-components/chat-control/image/image.vue +68 -0
  74. package/uni-components/chat-control/index.js +89 -0
  75. package/uni-components/chat-control/location/location.vue +110 -0
  76. package/uni-components/chat-control/member-change/member-change.vue +32 -0
  77. package/uni-components/chat-control/quote-message/quote-message.vue +216 -0
  78. package/uni-components/chat-control/real-time-position/real-time-position.vue +62 -0
  79. package/uni-components/chat-control/redpacket/red-envelope.svg +1 -0
  80. package/uni-components/chat-control/redpacket/redpacket.vue +75 -0
  81. package/uni-components/chat-control/share-card/share-card.vue +101 -0
  82. package/uni-components/chat-control/system/system.vue +69 -0
  83. package/uni-components/chat-control/system-batch-message/system-batch-message.vue +30 -0
  84. package/uni-components/chat-control/system-text/system-text.vue +32 -0
  85. package/uni-components/chat-control/text/text.vue +67 -0
  86. package/uni-components/chat-control/text-with-at/text-with-at.vue +51 -0
  87. package/uni-components/chat-control/transfer/red-transfer.svg +1 -0
  88. package/uni-components/chat-control/transfer/transfer.vue +80 -0
  89. package/uni-components/chat-control/unkonw/unkonw.vue +37 -0
  90. package/uni-components/chat-control/url/icons/file-excel-line.svg +1 -0
  91. package/uni-components/chat-control/url/icons/file-info-line.svg +1 -0
  92. package/uni-components/chat-control/url/icons/file-music-line.svg +1 -0
  93. package/uni-components/chat-control/url/icons/file-pdf-line.svg +1 -0
  94. package/uni-components/chat-control/url/icons/file-ppt-line.svg +1 -0
  95. package/uni-components/chat-control/url/icons/file-settings-line.svg +1 -0
  96. package/uni-components/chat-control/url/icons/file-text-line.svg +1 -0
  97. package/uni-components/chat-control/url/icons/file-unknow-line.svg +1 -0
  98. package/uni-components/chat-control/url/icons/file-word-line.svg +1 -0
  99. package/uni-components/chat-control/url/icons/file-zip-line.svg +1 -0
  100. package/uni-components/chat-control/url/icons/index.js +24 -0
  101. package/uni-components/chat-control/url/miniprogram.svg +1 -0
  102. package/uni-components/chat-control/url/url-miniprogram.vue +116 -0
  103. package/uni-components/chat-control/url/url.vue +306 -0
  104. package/uni-components/chat-control/url-new/icons/file-excel-line.svg +1 -0
  105. package/uni-components/chat-control/url-new/icons/file-info-line.svg +1 -0
  106. package/uni-components/chat-control/url-new/icons/file-music-line.svg +1 -0
  107. package/uni-components/chat-control/url-new/icons/file-pdf-line.svg +1 -0
  108. package/uni-components/chat-control/url-new/icons/file-ppt-line.svg +1 -0
  109. package/uni-components/chat-control/url-new/icons/file-settings-line.svg +1 -0
  110. package/uni-components/chat-control/url-new/icons/file-text-line.svg +1 -0
  111. package/uni-components/chat-control/url-new/icons/file-unknow-line.svg +1 -0
  112. package/uni-components/chat-control/url-new/icons/file-word-line.svg +1 -0
  113. package/uni-components/chat-control/url-new/icons/file-zip-line.svg +1 -0
  114. package/uni-components/chat-control/url-new/icons/index.js +24 -0
  115. package/uni-components/chat-control/url-new/url-new.vue +110 -0
  116. package/uni-components/chat-control/utils.js +12 -0
  117. package/uni-components/chat-control/video/video.vue +156 -0
  118. package/uni-components/chat-control/voice/voice.vue +166 -0
  119. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-collect.vue +84 -0
  120. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-system.vue +28 -0
  121. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet.vue +85 -0
  122. package/uni-components/chat-editor/chat-editor-func/chat-editor-func.vue +157 -0
  123. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at-panel.vue +158 -0
  124. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at.vue +61 -0
  125. package/uni-components/chat-editor/chat-editor-func-button/chat-editor-func-button.vue +58 -0
  126. package/uni-components/chat-editor/chat-editor-func-file/chat-editor-func-file.vue +54 -0
  127. package/uni-components/chat-editor/chat-editor-func-image/chat-editor-func-image.vue +42 -0
  128. package/uni-components/chat-editor/chat-editor-func-video/chat-editor-func-video.vue +42 -0
  129. package/uni-components/chat-editor/chat-editor-func-voice/chat-editor-func-voice.vue +25 -0
  130. package/uni-components/chat-editor/chat-editor-message-send/chat-editor-message-send.vue +158 -0
  131. package/uni-components/chat-editor/chat-editor-quote/chat-editor-quote.vue +75 -0
  132. package/uni-components/chat-editor/chat-editor.vue +257 -0
  133. package/uni-components/chat-editor/index.js +10 -0
  134. package/uni-components/chat-editor/util.js +65 -0
  135. package/uni-components/chat-panel/chat-panel-chats-box.vue +238 -0
  136. package/uni-components/chat-panel/chat-panel-chats-forward/chat-panel-chats-forward.vue +273 -0
  137. package/uni-components/chat-panel/chat-panel-chats-item.vue +578 -0
  138. package/uni-components/chat-panel/chat-panel-chats-status/chat-panel-chats-status.vue +71 -0
  139. package/uni-components/chat-panel/chat-panel-chats.vue +368 -0
  140. package/uni-components/chat-panel/chat-panel.vue +227 -0
  141. package/uni-components/contacts-group-select/contacts-group-select-item.vue +85 -0
  142. package/uni-components/contacts-group-select/contacts-group-select-panel.vue +119 -0
  143. package/uni-components/contacts-group-select/contacts-group-select.vue +150 -0
  144. package/components/wechat-chat-control/.DS_Store +0 -0
  145. package/components/wechat-chat-control/transfer/.DS_Store +0 -0
  146. package/components/wechat-chat-control/url/.DS_Store +0 -0
  147. package/components/wechat-chat-control/voice/.DS_Store +0 -0
  148. package/components/wework-chat-control/channel-card/channel-card.vue +0 -144
  149. package/components/wework-chat-control/link/.DS_Store +0 -0
  150. package/components/wework-chat-control/metting/enterprise-wechat.png +0 -0
  151. package/components/wework-chat-control/metting/meeting-video.svg +0 -4
  152. package/components/wework-chat-control/metting/metting.vue +0 -181
  153. package/components/wework-chat-control/text/text-default.vue +0 -99
  154. package/components/wework-chat-control/text/text-quote.vue +0 -105
  155. package/components/wework-chat-control/url/url-channel-live.vue +0 -53
  156. package/components/wework-chat-control/video/.DS_Store +0 -0
  157. package/components/wework-chat-control/wework-chat-control-config-item.vue +0 -24
  158. package/components/wework-chat-control/wework-chat-control-config-msg.vue +0 -25
  159. package/components/wework-chat-panel/chat-panel-chat-status/chat-panel-chat-status.vue +0 -73
@@ -0,0 +1,119 @@
1
+ <template>
2
+ <view class="bi-contacts-group-select-panel">
3
+ <view class="bi-contacts-group-select-panel__head">
4
+ <view class="bi-contacts-group-select-panel__head-left">
5
+ <uv-button size="small" @click="handleCancelClick">取消</uv-button>
6
+ </view>
7
+ <view class="bi-contacts-group-select-panel__head-center"></view>
8
+ <view class="bi-contacts-group-select-panel__head-right">
9
+ <uv-button size="small" type="primary" @click="handleConfirmClick">确定</uv-button>
10
+ </view>
11
+ </view>
12
+ <view class="bi-contacts-group-select-panel__body">
13
+ <view class="bi-contacts-group-select-panel__group" v-if="friendGroupData && friendGroupData.length">
14
+ <view class="bi-contacts-group-select-panel__group-head">
15
+ <view class="bi-contacts-group-select-panel__group-title">好友分组</view>
16
+ </view>
17
+ <view class="bi-contacts-group-select-panel__group-body">
18
+ <contacts-group-select-item
19
+ class="bi-contacts-group-select-panel__group-item"
20
+ @click="handleFriendGroupClick(group)"
21
+ v-for="group in friendGroupData"
22
+ type="friend"
23
+ :key="group.id"
24
+ :data="group"
25
+ :selected="group.id === inputValue"
26
+ >
27
+ </contacts-group-select-item>
28
+ </view>
29
+ </view>
30
+ <view class="bi-contacts-group-select-panel__group" v-if="roomGroupData && roomGroupData.length">
31
+ <view class="bi-contacts-group-select-panel__group-head">
32
+ <view class="bi-contacts-group-select-panel__group-title">群聊分组</view>
33
+ </view>
34
+ <view class="bi-contacts-group-select-panel__group-body">
35
+ <contacts-group-select-item
36
+ class="bi-contacts-group-select-panel__group-item"
37
+ @click="handleRoomGroupClick(group)"
38
+ v-for="group in roomGroupData"
39
+ type="room"
40
+ :key="group.id"
41
+ :data="group"
42
+ :selected="group.id === inputValue"
43
+ >
44
+ </contacts-group-select-item>
45
+ </view>
46
+ </view>
47
+ <view class="bi-contacts-group-select-panel__safe"></view>
48
+ </view>
49
+ </view>
50
+ </template>
51
+
52
+ <script>
53
+ import ContactsGroupSelectItem from './contacts-group-select-item.vue'
54
+
55
+ export default {
56
+ name: 'BiContactsGroupSelectPanel',
57
+ components: {
58
+ ContactsGroupSelectItem
59
+ },
60
+ props: {
61
+ value: {
62
+ type: String
63
+ },
64
+ friendGroupData: {
65
+ type: Array
66
+ },
67
+ roomGroupData: {
68
+ type: Array
69
+ }
70
+ },
71
+ data () {
72
+ return {
73
+ inputValue: this.value
74
+ }
75
+ },
76
+ methods: {
77
+ handleCancelClick () {
78
+ this.$emit('cancel')
79
+ },
80
+ handleConfirmClick () {
81
+ this.$emit('confirm', this.inputValue)
82
+ },
83
+ handleFriendGroupClick (item) {
84
+ this.inputValue = item.id
85
+ },
86
+ handleRoomGroupClick (item) {
87
+ this.inputValue = item.id
88
+ }
89
+ }
90
+ }
91
+ </script>
92
+
93
+ <style lang="less">
94
+ .bi-contacts-group-select-panel__head{
95
+ display: flex;
96
+ flex-direction: row;
97
+ align-items: center;
98
+ justify-content: space-between;
99
+ padding: 8px 12px;
100
+ border-bottom: 1px solid #eee;
101
+ }
102
+ .bi-contacts-group-select-panel__body{
103
+ max-height: 70vh;
104
+ overflow: auto;
105
+ padding: 6px 0;
106
+ }
107
+ .bi-contacts-group-select-panel__group-head {
108
+ height: 32px;
109
+ line-height: 32px;
110
+ padding: 0 12px;
111
+ }
112
+ .bi-contacts-group-select-panel__group-title {
113
+ color: #999;
114
+ }
115
+ .bi-contacts-group-select-panel__safe{
116
+ padding-bottom: calc(constant(safe-area-inset-bottom)); /* window-bottom + 适配 iPhoneX */
117
+ padding-bottom: calc(env(safe-area-inset-bottom));
118
+ }
119
+ </style>
@@ -0,0 +1,150 @@
1
+ <template>
2
+ <view class="bi-account-select">
3
+ <view class="bi-account-select__handle" @click="handleHandleClick">
4
+ <template v-if="loading">
5
+ <uv-loading-icon class="bi-account-select__loading" size="18" text="数据加载中..."></uv-loading-icon>
6
+ </template>
7
+ <template v-else>
8
+ <template v-if="value">
9
+ <view class="bi-account-select__value">
10
+ {{ currentGroup ? currentGroup.groupName : value }}
11
+ </view>
12
+ </template>
13
+ <template v-else>
14
+ <view class="bi-account-select__placeholder">
15
+ 请选择分组
16
+ </view>
17
+ </template>
18
+ </template>
19
+ </view>
20
+ <uv-popup
21
+ ref="popup"
22
+ mode="bottom"
23
+ @change="handlePopupChange"
24
+ >
25
+ <contacts-group-select-panel
26
+ :value="value"
27
+ :friend-group-data="friendGroupData"
28
+ :room-group-data="roomGroupData"
29
+ @cancel="handleCancelClick"
30
+ @confirm="handleConfirmClick"
31
+ ></contacts-group-select-panel>
32
+ </uv-popup>
33
+ </view>
34
+ </template>
35
+
36
+ <script>
37
+ import ContactsGroupSelectPanel from './contacts-group-select-panel.vue'
38
+
39
+ export default {
40
+ name: 'BiContactsGroupSelect',
41
+ components: {
42
+ ContactsGroupSelectPanel
43
+ },
44
+ props: {
45
+ value: {
46
+ type: String
47
+ },
48
+ type: {
49
+ type: String,
50
+ validator (value) {
51
+ return ['room', 'friend'].includes(value)
52
+ }
53
+ }
54
+ },
55
+ data () {
56
+ return {
57
+ loading: false,
58
+ friendGroupData: [],
59
+ roomGroupData: []
60
+ }
61
+ },
62
+ computed: {
63
+ currentGroup () {
64
+ if (!this.value) {
65
+ return
66
+ }
67
+ let group = this.friendGroupData.find(v => v.id === this.value)
68
+ if (!group) {
69
+ group = this.roomGroupData.find(v => v.id === this.value)
70
+ }
71
+ return group
72
+ }
73
+ },
74
+ created () {
75
+ this.loadData()
76
+ },
77
+ methods: {
78
+ loadData () {
79
+ this.loading = true
80
+ if (this.type === 'friend') {
81
+ return Promise.all([
82
+ this.$clientChat.contacts.loadFriendGroupData()
83
+ ]).then(rs => {
84
+ this.friendGroupData = rs[0].data
85
+ }).finally(() => {
86
+ this.loading = false
87
+ })
88
+ } else if (this.type === 'room') {
89
+ return Promise.all([
90
+ this.$clientChat.contacts.loadRoomGroupData()
91
+ ]).then(rs => {
92
+ this.roomGroupData = rs[0].data
93
+ }).finally(() => {
94
+ this.loading = false
95
+ })
96
+ }
97
+ },
98
+ handleCancelClick () {
99
+ this.$refs.popup.close()
100
+ },
101
+ handleConfirmClick (value) {
102
+ this.$emit('input', value)
103
+ this.$refs.popup.close()
104
+ },
105
+ handlePopupChange ({ show }) {
106
+ this.showPopup = show
107
+ if (show) {
108
+ uni.hideTabBar()
109
+ } else {
110
+ uni.showTabBar()
111
+ }
112
+ },
113
+ handleHandleClick () {
114
+ this.$refs.popup.open()
115
+ }
116
+ }
117
+ }
118
+ </script>
119
+
120
+ <style lang="less">
121
+ .bi-account-select__handle {
122
+ position: relative;
123
+ padding-right: 18px;
124
+ padding-top: 1px;
125
+ padding-bottom: 1px;
126
+ height: 32px;
127
+ line-height: 32px;
128
+ display: inline-block;
129
+ &:after {
130
+ content: '';
131
+ width: 6px;
132
+ height: 6px;
133
+ border: 1px solid #ccc;
134
+ border-left: 0;
135
+ border-top: 0;
136
+ transform: rotate(45deg) translateY(-50%);
137
+ position: absolute;
138
+ right: 6px;
139
+ top: 50%;
140
+ margin-top: -3px;
141
+ }
142
+ }
143
+ .bi-account-select__loading{
144
+ vertical-align: top;
145
+ margin-top: 7px;
146
+ }
147
+ .bi-account-select__placeholder{
148
+ color: #999;
149
+ }
150
+ </style>
@@ -1,144 +0,0 @@
1
- <template>
2
- <div class="sdk-chat-control-channel-card" :class="['sdk-chat-control-channel-card--' + type]">
3
- <template v-if="type === 'default' || type === 'thumb'">
4
- <div class="sdk-chat-control-channel-card__main">
5
- <div class="sdk-chat-control-channel-card__avatar">
6
- <sdk-avatar :src="avatar" :radius="false" size="medium"></sdk-avatar>
7
- </div>
8
- <div class="sdk-chat-control-channel-card__fields">
9
- <div class="sdk-chat-control-channel-card__title">{{name}}</div>
10
- <div class="sdk-chat-control-channel-card__summary">{{description}}</div>
11
- </div>
12
- </div>
13
- <div class="sdk-chat-control-channel-card__foot">
14
- <span class="sdk-chat-control-channel-card__category">视频号名片</span>
15
- </div>
16
- </template>
17
- <template v-else-if="type === 'quote'">
18
- <div class="sdk-chat-control-channel-card__icon"></div>
19
- <div class="sdk-chat-control-channel-card__title">{{name}}</div>
20
- <div class="sdk-chat-control-channel-card__avatar">
21
- <sdk-avatar :src="avatar" :radius="false" size="medium"></sdk-avatar>
22
- </div>
23
- </template>
24
- </div>
25
- </template>
26
- <script>
27
- import { parse } from '../../../utils/json'
28
- import SdkAvatar from '../../../common/avatar'
29
- import { formatOssPath } from '@aochuang/common/utils/oss'
30
-
31
- export default {
32
- name: 'SdkChatControlChannelCard',
33
- components: {
34
- SdkAvatar
35
- },
36
- props: {
37
- id: {
38
- type: String
39
- },
40
- content: {
41
- type: [String, Object]
42
- },
43
- type: {
44
- type: String,
45
- default: 'default',
46
- validator (value) {
47
- return ['quote', 'default', 'thumb'].includes(value)
48
- }
49
- },
50
- updateChatBoxProp: {
51
- type: Function
52
- }
53
- },
54
- computed: {
55
- nextContent () {
56
- return parse(this.content) || {}
57
- },
58
- description () {
59
- return this.nextContent.desc || ''
60
- },
61
- name () {
62
- return (this.nextContent.title || '').replace(/^\[视频号名片\]\s*/, '')
63
- },
64
- avatar () {
65
- return formatOssPath(this.nextContent.imageUrl)
66
- },
67
- url () {
68
- return this.nextContent.url
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-chat-control-channel-card--default,
80
- .sdk-chat-control-channel-card--thumb{
81
- width: 248px;
82
- max-width: 100%;
83
- line-height: 1.5em;
84
- .sdk-chat-control-channel-card__main{
85
- display: flex;
86
- flex-direction: row;
87
- padding: 10px;
88
- }
89
- .sdk-chat-control-channel-card__fields{
90
- flex: 1;
91
- min-width: 0;
92
- padding-left: 10px;
93
- }
94
- .sdk-chat-control-channel-card__title{
95
- font-size: 14px;
96
- overflow: hidden;
97
- text-overflow: ellipsis;
98
- white-space: nowrap;
99
- }
100
- .sdk-chat-control-channel-card__summary{
101
- color: #888;
102
- font-size: 12px;
103
- overflow: hidden;
104
- text-overflow: ellipsis;
105
- white-space: nowrap;
106
- margin-top: 6px;
107
- }
108
- .sdk-chat-control-channel-card__foot{
109
- border-top: 1px solid #eee;
110
- height: 24px;
111
- line-height: 24px;
112
- padding: 0 10px;
113
- box-sizing: content-box;
114
- }
115
- .sdk-chat-control-channel-card__category{
116
- color: #999;
117
- font-size: 12px;
118
- }
119
- }
120
- .sdk-chat-control-channel-card--thumb{
121
- border: 1px solid #eee;
122
- background-color: #fff;
123
- border-radius: 4px;
124
- }
125
- .sdk-chat-control-channel-card--quote {
126
- display: flex;
127
- flex-direction: row;
128
- .sdk-chat-control-channel-card__icon {
129
- display: inline-block;
130
- width: 18px;
131
- height: 18px;
132
- margin-right: 4px;
133
- min-width: 18px;
134
- vertical-align: top;
135
- margin-top: 2px;
136
- color: #999;
137
- background: url('../company-card/quote-icon.svg') no-repeat 50% 50%;
138
- background-size: cover;
139
- }
140
- .sdk-chat-control-channel-card__title{
141
- margin-right: 6px;
142
- }
143
- }
144
- </style>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
3
- <path d="M725.333333 392.533333 947.754667 236.8a21.333333 21.333333 0 0 1 33.578666 17.493333v515.413334a21.333333 21.333333 0 0 1-33.578666 17.493333L725.333333 631.466667V810.666667a42.666667 42.666667 0 0 1-42.666666 42.666666H85.333333a42.666667 42.666667 0 0 1-42.666666-42.666666V213.333333a42.666667 42.666667 0 0 1 42.666666-42.666666h597.333334a42.666667 42.666667 0 0 1 42.666666 42.666666v179.2z" fill="#fff"/>
4
- </svg>
@@ -1,181 +0,0 @@
1
- <template>
2
- <div class="sdk-chat-wework-control-metting" :class="'sdk-chat-wework-control-metting--' + type">
3
- <template v-if="type === 'default' || type === 'thumb'">
4
- <div class="sdk-chat-wework-control-metting__card">
5
- <div class="sdk-chat-wework-control-metting__main">
6
- <div class="sdk-chat-wework-control-metting__info">
7
- <div class="sdk-chat-wework-control-metting__title">{{ title }}</div>
8
- <div class="sdk-chat-wework-control-metting__description">{{ description }}</div>
9
- <div class="sdk-chat-wework-control-metting__initiator" v-if="initiatorText">{{ initiatorText }}</div>
10
- </div>
11
- <div class="sdk-chat-wework-control-metting__video-icon">
12
- <img src="./meeting-video.svg" alt="会议" />
13
- </div>
14
- </div>
15
- <div class="sdk-chat-wework-control-metting__brand">
16
- <img src="./enterprise-wechat.png" alt="" />
17
- <span>企业微信</span>
18
- </div>
19
- </div>
20
- </template>
21
- <template v-else-if="type === 'quote'">
22
- <div class="sdk-chat-wework-control-metting__quote-icon">
23
- <img src="./meeting-video.svg" alt="会议" />
24
- </div>
25
- <div class="sdk-chat-wework-control-metting__quote-title">{{ title }}</div>
26
- </template>
27
- </div>
28
- </template>
29
- <script>
30
- import { parse } from '../../../utils/json'
31
-
32
- export default {
33
- name: 'SdkChatControlMetting',
34
- props: {
35
- id: {
36
- type: String
37
- },
38
- content: {
39
- type: [String, Object]
40
- },
41
- initiator: {
42
- type: String
43
- },
44
- updateChatBoxProp: {
45
- type: Function
46
- },
47
- type: {
48
- type: String,
49
- default: 'default',
50
- validator (value) {
51
- return ['quote', 'default', 'thumb'].includes(value)
52
- }
53
- }
54
- },
55
- computed: {
56
- nextContent () {
57
- return parse(this.content) || {}
58
- },
59
- title () {
60
- return this.nextContent.title || '企业微信会议'
61
- },
62
- description () {
63
- return this.nextContent.desc || '会议已开始,请尽快入会'
64
- },
65
- initiatorText () {
66
- return this.initiator ? `发起人:${this.initiator}` : ''
67
- },
68
- url () {
69
- return this.nextContent.url
70
- }
71
- },
72
- created () {
73
- if (this.url && this.updateChatBoxProp) {
74
- this.updateChatBoxProp('href', this.url)
75
- }
76
- }
77
- }
78
- </script>
79
- <style lang="less">
80
- .sdk-chat-wework-control-metting {
81
- display: inline-block;
82
- max-width: 100%;
83
- color: #222;
84
- }
85
- .sdk-chat-wework-control-metting__card {
86
- width: 248px;
87
- max-width: 100%;
88
- padding: 10px 10px 8px;
89
- box-sizing: border-box;
90
- border-radius: 6px;
91
- background-color: #f1f1f3;
92
- }
93
- .sdk-chat-wework-control-metting__main {
94
- display: flex;
95
- align-items: center;
96
- }
97
- .sdk-chat-wework-control-metting__info {
98
- flex: 1;
99
- min-width: 0;
100
- min-height: 64px;
101
- }
102
- .sdk-chat-wework-control-metting__title {
103
- overflow: hidden;
104
- color: #222;
105
- font-size: 14px;
106
- font-weight: 500;
107
- line-height: 20px;
108
- text-overflow: ellipsis;
109
- white-space: nowrap;
110
- margin-bottom: 6px;
111
- }
112
- .sdk-chat-wework-control-metting__description,
113
- .sdk-chat-wework-control-metting__initiator {
114
- overflow: hidden;
115
- color: #8a8a8a;
116
- font-size: 12px;
117
- line-height: 17px;
118
- text-overflow: ellipsis;
119
- white-space: nowrap;
120
- }
121
- .sdk-chat-wework-control-metting__video-icon {
122
- display: flex;
123
- align-items: center;
124
- justify-content: center;
125
- width: 48px;
126
- height: 48px;
127
- min-width: 48px;
128
- margin-left: 10px;
129
- border-radius: 3px;
130
- background-color: #4b91f1;
131
- img {
132
- width: 26px;
133
- height: 26px;
134
- }
135
- }
136
- .sdk-chat-wework-control-metting__brand {
137
- display: flex;
138
- align-items: center;
139
- height: 18px;
140
- margin-top: 6px;
141
- color: #999;
142
- font-size: 12px;
143
- line-height: 18px;
144
- img {
145
- width: 15px;
146
- height: 15px;
147
- margin-right: 4px;
148
- }
149
- }
150
- .sdk-chat-wework-control-metting--thumb {
151
- width: 100%;
152
- .sdk-chat-wework-control-metting__card {
153
- width: 100%;
154
- }
155
- }
156
- .sdk-chat-wework-control-metting--quote {
157
- display: flex;
158
- align-items: center;
159
- max-width: 320px;
160
- .sdk-chat-wework-control-metting__quote-icon {
161
- display: flex;
162
- align-items: center;
163
- justify-content: center;
164
- width: 22px;
165
- height: 22px;
166
- min-width: 22px;
167
- margin-right: 6px;
168
- border-radius: 2px;
169
- background-color: #4b91f1;
170
- img {
171
- width: 14px;
172
- height: 14px;
173
- }
174
- }
175
- .sdk-chat-wework-control-metting__quote-title {
176
- overflow: hidden;
177
- text-overflow: ellipsis;
178
- white-space: nowrap;
179
- }
180
- }
181
- </style>