mdm-im-v3 2.0.3 → 2.1.2
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/CHANGELOG.md +22 -0
- package/README.md +69 -0
- package/dist/{FilePreview-CqsQCI87.js → FilePreview-Cz0KMA_m.js} +2 -2
- package/dist/assets/extracted/bc26358d.woff +0 -0
- package/dist/assets/extracted/be398edc.ttf +0 -0
- package/dist/assets/extracted/de12ee92.woff2 +0 -0
- package/dist/core.es.js +2 -2
- package/dist/{index-C4_SSULD.js → index-C8koozDu.js} +697 -47
- package/dist/{index-B3MeQmIL.js → index-GiaKeCU7.js} +1550 -3296
- package/dist/{index-D8yaC3ve.js → index-P9_HILzo.js} +3700 -480
- package/dist/index.es.js +1 -1
- package/dist/style/index.css +1 -1
- package/dist-h5/{ChatHistoryH5-Deqlnw3u.js → ChatHistoryH5-CKDqKPl-.js} +2 -2
- package/dist-h5/{ChatPageH5-wyLGmPhW.js → ChatPageH5-FXZxtcQr.js} +975 -164
- package/dist-h5/{ChatSettingsH5-DD3dnI-H.js → ChatSettingsH5-PackrlPt.js} +169 -27
- package/dist-h5/{CreateGroupH5-3LIujy3_.js → CreateGroupH5-CO_ZH36_.js} +2 -2
- package/dist-h5/{GroupAnnouncementH5-5EpXQs5V.js → GroupAnnouncementH5-yUDR5kYW.js} +1 -1
- package/dist-h5/{GroupInfoDialogH5-fgcrbRyp.js → GroupInfoDialogH5-BRk-_mEn.js} +1 -1
- package/dist-h5/{GroupMembersH5-DX2lxrLB.js → GroupMembersH5-BVHUF2mG.js} +1 -1
- package/dist-h5/{GroupNoticeH5-DVXrcmP9.js → GroupNoticeH5-KA-L2h9r.js} +1 -1
- package/dist-h5/{MemberDetailH5-DAVUVr30.js → MemberDetailH5-BfAE0nx-.js} +2 -2
- package/dist-h5/{SearchPageH5-BiGhJF4U.js → SearchPageH5-B6B_U4hW.js} +2 -2
- package/dist-h5/{SelectMembersH5-DbrSnTg3.js → SelectMembersH5-CrPoBnYp.js} +2 -2
- package/dist-h5/assets/extracted/bc26358d.woff +0 -0
- package/dist-h5/assets/extracted/be398edc.ttf +0 -0
- package/dist-h5/assets/extracted/de12ee92.woff2 +0 -0
- package/dist-h5/{imChat-Cz45JFEl.js → imChat-pGlpr8Vj.js} +40 -7
- package/dist-h5/index.es.js +2 -2
- package/dist-h5/{indexH5-Cx3l8YDq.js → indexH5-CCvF1MV7.js} +3591 -329
- package/dist-h5/{indexH5-BZ77bUNH.js → indexH5-sKvS7t3k.js} +101 -69
- package/dist-h5/style/index-h5.css +1 -1
- package/package.json +72 -70
- package/dist-h5/request-rky8JSGo.js +0 -44
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject, computed, ref, onMounted, openBlock, createElementBlock, normalizeClass, createVNode, unref, withCtx, createBlock, createTextVNode, Fragment, createElementVNode, toDisplayString, createCommentVNode, withModifiers, renderList, normalizeStyle } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
|
-
import { NavBar, Icon, Loading, Empty, Button, Cell, Image, Switch, Dialog, Field, Popup, Checkbox, Radio, showToast, showConfirmDialog } from "vant";
|
|
4
|
-
import { u as useChatStore,
|
|
3
|
+
import { NavBar, Icon, Loading, Empty, Button, Cell, Image, Switch, ActionSheet, Dialog, Field, Popup, Checkbox, Radio, showToast, showConfirmDialog } from "vant";
|
|
4
|
+
import { u as useChatStore, h as useConversations, I as IM_CVS_TYPE, o as isNoticeAgentConversation, O as IM_GROUP_MEMBER_ROLE, R as BURN_DEFAULT, S as BURN_PRESETS, T as formatBurnDuration, i as isDefaultAvatar, g as getGroupAvatarBg, a as getAvatarBg, b as getAvatarText, n as handleUrl, U as copyToClipboard, m as mittBus, V as clampBurnDuration, W as buildBurnEx, d as getConversationBurnSetting, J as IM_GROUP_STATUS, c as cloneDeep } from "./indexH5-CCvF1MV7.js";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
6
|
const _hoisted_1 = {
|
|
7
7
|
key: 2,
|
|
@@ -69,6 +69,7 @@ const _sfc_main = {
|
|
|
69
69
|
var _a;
|
|
70
70
|
return ((_a = currentCvs.value) == null ? void 0 : _a.conversationType) === IM_CVS_TYPE.Group;
|
|
71
71
|
});
|
|
72
|
+
const isNoticeAgent = computed(() => isNoticeAgentConversation(currentCvs.value));
|
|
72
73
|
const currentGroupInfo = ref({});
|
|
73
74
|
const currentGroupMembers = ref([]);
|
|
74
75
|
const sortedMembers = ref([]);
|
|
@@ -93,6 +94,10 @@ const _sfc_main = {
|
|
|
93
94
|
const isPinned = ref(false);
|
|
94
95
|
const recvMsgOpt = ref(0);
|
|
95
96
|
const isMuted = ref(false);
|
|
97
|
+
const isPrivateChat = ref(false);
|
|
98
|
+
const burnDuration = ref(BURN_DEFAULT);
|
|
99
|
+
const showBurnPicker = ref(false);
|
|
100
|
+
const burnActions = computed(() => BURN_PRESETS.map((s) => ({ name: formatBurnDuration(s), value: s })));
|
|
96
101
|
const myGroupNickname = ref("");
|
|
97
102
|
const showEditNameDialog = ref(false);
|
|
98
103
|
const editGroupName = ref("");
|
|
@@ -164,6 +169,7 @@ const _sfc_main = {
|
|
|
164
169
|
await doInit(conversationID);
|
|
165
170
|
};
|
|
166
171
|
const doInit = async (conversationID) => {
|
|
172
|
+
var _a;
|
|
167
173
|
try {
|
|
168
174
|
const cvs = conversationList.value.find((item) => item.conversationID === conversationID);
|
|
169
175
|
if (cvs) {
|
|
@@ -174,6 +180,9 @@ const _sfc_main = {
|
|
|
174
180
|
}
|
|
175
181
|
isPinned.value = currentCvs.value.isPinned || false;
|
|
176
182
|
recvMsgOpt.value = currentCvs.value.recvMsgOpt || 0;
|
|
183
|
+
const burnSetting = getConversationBurnSetting(currentCvs.value, (_a = localUser.value) == null ? void 0 : _a.userID);
|
|
184
|
+
isPrivateChat.value = burnSetting.enabled;
|
|
185
|
+
burnDuration.value = burnSetting.enabled ? burnSetting.duration : BURN_DEFAULT;
|
|
177
186
|
if (isGroupChat.value && currentCvs.value.groupID) {
|
|
178
187
|
await loadGroupInfo(currentCvs.value.groupID);
|
|
179
188
|
await loadGroupMembers(currentCvs.value.groupID);
|
|
@@ -483,6 +492,108 @@ const _sfc_main = {
|
|
|
483
492
|
showToast("操作失败");
|
|
484
493
|
}
|
|
485
494
|
};
|
|
495
|
+
const applyPrivateState = (conversationID, privateState, duration, ex) => {
|
|
496
|
+
var _a;
|
|
497
|
+
const patch = { isPrivateChat: privateState, burnDuration: duration };
|
|
498
|
+
if (ex !== void 0) patch.ex = ex;
|
|
499
|
+
if (((_a = currentCvs.value) == null ? void 0 : _a.conversationID) === conversationID) {
|
|
500
|
+
currentCvs.value = { ...currentCvs.value, ...patch };
|
|
501
|
+
}
|
|
502
|
+
const inx = conversationList.value.findIndex((item) => item.conversationID === conversationID);
|
|
503
|
+
if (inx > -1) {
|
|
504
|
+
conversationList.value[inx] = { ...conversationList.value[inx], ...patch };
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
const onPrivateChatChange = async (val) => {
|
|
508
|
+
var _a, _b;
|
|
509
|
+
const conversationID = (_a = currentCvs.value) == null ? void 0 : _a.conversationID;
|
|
510
|
+
const userID = (_b = localUser.value) == null ? void 0 : _b.userID;
|
|
511
|
+
if (!imInstance || !conversationID) {
|
|
512
|
+
isPrivateChat.value = !val;
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
if (val) {
|
|
516
|
+
try {
|
|
517
|
+
await showConfirmDialog({
|
|
518
|
+
title: "开启阅后即焚",
|
|
519
|
+
message: `开启后,你发送的消息被对方阅读 ${formatBurnDuration(burnDuration.value || BURN_DEFAULT)} 后将自动销毁,且不可恢复。`
|
|
520
|
+
});
|
|
521
|
+
} catch {
|
|
522
|
+
isPrivateChat.value = false;
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
burnDuration.value = clampBurnDuration(burnDuration.value || BURN_DEFAULT);
|
|
526
|
+
}
|
|
527
|
+
const duration = val ? burnDuration.value : 0;
|
|
528
|
+
const nextEx = buildBurnEx(currentCvs.value.ex, {
|
|
529
|
+
enabled: val,
|
|
530
|
+
duration,
|
|
531
|
+
fromUserID: userID,
|
|
532
|
+
toUserID: currentCvs.value.userID
|
|
533
|
+
});
|
|
534
|
+
try {
|
|
535
|
+
const res = await imInstance.setPrivateChat({
|
|
536
|
+
conversationID,
|
|
537
|
+
isPrivateChat: val,
|
|
538
|
+
burnDuration: duration,
|
|
539
|
+
ex: nextEx
|
|
540
|
+
});
|
|
541
|
+
if (res) {
|
|
542
|
+
applyPrivateState(conversationID, val, duration, nextEx);
|
|
543
|
+
showToast(val ? "已开启阅后即焚" : "已关闭阅后即焚");
|
|
544
|
+
mittBus.emit("OnConversationChanged", {
|
|
545
|
+
conversationID,
|
|
546
|
+
isPrivateChat: val,
|
|
547
|
+
burnDuration: duration,
|
|
548
|
+
ex: nextEx
|
|
549
|
+
});
|
|
550
|
+
} else {
|
|
551
|
+
isPrivateChat.value = !val;
|
|
552
|
+
showToast("操作失败");
|
|
553
|
+
}
|
|
554
|
+
} catch {
|
|
555
|
+
isPrivateChat.value = !val;
|
|
556
|
+
showToast("操作失败");
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
const onBurnSelect = async (action) => {
|
|
560
|
+
var _a, _b;
|
|
561
|
+
showBurnPicker.value = false;
|
|
562
|
+
const conversationID = (_a = currentCvs.value) == null ? void 0 : _a.conversationID;
|
|
563
|
+
const userID = (_b = localUser.value) == null ? void 0 : _b.userID;
|
|
564
|
+
if (!imInstance || !conversationID) return;
|
|
565
|
+
const duration = clampBurnDuration(action == null ? void 0 : action.value);
|
|
566
|
+
const nextEx = buildBurnEx(currentCvs.value.ex, {
|
|
567
|
+
enabled: true,
|
|
568
|
+
duration,
|
|
569
|
+
fromUserID: userID,
|
|
570
|
+
toUserID: currentCvs.value.userID
|
|
571
|
+
});
|
|
572
|
+
try {
|
|
573
|
+
const res = await imInstance.setPrivateChat({
|
|
574
|
+
conversationID,
|
|
575
|
+
isPrivateChat: true,
|
|
576
|
+
burnDuration: duration,
|
|
577
|
+
ex: nextEx
|
|
578
|
+
});
|
|
579
|
+
if (res) {
|
|
580
|
+
burnDuration.value = duration;
|
|
581
|
+
isPrivateChat.value = true;
|
|
582
|
+
applyPrivateState(conversationID, true, duration, nextEx);
|
|
583
|
+
showToast("已设置阅后即焚时间");
|
|
584
|
+
mittBus.emit("OnConversationChanged", {
|
|
585
|
+
conversationID,
|
|
586
|
+
isPrivateChat: true,
|
|
587
|
+
burnDuration: duration,
|
|
588
|
+
ex: nextEx
|
|
589
|
+
});
|
|
590
|
+
} else {
|
|
591
|
+
showToast("操作失败");
|
|
592
|
+
}
|
|
593
|
+
} catch {
|
|
594
|
+
showToast("操作失败");
|
|
595
|
+
}
|
|
596
|
+
};
|
|
486
597
|
const onMutedChange = async (val) => {
|
|
487
598
|
const groupID = currentCvs.value.groupID;
|
|
488
599
|
if (!imInstance || !groupID) {
|
|
@@ -736,7 +847,7 @@ const _sfc_main = {
|
|
|
736
847
|
class: "chat-settings-h5__loading",
|
|
737
848
|
vertical: ""
|
|
738
849
|
}, {
|
|
739
|
-
default: withCtx(() => [..._cache[
|
|
850
|
+
default: withCtx(() => [..._cache[12] || (_cache[12] = [
|
|
740
851
|
createTextVNode("加载中...", -1)
|
|
741
852
|
])]),
|
|
742
853
|
_: 1
|
|
@@ -750,7 +861,7 @@ const _sfc_main = {
|
|
|
750
861
|
size: "small",
|
|
751
862
|
onClick: initPage
|
|
752
863
|
}, {
|
|
753
|
-
default: withCtx(() => [..._cache[
|
|
864
|
+
default: withCtx(() => [..._cache[13] || (_cache[13] = [
|
|
754
865
|
createTextVNode("重试", -1)
|
|
755
866
|
])]),
|
|
756
867
|
_: 1
|
|
@@ -804,7 +915,7 @@ const _sfc_main = {
|
|
|
804
915
|
value: "工作群"
|
|
805
916
|
})
|
|
806
917
|
]),
|
|
807
|
-
_cache[
|
|
918
|
+
_cache[16] || (_cache[16] = createElementVNode("div", { class: "section-divider" }, null, -1)),
|
|
808
919
|
!isDismissed.value && !isExitGroup.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
809
920
|
createVNode(unref(Cell), {
|
|
810
921
|
title: "群成员",
|
|
@@ -846,7 +957,7 @@ const _sfc_main = {
|
|
|
846
957
|
color: "var(--chat-theme-color, #1989fa)"
|
|
847
958
|
})
|
|
848
959
|
]),
|
|
849
|
-
_cache[
|
|
960
|
+
_cache[14] || (_cache[14] = createElementVNode("span", { class: "member-name action-name" }, "添加", -1))
|
|
850
961
|
])) : createCommentVNode("", true),
|
|
851
962
|
isOwner.value && !isDismissed.value && !isExitGroup.value ? (openBlock(), createElementBlock("div", {
|
|
852
963
|
key: 1,
|
|
@@ -860,11 +971,11 @@ const _sfc_main = {
|
|
|
860
971
|
color: "var(--chat-danger-color, #ee0a24)"
|
|
861
972
|
})
|
|
862
973
|
]),
|
|
863
|
-
_cache[
|
|
974
|
+
_cache[15] || (_cache[15] = createElementVNode("span", { class: "member-name action-name" }, "移除", -1))
|
|
864
975
|
])) : createCommentVNode("", true)
|
|
865
976
|
])
|
|
866
977
|
])) : createCommentVNode("", true),
|
|
867
|
-
_cache[
|
|
978
|
+
_cache[17] || (_cache[17] = createElementVNode("div", { class: "section-divider" }, null, -1)),
|
|
868
979
|
!isDismissed.value && !isExitGroup.value ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
869
980
|
createVNode(unref(Cell), {
|
|
870
981
|
title: "我的群聊昵称",
|
|
@@ -906,29 +1017,52 @@ const _sfc_main = {
|
|
|
906
1017
|
]),
|
|
907
1018
|
_: 1
|
|
908
1019
|
}),
|
|
1020
|
+
!isGroupChat.value && !isNoticeAgent.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1021
|
+
createVNode(unref(Cell), {
|
|
1022
|
+
title: "阅后即焚",
|
|
1023
|
+
center: ""
|
|
1024
|
+
}, {
|
|
1025
|
+
"right-icon": withCtx(() => [
|
|
1026
|
+
createVNode(unref(Switch), {
|
|
1027
|
+
modelValue: isPrivateChat.value,
|
|
1028
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isPrivateChat.value = $event),
|
|
1029
|
+
disabled: isDismissed.value || isExitGroup.value,
|
|
1030
|
+
onChange: onPrivateChatChange
|
|
1031
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
1032
|
+
]),
|
|
1033
|
+
_: 1
|
|
1034
|
+
}),
|
|
1035
|
+
isPrivateChat.value ? (openBlock(), createBlock(unref(Cell), {
|
|
1036
|
+
key: 0,
|
|
1037
|
+
title: "阅后即焚时间",
|
|
1038
|
+
"is-link": "",
|
|
1039
|
+
value: unref(formatBurnDuration)(burnDuration.value),
|
|
1040
|
+
onClick: _cache[3] || (_cache[3] = ($event) => showBurnPicker.value = true)
|
|
1041
|
+
}, null, 8, ["value"])) : createCommentVNode("", true)
|
|
1042
|
+
], 64)) : createCommentVNode("", true),
|
|
909
1043
|
isGroupChat.value && isOwner.value && !isDismissed.value && !isExitGroup.value ? (openBlock(), createBlock(unref(Cell), {
|
|
910
|
-
key:
|
|
1044
|
+
key: 1,
|
|
911
1045
|
title: "全体禁言",
|
|
912
1046
|
center: ""
|
|
913
1047
|
}, {
|
|
914
1048
|
"right-icon": withCtx(() => [
|
|
915
1049
|
createVNode(unref(Switch), {
|
|
916
1050
|
modelValue: isMuted.value,
|
|
917
|
-
"onUpdate:modelValue": _cache[
|
|
1051
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isMuted.value = $event),
|
|
918
1052
|
onChange: onMutedChange
|
|
919
1053
|
}, null, 8, ["modelValue"])
|
|
920
1054
|
]),
|
|
921
1055
|
_: 1
|
|
922
1056
|
})) : createCommentVNode("", true),
|
|
923
1057
|
!isExitGroup.value ? (openBlock(), createBlock(unref(Cell), {
|
|
924
|
-
key:
|
|
1058
|
+
key: 2,
|
|
925
1059
|
title: "清空聊天记录",
|
|
926
1060
|
"is-link": "",
|
|
927
1061
|
onClick: onClearHistory
|
|
928
1062
|
})) : createCommentVNode("", true)
|
|
929
1063
|
]),
|
|
930
1064
|
isGroupChat.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
931
|
-
_cache[
|
|
1065
|
+
_cache[20] || (_cache[20] = createElementVNode("div", { class: "section-divider" }, null, -1)),
|
|
932
1066
|
createElementVNode("div", _hoisted_17, [
|
|
933
1067
|
isOwner.value && !isDismissed.value ? (openBlock(), createBlock(unref(Cell), {
|
|
934
1068
|
key: 0,
|
|
@@ -945,7 +1079,7 @@ const _sfc_main = {
|
|
|
945
1079
|
round: "",
|
|
946
1080
|
onClick: onDismissGroup
|
|
947
1081
|
}, {
|
|
948
|
-
default: withCtx(() => [..._cache[
|
|
1082
|
+
default: withCtx(() => [..._cache[18] || (_cache[18] = [
|
|
949
1083
|
createTextVNode(" 解散群聊 ", -1)
|
|
950
1084
|
])]),
|
|
951
1085
|
_: 1
|
|
@@ -958,7 +1092,7 @@ const _sfc_main = {
|
|
|
958
1092
|
class: "exit-btn",
|
|
959
1093
|
onClick: onExitGroup
|
|
960
1094
|
}, {
|
|
961
|
-
default: withCtx(() => [..._cache[
|
|
1095
|
+
default: withCtx(() => [..._cache[19] || (_cache[19] = [
|
|
962
1096
|
createTextVNode(" 退出群聊 ", -1)
|
|
963
1097
|
])]),
|
|
964
1098
|
_: 1
|
|
@@ -971,17 +1105,25 @@ const _sfc_main = {
|
|
|
971
1105
|
round: "",
|
|
972
1106
|
onClick: onDeleteConversation
|
|
973
1107
|
}, {
|
|
974
|
-
default: withCtx(() => [..._cache[
|
|
1108
|
+
default: withCtx(() => [..._cache[21] || (_cache[21] = [
|
|
975
1109
|
createTextVNode(" 删除此会话 ", -1)
|
|
976
1110
|
])]),
|
|
977
1111
|
_: 1
|
|
978
1112
|
})
|
|
979
1113
|
])),
|
|
980
|
-
_cache[
|
|
1114
|
+
_cache[22] || (_cache[22] = createElementVNode("div", { class: "safe-bottom" }, null, -1))
|
|
981
1115
|
])),
|
|
1116
|
+
createVNode(unref(ActionSheet), {
|
|
1117
|
+
show: showBurnPicker.value,
|
|
1118
|
+
"onUpdate:show": _cache[5] || (_cache[5] = ($event) => showBurnPicker.value = $event),
|
|
1119
|
+
actions: burnActions.value,
|
|
1120
|
+
"cancel-text": "取消",
|
|
1121
|
+
"close-on-click-action": "",
|
|
1122
|
+
onSelect: onBurnSelect
|
|
1123
|
+
}, null, 8, ["show", "actions"]),
|
|
982
1124
|
createVNode(unref(Dialog), {
|
|
983
1125
|
show: showEditNameDialog.value,
|
|
984
|
-
"onUpdate:show": _cache[
|
|
1126
|
+
"onUpdate:show": _cache[7] || (_cache[7] = ($event) => showEditNameDialog.value = $event),
|
|
985
1127
|
title: "修改群名称",
|
|
986
1128
|
"show-cancel-button": "",
|
|
987
1129
|
onConfirm: onConfirmEditName
|
|
@@ -990,7 +1132,7 @@ const _sfc_main = {
|
|
|
990
1132
|
createElementVNode("div", _hoisted_20, [
|
|
991
1133
|
createVNode(unref(Field), {
|
|
992
1134
|
modelValue: editGroupName.value,
|
|
993
|
-
"onUpdate:modelValue": _cache[
|
|
1135
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => editGroupName.value = $event),
|
|
994
1136
|
placeholder: "请输入群聊名称",
|
|
995
1137
|
maxlength: 20,
|
|
996
1138
|
clearable: ""
|
|
@@ -1001,7 +1143,7 @@ const _sfc_main = {
|
|
|
1001
1143
|
}, 8, ["show"]),
|
|
1002
1144
|
createVNode(unref(Dialog), {
|
|
1003
1145
|
show: showEditNicknameDialog.value,
|
|
1004
|
-
"onUpdate:show": _cache[
|
|
1146
|
+
"onUpdate:show": _cache[9] || (_cache[9] = ($event) => showEditNicknameDialog.value = $event),
|
|
1005
1147
|
title: "修改我的群昵称",
|
|
1006
1148
|
"show-cancel-button": "",
|
|
1007
1149
|
onConfirm: onConfirmEditNickname
|
|
@@ -1010,7 +1152,7 @@ const _sfc_main = {
|
|
|
1010
1152
|
createElementVNode("div", _hoisted_21, [
|
|
1011
1153
|
createVNode(unref(Field), {
|
|
1012
1154
|
modelValue: editNickname.value,
|
|
1013
|
-
"onUpdate:modelValue": _cache[
|
|
1155
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => editNickname.value = $event),
|
|
1014
1156
|
placeholder: "请输入群聊昵称",
|
|
1015
1157
|
maxlength: 20,
|
|
1016
1158
|
clearable: ""
|
|
@@ -1021,7 +1163,7 @@ const _sfc_main = {
|
|
|
1021
1163
|
}, 8, ["show"]),
|
|
1022
1164
|
createVNode(unref(Popup), {
|
|
1023
1165
|
show: showRemovePopup.value,
|
|
1024
|
-
"onUpdate:show": _cache[
|
|
1166
|
+
"onUpdate:show": _cache[10] || (_cache[10] = ($event) => showRemovePopup.value = $event),
|
|
1025
1167
|
position: "bottom",
|
|
1026
1168
|
style: { height: "100vh", height: "100dvh" },
|
|
1027
1169
|
round: "",
|
|
@@ -1032,7 +1174,7 @@ const _sfc_main = {
|
|
|
1032
1174
|
}, {
|
|
1033
1175
|
default: withCtx(() => [
|
|
1034
1176
|
createElementVNode("div", _hoisted_22, [
|
|
1035
|
-
_cache[
|
|
1177
|
+
_cache[24] || (_cache[24] = createElementVNode("div", { class: "remove-popup__header" }, [
|
|
1036
1178
|
createElementVNode("span", { class: "remove-popup__title" }, "移除成员")
|
|
1037
1179
|
], -1)),
|
|
1038
1180
|
createElementVNode("div", _hoisted_23, [
|
|
@@ -1077,7 +1219,7 @@ const _sfc_main = {
|
|
|
1077
1219
|
disabled: !canRemove.value,
|
|
1078
1220
|
onClick: onConfirmRemove
|
|
1079
1221
|
}, {
|
|
1080
|
-
default: withCtx(() => [..._cache[
|
|
1222
|
+
default: withCtx(() => [..._cache[23] || (_cache[23] = [
|
|
1081
1223
|
createTextVNode(" 移除 ", -1)
|
|
1082
1224
|
])]),
|
|
1083
1225
|
_: 1
|
|
@@ -1089,7 +1231,7 @@ const _sfc_main = {
|
|
|
1089
1231
|
}, 8, ["show"]),
|
|
1090
1232
|
createVNode(unref(Popup), {
|
|
1091
1233
|
show: showTransferPopup.value,
|
|
1092
|
-
"onUpdate:show": _cache[
|
|
1234
|
+
"onUpdate:show": _cache[11] || (_cache[11] = ($event) => showTransferPopup.value = $event),
|
|
1093
1235
|
position: "bottom",
|
|
1094
1236
|
style: { height: "100vh", height: "100dvh" },
|
|
1095
1237
|
round: "",
|
|
@@ -1099,7 +1241,7 @@ const _sfc_main = {
|
|
|
1099
1241
|
}, {
|
|
1100
1242
|
default: withCtx(() => [
|
|
1101
1243
|
createElementVNode("div", _hoisted_28, [
|
|
1102
|
-
_cache[
|
|
1244
|
+
_cache[26] || (_cache[26] = createElementVNode("div", { class: "transfer-popup__header" }, [
|
|
1103
1245
|
createElementVNode("span", { class: "transfer-popup__title" }, "转让群组")
|
|
1104
1246
|
], -1)),
|
|
1105
1247
|
createElementVNode("div", _hoisted_29, [
|
|
@@ -1146,7 +1288,7 @@ const _sfc_main = {
|
|
|
1146
1288
|
loading: transferLoading.value,
|
|
1147
1289
|
onClick: onConfirmTransfer
|
|
1148
1290
|
}, {
|
|
1149
|
-
default: withCtx(() => [..._cache[
|
|
1291
|
+
default: withCtx(() => [..._cache[25] || (_cache[25] = [
|
|
1150
1292
|
createTextVNode(" 转让群组 ", -1)
|
|
1151
1293
|
])]),
|
|
1152
1294
|
_: 1
|
|
@@ -1160,7 +1302,7 @@ const _sfc_main = {
|
|
|
1160
1302
|
};
|
|
1161
1303
|
}
|
|
1162
1304
|
};
|
|
1163
|
-
const ChatSettingsH5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1305
|
+
const ChatSettingsH5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d1bceaa6"]]);
|
|
1164
1306
|
export {
|
|
1165
1307
|
ChatSettingsH5 as default
|
|
1166
1308
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed, ref, onMounted, onBeforeUnmount, openBlock, createElementBlock, createVNode, unref, createElementVNode, withCtx, createBlock, Fragment, renderList, normalizeClass, normalizeStyle, toDisplayString, withModifiers, createCommentVNode, createTextVNode } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import { NavBar, Field, Cell, Loading, Image, Icon, Button, ActionSheet, Empty, showToast } from "vant";
|
|
4
|
-
import { u as useChatStore,
|
|
5
|
-
import { u as uploadFiles } from "./imChat-
|
|
4
|
+
import { u as useChatStore, f as useUsers, n as handleUrl, m as mittBus, i as isDefaultAvatar, a as getAvatarBg, b as getAvatarText, I as IM_CVS_TYPE, O as IM_GROUP_MEMBER_ROLE, P as GROUP_VERIFICATION_TYPE, J as IM_GROUP_STATUS, Q as IM_GROUP_TYPE } from "./indexH5-CCvF1MV7.js";
|
|
5
|
+
import { u as uploadFiles } from "./imChat-pGlpr8Vj.js";
|
|
6
6
|
import { d as defaultAvatar } from "./default_avatar-BE2kit_X.js";
|
|
7
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
8
8
|
const _hoisted_1 = { class: "create-group-h5" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject, computed, ref, onMounted, openBlock, createElementBlock, normalizeClass, createVNode, unref, createBlock, withCtx, createTextVNode, Fragment, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString } from "vue";
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
|
3
3
|
import { showToast, NavBar, Loading, Empty, Field, Button, showDialog } from "vant";
|
|
4
|
-
import { u as useChatStore,
|
|
4
|
+
import { u as useChatStore, v as useDate, i as isDefaultAvatar, a as getAvatarBg, b as getAvatarText, n as handleUrl, O as IM_GROUP_MEMBER_ROLE } from "./indexH5-CCvF1MV7.js";
|
|
5
5
|
import { d as defaultAvatar } from "./default_avatar-BE2kit_X.js";
|
|
6
6
|
import { e as emptyImage } from "./empty_notice-D1FNXIRD.js";
|
|
7
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, ref, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createElementBlock, Fragment, renderList, normalizeClass, withModifiers, createTextVNode, toDisplayString, normalizeStyle, createCommentVNode } from "vue";
|
|
2
|
-
import { u as useChatStore,
|
|
2
|
+
import { u as useChatStore, L as debounce, i as isDefaultAvatar, g as getGroupAvatarBg, n as handleUrl, M as handleDateUtil, a as getAvatarBg, b as getAvatarText, N as GROUP_JOIN_SOURCE } from "./indexH5-CCvF1MV7.js";
|
|
3
3
|
import { Popup, Icon, Search, Loading, Empty, CellGroup, Cell, Radio, Button, Field, showToast } from "vant";
|
|
4
4
|
import { d as defaultAvatar } from "./default_avatar-BE2kit_X.js";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject, computed, ref, onMounted, openBlock, createElementBlock, normalizeClass, createVNode, unref, createElementVNode, createBlock, withCtx, createTextVNode, Fragment, renderList, withModifiers, createCommentVNode, toDisplayString, normalizeStyle } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import { NavBar, Search, Loading, Empty, Cell, Tag, Button, ActionSheet, showDialog, showToast } from "vant";
|
|
4
|
-
import { u as useChatStore,
|
|
4
|
+
import { u as useChatStore, O as IM_GROUP_MEMBER_ROLE, i as isDefaultAvatar, a as getAvatarBg, b as getAvatarText, J as IM_GROUP_STATUS, c as cloneDeep, n as handleUrl } from "./indexH5-CCvF1MV7.js";
|
|
5
5
|
import { d as defaultAvatar } from "./default_avatar-BE2kit_X.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
7
7
|
const _hoisted_1 = { class: "members-content" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, inject, ref, onMounted, openBlock, createElementBlock, normalizeClass, createVNode, unref, withCtx, createElementVNode, createBlock, createCommentVNode, Fragment, renderList, createTextVNode, toDisplayString, normalizeStyle } from "vue";
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
3
|
import { NavBar, Icon, Tabs, Tab, Loading, Empty, Cell, Button, showToast } from "vant";
|
|
4
|
-
import { u as useChatStore, i as isDefaultAvatar, a as getAvatarBg, b as getAvatarText,
|
|
4
|
+
import { u as useChatStore, i as isDefaultAvatar, a as getAvatarBg, b as getAvatarText, n as handleUrl, g as getGroupAvatarBg, M as handleDateUtil } from "./indexH5-CCvF1MV7.js";
|
|
5
5
|
import { d as defaultAvatar } from "./default_avatar-BE2kit_X.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
7
7
|
const _hoisted_1 = { class: "notice-list" };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed, inject, ref, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, unref, withCtx, createBlock, normalizeStyle, toDisplayString, createCommentVNode, createTextVNode, Fragment, withModifiers } from "vue";
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
|
3
3
|
import { showToast, NavBar, Icon, Image, Loading, Empty, Button, CellGroup, Cell } from "vant";
|
|
4
|
-
import { u as useChatStore,
|
|
5
|
-
import { g as getUserInfoByLoginCode, u as uploadFiles } from "./imChat-
|
|
4
|
+
import { u as useChatStore, f as useUsers, n as handleUrl, i as isDefaultAvatar, h as useConversations, a as getAvatarBg, b as getAvatarText, I as IM_CVS_TYPE } from "./indexH5-CCvF1MV7.js";
|
|
5
|
+
import { g as getUserInfoByLoginCode, u as uploadFiles } from "./imChat-pGlpr8Vj.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
7
7
|
const _hoisted_1 = { class: "detail-header" };
|
|
8
8
|
const _hoisted_2 = { class: "detail-avatar" };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed, ref, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, createBlock, Fragment, renderList, normalizeStyle, toDisplayString, createTextVNode, createCommentVNode } from "vue";
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
3
|
import { NavBar, Search, Loading, CellGroup, Cell, Tag, Empty } from "vant";
|
|
4
|
-
import { u as useChatStore,
|
|
5
|
-
import { s as searchOpenIMUsers } from "./imChat-
|
|
4
|
+
import { u as useChatStore, h as useConversations, L as debounce, I as IM_CVS_TYPE, g as getGroupAvatarBg, i as isDefaultAvatar, a as getAvatarBg, b as getAvatarText, n as handleUrl } from "./indexH5-CCvF1MV7.js";
|
|
5
|
+
import { s as searchOpenIMUsers } from "./imChat-pGlpr8Vj.js";
|
|
6
6
|
import { d as defaultAvatar } from "./default_avatar-BE2kit_X.js";
|
|
7
7
|
const _hoisted_1 = { class: "search-page-h5" };
|
|
8
8
|
const _hoisted_2 = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed, ref, onMounted, openBlock, createElementBlock, createVNode, unref, createBlock, createCommentVNode, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, withCtx, createSlots, withModifiers, normalizeStyle, createTextVNode } from "vue";
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
|
-
import { u as useChatStore,
|
|
3
|
+
import { u as useChatStore, L as debounce, i as isDefaultAvatar, n as handleUrl, a as getAvatarBg, b as getAvatarText } from "./indexH5-CCvF1MV7.js";
|
|
4
4
|
import { NavBar, Search, Icon, CellGroup, Cell, Loading, Empty, List, Checkbox, Button, showToast } from "vant";
|
|
5
|
-
import { q as queryUserAddressBook, a as queryUsersByDept, b as searchUsersByDept } from "./imChat-
|
|
5
|
+
import { q as queryUserAddressBook, a as queryUsersByDept, b as searchUsersByDept } from "./imChat-pGlpr8Vj.js";
|
|
6
6
|
import { d as defaultAvatar } from "./default_avatar-BE2kit_X.js";
|
|
7
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
8
8
|
const _hoisted_1 = { class: "select-members-h5" };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
import { ElMessage } from "element-plus";
|
|
2
|
-
import {
|
|
2
|
+
import { u as useChatStore, Y as imSessionScope, Z as IMSessionChangedError, _ as requestInstance } from "./indexH5-CCvF1MV7.js";
|
|
3
|
+
async function withTenantDirectory(commonUrl, request) {
|
|
4
|
+
var _a, _b, _c;
|
|
5
|
+
const store = useChatStore();
|
|
6
|
+
const scope = imSessionScope(store);
|
|
7
|
+
const result = await request;
|
|
8
|
+
if (imSessionScope(store) !== scope) throw new IMSessionChangedError();
|
|
9
|
+
if (Number(store.imIdentityVersion) !== 2 || ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.code) !== 200) return result;
|
|
10
|
+
const contacts = [];
|
|
11
|
+
const walk = (value) => {
|
|
12
|
+
if (!value || typeof value !== "object") return;
|
|
13
|
+
if (!Array.isArray(value) && typeof value.loginCode === "string" && value.loginCode) contacts.push(value);
|
|
14
|
+
for (const child of Object.values(value)) if (typeof child === "object") walk(child);
|
|
15
|
+
};
|
|
16
|
+
walk(result.data.data);
|
|
17
|
+
const refs = [...new Set(contacts.map((item) => item.loginCode))];
|
|
18
|
+
const mapped = /* @__PURE__ */ new Map();
|
|
19
|
+
for (let offset = 0; offset < refs.length; offset += 100) {
|
|
20
|
+
const reply = await requestInstance.post(`${commonUrl}/api/v1/openim/resolveTargets`, { loginCodes: refs.slice(offset, offset + 100) });
|
|
21
|
+
if (imSessionScope(store) !== scope) throw new IMSessionChangedError();
|
|
22
|
+
if (((_b = reply == null ? void 0 : reply.data) == null ? void 0 : _b.code) !== 200) throw new Error(((_c = reply == null ? void 0 : reply.data) == null ? void 0 : _c.msg) || "人员 IM 身份解析失败");
|
|
23
|
+
for (const item of reply.data.data.targets || []) mapped.set(item.reference, item.imUserID);
|
|
24
|
+
}
|
|
25
|
+
for (const item of contacts) {
|
|
26
|
+
const id = mapped.get(item.loginCode);
|
|
27
|
+
if (!id) throw new Error("人员 IM 身份缺失");
|
|
28
|
+
item.businessLoginCode = item.loginCode;
|
|
29
|
+
item.businessUserID = item.userID;
|
|
30
|
+
item.imUserID = id;
|
|
31
|
+
item.loginCode = id;
|
|
32
|
+
item.userID = id;
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
3
36
|
const CHUNK_MAX_SIZE = 20 * 1024 * 1024;
|
|
4
37
|
const TARGET_CHUNK_SIZE = 20 * 1024 * 1024;
|
|
5
38
|
const LARGE_FILE_THRESHOLD = 20 * 1024 * 1024;
|
|
@@ -724,21 +757,21 @@ const searchChatLogs = (commonUrl, params) => {
|
|
|
724
757
|
return requestInstance.post(`${commonUrl}/api/v1/openim/iMSearchMsg2`, params);
|
|
725
758
|
};
|
|
726
759
|
const getUserInfoByLoginCode = (commonUrl, loginCode) => {
|
|
727
|
-
return requestInstance.post(`${commonUrl}/api/v1/openim/getOpenIMUserInfoByLoginCode`, {
|
|
760
|
+
return withTenantDirectory(commonUrl, requestInstance.post(`${commonUrl}/api/v1/openim/getOpenIMUserInfoByLoginCode`, {
|
|
728
761
|
loginCode
|
|
729
|
-
});
|
|
762
|
+
}));
|
|
730
763
|
};
|
|
731
764
|
const searchOpenIMUsers = (commonUrl, params) => {
|
|
732
|
-
return requestInstance.post(`${commonUrl}/api/v1/openim/searchOpenIMUsers`, params);
|
|
765
|
+
return withTenantDirectory(commonUrl, requestInstance.post(`${commonUrl}/api/v1/openim/searchOpenIMUsers`, params));
|
|
733
766
|
};
|
|
734
767
|
const queryUserAddressBook = (commonUrl, params = {}) => {
|
|
735
|
-
return requestInstance.post(`${commonUrl}/api/v1/communication/queryUserAddressBook`, params);
|
|
768
|
+
return withTenantDirectory(commonUrl, requestInstance.post(`${commonUrl}/api/v1/communication/queryUserAddressBook`, params));
|
|
736
769
|
};
|
|
737
770
|
const queryUsersByDept = (commonUrl, params = {}) => {
|
|
738
|
-
return requestInstance.post(`${commonUrl}/api/v1/communication/queryUsersByDept`, params);
|
|
771
|
+
return withTenantDirectory(commonUrl, requestInstance.post(`${commonUrl}/api/v1/communication/queryUsersByDept`, params));
|
|
739
772
|
};
|
|
740
773
|
const searchUsersByDept = (commonUrl, params = {}) => {
|
|
741
|
-
return requestInstance.post(`${commonUrl}/api/v1/communication/searchUsersByDept`, params);
|
|
774
|
+
return withTenantDirectory(commonUrl, requestInstance.post(`${commonUrl}/api/v1/communication/searchUsersByDept`, params));
|
|
742
775
|
};
|
|
743
776
|
export {
|
|
744
777
|
queryUsersByDept as a,
|
package/dist-h5/index.es.js
CHANGED