优化页面

This commit is contained in:
pengxiaolong
2025-06-12 22:16:09 +08:00
parent 931d867c09
commit de99d32c01
63 changed files with 973 additions and 335 deletions

View File

@@ -8,11 +8,14 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
setup(__props, { emit: __emit }) {
const currentConversation = common_vendor.ref();
const typingStatus = common_vendor.ref(false);
const setChatHeaderContent = (content) => {
var _a;
(_a = common_vendor.i) == null ? void 0 : _a.setNavigationBarTitle({
title: content || "云通信 IM"
const Title = common_vendor.ref("Global");
function Returnfunc() {
common_vendor.index.navigateBack({
delta: 1
});
}
const setChatHeaderContent = (content) => {
Title.value = content || "Global";
};
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CONV, {
@@ -45,13 +48,16 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
var _a;
typingStatus.value = status;
if (typingStatus.value) {
setChatHeaderContent(common_vendor.Wt.t("TUIChat.对方正在输入"));
setChatHeaderContent(common_vendor.Wt.t("TUIChat.对方正在输入..."));
} else {
setChatHeaderContent((_a = currentConversation.value) == null ? void 0 : _a.getShowName());
}
}
return (_ctx, _cache) => {
return {};
return {
a: common_vendor.t(common_vendor.unref(Title)),
b: common_vendor.o$1(Returnfunc)
};
};
}
});

View File

@@ -1 +1 @@
<view style="display:flex"/>
<view class="Navigation"><view class="Navigation-name">{{a}}</view><image src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Navigationimg.png" mode="scaleToFill" class="Navigationimg"/><image bindtap="{{b}}" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill" class="Return"/></view>

View File

@@ -0,0 +1,34 @@
.Return {
width: 46rpx;
height: 46rpx;
position: absolute;
top: 110rpx;
left: 40rpx;
z-index: 999;
font-weight: bold;
}
.Navigationimg {
width: 100%;
height: 240rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.Navigation-name{
position: absolute;
top: 110rpx;
left: 320rpx;
font-size: 36rpx;
color: #000000;
font-weight: bold;
}
.Navigation{
position: fixed;
top: 0;
left: 0;
z-index: 999;
width: 100%;
height: 240rpx;
}

View File

@@ -1 +1 @@
<view class="dingweizhibox data-v-04dfedea"></view><view class="chat data-v-04dfedea"><view class="{{['data-v-04dfedea', 'tui-chat', O]}}"><view wx:if="{{a}}" class="{{['data-v-04dfedea', 'tui-chat-default', b]}}"><slot/></view><view wx:if="{{c}}" class="{{['data-v-04dfedea', 'tui-chat', K]}}"><chat-header wx:if="{{h}}" class="{{['data-v-04dfedea', 'tui-chat-header', d, e]}}" bindcloseChat="{{f}}" bindopenGroupManagement="{{g}}" u-i="04dfedea-0" bind:__l="__l" u-p="{{h}}"/><forward class="data-v-04dfedea" bindtoggleMultipleSelectMode="{{i}}" u-i="04dfedea-1" bind:__l="__l"/><message-list wx:if="{{o}}" u-r="messageListRef" class="{{['r', 'data-v-04dfedea', 'tui-chat-message-list', k]}}" bindhandleEditor="{{l}}" bindcloseInputToolBar="{{m}}" bindtoggleMultipleSelectMode="{{n}}" u-i="04dfedea-2" bind:__l="__l" u-p="{{o}}"/><view wx:if="{{p}}" class="{{['data-v-04dfedea', 'tui-chat-leave-group', r && 'tui-chat-leave-group-mobile']}}">{{q}}</view><multiple-select-panel wx:elif="{{s}}" class="data-v-04dfedea" bindoneByOneForwardMessage="{{t}}" bindmergeForwardMessage="{{v}}" bindtoggleMultipleSelectMode="{{w}}" u-i="04dfedea-3" bind:__l="__l"/><block wx:else><message-input-toolbar wx:if="{{x}}" class="{{['data-v-04dfedea', 'tui-chat-message-input-toolbar', y, z]}}" bindinsertEmoji="{{A}}" bindchangeToolbarDisplayType="{{B}}" bindscrollToLatestMessage="{{C}}" u-i="04dfedea-4" bind:__l="__l" u-p="{{D}}"/><message-input wx:if="{{J}}" u-r="messageInputRef" class="{{['r', 'data-v-04dfedea', 'tui-chat-message-input', F, G, H]}}" bindchangeToolbarDisplayType="{{I}}" u-i="04dfedea-5" bind:__l="__l" u-p="{{J}}"/></block></view><view wx:if="{{L}}" class="group-profile data-v-04dfedea" bindtap="{{N}}">{{M}}</view></view></view>
<chat-header class="ChatHeadercss data-v-04dfedea" u-i="04dfedea-0" bind:__l="__l"/><view class="dingweizhibox data-v-04dfedea"></view><view class="chat data-v-04dfedea"><view class="{{['data-v-04dfedea', 'tui-chat', J]}}"><view wx:if="{{a}}" class="{{['data-v-04dfedea', 'tui-chat-default', b]}}"><slot/></view><view wx:if="{{c}}" class="{{['data-v-04dfedea', 'tui-chat', F]}}"><forward class="data-v-04dfedea" bindtoggleMultipleSelectMode="{{d}}" u-i="04dfedea-1" bind:__l="__l"/><message-list wx:if="{{j}}" u-r="messageListRef" class="{{['r', 'data-v-04dfedea', 'tui-chat-message-list', f]}}" bindhandleEditor="{{g}}" bindcloseInputToolBar="{{h}}" bindtoggleMultipleSelectMode="{{i}}" u-i="04dfedea-2" bind:__l="__l" u-p="{{j}}"/><view wx:if="{{k}}" class="{{['data-v-04dfedea', 'tui-chat-leave-group', m && 'tui-chat-leave-group-mobile']}}">{{l}}</view><multiple-select-panel wx:elif="{{n}}" class="data-v-04dfedea" bindoneByOneForwardMessage="{{o}}" bindmergeForwardMessage="{{p}}" bindtoggleMultipleSelectMode="{{q}}" u-i="04dfedea-3" bind:__l="__l"/><block wx:else><message-input-toolbar wx:if="{{r}}" class="{{['data-v-04dfedea', 'tui-chat-message-input-toolbar', s, t]}}" bindinsertEmoji="{{v}}" bindchangeToolbarDisplayType="{{w}}" bindscrollToLatestMessage="{{x}}" u-i="04dfedea-4" bind:__l="__l" u-p="{{y}}"/><message-input wx:if="{{E}}" u-r="messageInputRef" class="{{['r', 'data-v-04dfedea', 'tui-chat-message-input', A, B, C]}}" bindchangeToolbarDisplayType="{{D}}" u-i="04dfedea-5" bind:__l="__l" u-p="{{E}}"/></block></view><view wx:if="{{G}}" class="group-profile data-v-04dfedea" bindtap="{{I}}">{{H}}</view></view></view>

View File

@@ -650,58 +650,11 @@ input.data-v-04dfedea:focus, input.data-v-04dfedea:active, textarea.data-v-04dfe
width: 100%;
height: 15%;
}
.tui-chat{
width: 100%;
height: 15%;
}
.tui-chat-h5 {
width: 100%;
height: 100%;
}
.tui-chat-uniapp-header{
width: 100%;
height: 100%;
}
.Navigation {
width: 100%;
height: 10%;
.ChatHeadercss{
position: fixed;
top: 0;
left: 0;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
}
.Navigationimg {
width: 100%;
height: 200rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.Navigation {
width: 100%;
height: 200rpx;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
}
.Return {
width: 50rpx;
height: 50rpx;
position: absolute;
top: 100rpx;
left: 40rpx;
z-index: 999;
}
.Navigation-name{
width: 50rpx;
height: 50rpx;
position: absolute;
top: 100rpx;
left: 300rpx;
z-index: 999;
height: 15%;
}

View File

@@ -1 +1 @@
<view class="Navigation-left data-v-40b33296"></view><view class="Navigation data-v-40b33296"><image src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Navigationimg.png" mode="scaleToFill" class="Navigationimg data-v-40b33296"/><view class="Return data-v-40b33296">消息</view></view><view class="tui-conversation data-v-40b33296" bindtap="{{g}}" bindtouchstart="{{h}}" bindtouchend="{{i}}"><t-u-i-search wx:if="{{a}}" class="data-v-40b33296" u-i="40b33296-0" bind:__l="__l" u-p="{{a}}"/><conversation-header wx:if="{{b}}" class="r data-v-40b33296" u-r="headerRef" u-i="40b33296-1" bind:__l="__l"/><conversation-network class="data-v-40b33296" u-i="40b33296-2" bind:__l="__l"/><conversation-list u-r="conversationListDomRef" class="tui-conversation-list r data-v-40b33296" bindhandleSwitchConversation="{{e}}" bindgetPassingRef="{{f}}" u-i="40b33296-3" bind:__l="__l"/></view><view class="data-v-40b33296"><tab-bar wx:if="{{j}}" class="data-v-40b33296" u-i="40b33296-4" bind:__l="__l" u-p="{{j}}"></tab-bar></view>
<view class="Navigation data-v-40b33296"><image src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Navigationimg.png" mode="scaleToFill" class="Navigationimg data-v-40b33296"/><view class="Return data-v-40b33296">消息</view></view><view class="tui-conversation data-v-40b33296" bindtap="{{g}}" bindtouchstart="{{h}}" bindtouchend="{{i}}"><t-u-i-search wx:if="{{a}}" class="data-v-40b33296" u-i="40b33296-0" bind:__l="__l" u-p="{{a}}"/><conversation-header wx:if="{{b}}" class="r data-v-40b33296" u-r="headerRef" u-i="40b33296-1" bind:__l="__l"/><conversation-network class="data-v-40b33296" u-i="40b33296-2" bind:__l="__l"/><conversation-list u-r="conversationListDomRef" class="tui-conversation-list r data-v-40b33296" bindhandleSwitchConversation="{{e}}" bindgetPassingRef="{{f}}" u-i="40b33296-3" bind:__l="__l"/></view><view class="data-v-40b33296"><tab-bar wx:if="{{j}}" class="data-v-40b33296" u-i="40b33296-4" bind:__l="__l" u-p="{{j}}"></tab-bar></view>

View File

@@ -172,60 +172,13 @@ input.data-v-04dfedea:focus, input.data-v-04dfedea:active, textarea.data-v-04dfe
width: 100%;
height: 15%;
}
.tui-chat{
width: 100%;
height: 15%;
}
.tui-chat-h5 {
width: 100%;
height: 100%;
}
.tui-chat-uniapp-header{
width: 100%;
height: 100%;
}
.Navigation {
width: 100%;
height: 10%;
.ChatHeadercss{
position: fixed;
top: 0;
left: 0;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
}
.Navigationimg {
width: 100%;
height: 200rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.Navigation {
width: 100%;
height: 200rpx;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
}
.Return {
width: 50rpx;
height: 50rpx;
position: absolute;
top: 100rpx;
left: 40rpx;
z-index: 999;
}
.Navigation-name{
width: 50rpx;
height: 50rpx;
position: absolute;
top: 100rpx;
left: 300rpx;
z-index: 999;
height: 15%;
}
/**

View File

@@ -33,24 +33,25 @@ const _sfc_main$4 = /* @__PURE__ */ common_vendor.defineComponent({
const counter = stores_counter.useCounterStore();
let myitem = common_vendor.ref();
let youritem = common_vendor.ref();
common_vendor.ref();
common_vendor.onLoad((options) => {
TUIKit_components_TUIChat_entryChatOnly.initChat(options);
myitem.value = JSON.parse(options.myitem);
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/index.vue:152", myitem.value);
youritem.value = JSON.parse(options.youritem);
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/index.vue:154", youritem.value);
counter.$patch({ youritem: youritem.value });
setTimeout(() => {
sendCustomMessage(myitem.value, youritem.value);
}, 1e3);
try {
myitem.value = JSON.parse(options.myitem);
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/index.vue:124", myitem.value);
youritem.value = JSON.parse(options.youritem);
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/index.vue:126", youritem.value);
counter.$patch({ youritem: youritem.value });
setTimeout(() => {
sendCustomMessage(myitem.value, youritem.value);
}, 1e3);
} catch (e) {
}
});
common_vendor.onUnload(() => {
TUIKit_components_TUIChat_entryChatOnly.logout(false).then(() => {
}).catch(() => {
});
});
const emits = __emit;
const groupID = common_vendor.ref(void 0);
const isGroup = common_vendor.ref(false);
const isNotInGroup = common_vendor.ref(false);
@@ -62,6 +63,7 @@ const _sfc_main$4 = /* @__PURE__ */ common_vendor.defineComponent({
const messageListRef = common_vendor.ref();
const headerExtensionList = common_vendor.ref([]);
const featureConfig = TUIKit_components_TUIChat_config.ChatConfig.getFeatureConfig();
common_vendor.ref("0px");
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversation: onCurrentConversationUpdate
@@ -101,7 +103,7 @@ const _sfc_main$4 = /* @__PURE__ */ common_vendor.defineComponent({
}).then((res) => {
var _a, _b, _c, _d, _e;
if (res.code === 200) {
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/index.vue:230", "发送成功", res.data);
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/index.vue:203", "发送成功", res.data);
const keyid = components_generateMsgId.generateMsgId();
const payload = {
data: JSON.stringify({
@@ -182,10 +184,6 @@ const _sfc_main$4 = /* @__PURE__ */ common_vendor.defineComponent({
const reset = () => {
common_vendor.Xt.switchConversation("");
};
const closeChat = (conversationID) => {
emits("closeChat", conversationID);
reset();
};
const insertEmoji = (emojiObj) => {
var _a;
(_a = messageInputRef.value) == null ? void 0 : _a.insertEmoji(emojiObj);
@@ -292,56 +290,48 @@ const _sfc_main$4 = /* @__PURE__ */ common_vendor.defineComponent({
} : {}, {
c: common_vendor.unref(currentConversationID)
}, common_vendor.unref(currentConversationID) ? common_vendor.e({
d: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-H5-header"),
e: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "tui-chat-uniapp-header"),
f: common_vendor.o$1(closeChat),
g: common_vendor.o$1(handleGroup),
h: common_vendor.p({
isGroup: common_vendor.unref(isGroup),
headerExtensionList: common_vendor.unref(headerExtensionList)
}),
i: common_vendor.o$1(toggleMultipleSelectMode),
j: common_vendor.sr(messageListRef, "04dfedea-2", {
d: common_vendor.o$1(toggleMultipleSelectMode),
e: common_vendor.sr(messageListRef, "04dfedea-2", {
"k": "messageListRef"
}),
k: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-h5-message-list"),
l: common_vendor.o$1(handleEditor),
m: common_vendor.o$1(() => changeToolbarDisplayType("none")),
n: common_vendor.o$1(toggleMultipleSelectMode),
o: common_vendor.p({
f: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-h5-message-list"),
g: common_vendor.o$1(handleEditor),
h: common_vendor.o$1(() => changeToolbarDisplayType("none")),
i: common_vendor.o$1(toggleMultipleSelectMode),
j: common_vendor.p({
isGroup: common_vendor.unref(isGroup),
groupID: common_vendor.unref(groupID),
isNotInGroup: common_vendor.unref(isNotInGroup),
isMultipleSelectMode: common_vendor.unref(isMultipleSelectMode)
}),
p: common_vendor.unref(isNotInGroup)
k: common_vendor.unref(isNotInGroup)
}, common_vendor.unref(isNotInGroup) ? {
q: common_vendor.t(common_vendor.unref(leaveGroupReasonText)),
r: common_vendor.unref(TUIKit_utils_env.isMobile) ? 1 : ""
l: common_vendor.t(common_vendor.unref(leaveGroupReasonText)),
m: common_vendor.unref(TUIKit_utils_env.isMobile) ? 1 : ""
} : common_vendor.unref(isMultipleSelectMode) ? {
t: common_vendor.o$1(oneByOneForwardMessage),
v: common_vendor.o$1(mergeForwardMessage),
w: common_vendor.o$1(toggleMultipleSelectMode)
o: common_vendor.o$1(oneByOneForwardMessage),
p: common_vendor.o$1(mergeForwardMessage),
q: common_vendor.o$1(toggleMultipleSelectMode)
} : common_vendor.e({
x: common_vendor.unref(isInputToolbarShow)
r: common_vendor.unref(isInputToolbarShow)
}, common_vendor.unref(isInputToolbarShow) ? {
y: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-h5-message-input-toolbar"),
z: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "tui-chat-uni-message-input-toolbar"),
A: common_vendor.o$1(insertEmoji),
B: common_vendor.o$1(changeToolbarDisplayType),
C: common_vendor.o$1(scrollToLatestMessage),
D: common_vendor.p({
s: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-h5-message-input-toolbar"),
t: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "tui-chat-uni-message-input-toolbar"),
v: common_vendor.o$1(insertEmoji),
w: common_vendor.o$1(changeToolbarDisplayType),
x: common_vendor.o$1(scrollToLatestMessage),
y: common_vendor.p({
displayType: common_vendor.unref(inputToolbarDisplayType)
})
} : {}, {
E: common_vendor.sr(messageInputRef, "04dfedea-5", {
z: common_vendor.sr(messageInputRef, "04dfedea-5", {
"k": "messageInputRef"
}),
F: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-h5-message-input"),
G: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "tui-chat-uni-message-input"),
H: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isWeChat) && "tui-chat-wx-message-input"),
I: common_vendor.o$1(changeToolbarDisplayType),
J: common_vendor.p({
A: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-h5-message-input"),
B: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "tui-chat-uni-message-input"),
C: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isWeChat) && "tui-chat-wx-message-input"),
D: common_vendor.o$1(changeToolbarDisplayType),
E: common_vendor.p({
enableAt: common_vendor.unref(featureConfig).InputMention,
isMuted: false,
muteText: common_vendor.unref(common_vendor.Wt).t("TUIChat.您已被管理员禁言"),
@@ -349,15 +339,15 @@ const _sfc_main$4 = /* @__PURE__ */ common_vendor.defineComponent({
inputToolbarDisplayType: common_vendor.unref(inputToolbarDisplayType)
})
}), {
s: common_vendor.unref(isMultipleSelectMode),
K: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-h5")
n: common_vendor.unref(isMultipleSelectMode),
F: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-h5")
}) : {}, {
L: !common_vendor.unref(isNotInGroup) && !common_vendor.unref(TUIKit_utils_env.isApp) && common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && common_vendor.unref(isGroup) && common_vendor.unref(headerExtensionList).length > 0
G: !common_vendor.unref(isNotInGroup) && !common_vendor.unref(TUIKit_utils_env.isApp) && common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && common_vendor.unref(isGroup) && common_vendor.unref(headerExtensionList).length > 0
}, !common_vendor.unref(isNotInGroup) && !common_vendor.unref(TUIKit_utils_env.isApp) && common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && common_vendor.unref(isGroup) && common_vendor.unref(headerExtensionList).length > 0 ? {
M: common_vendor.t(common_vendor.unref(headerExtensionList)[0].text),
N: common_vendor.o$1(handleGroup)
H: common_vendor.t(common_vendor.unref(headerExtensionList)[0].text),
I: common_vendor.o$1(handleGroup)
} : {}, {
O: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-h5")
J: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-chat-h5")
});
};
}