优化页面

This commit is contained in:
pengxiaolong
2025-06-09 19:18:38 +08:00
parent d30589fd05
commit c5042d08c3
811 changed files with 2799 additions and 503 deletions

View File

@@ -38,7 +38,9 @@ const _sfc_main$4 = /* @__PURE__ */ common_vendor.defineComponent({
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:147", myitem.value);
youritem.value = JSON.parse(options.youritem);
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/index.vue:149", youritem.value);
counter.$patch({ youritem: youritem.value });
setTimeout(() => {
sendCustomMessage(myitem.value, youritem.value);
@@ -79,50 +81,6 @@ const _sfc_main$4 = /* @__PURE__ */ common_vendor.defineComponent({
}
});
function sendCustomMessage(myitem2, youritem2) {
var _a, _b, _c, _d, _e;
const keyid = components_generateMsgId.generateMsgId();
const payload = {
data: JSON.stringify({
businessID: "pk",
keyid,
myitem: counter.myitem.id,
pkIdA: youritem2.id,
pkIdB: myitem2.id,
userIdA: youritem2.senderId,
userIdB: myitem2.senderId,
pkTime: youritem2.pkTime,
pkNumber: youritem2.pkNumber,
link: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/pk.png",
btnDisplay: true
}),
description: "邀请参加PK",
extension: "邀请参加PK"
};
const options = {
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
payload,
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
};
const offlinePushInfoCreateParams = {
conversation: currentConversation.value,
payload: options.payload,
messageType: common_vendor.qt.TYPES.MSG_CUSTOM
};
const sendMessageOptions = {
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
};
common_vendor.Qt.sendCustomMessage(options, sendMessageOptions).then((res) => {
components_request.request({
url: "chat/add",
method: "POST",
data: {
messageInfo: JSON.stringify(res.data.message),
keyId: keyid
},
userInfo: false
});
});
components_request.request({
url: "pk/createPkRecord",
method: "POST",
@@ -133,13 +91,73 @@ const _sfc_main$4 = /* @__PURE__ */ common_vendor.defineComponent({
userIdB: myitem2.senderId,
pkTime: youritem2.pkTime,
pkNumber: youritem2.pkNumber,
status: 0
anchorIdA: youritem2.anchorId,
anchorIdB: myitem2.anchorId,
anchorIconA: youritem2.anchorIcon,
anchorIconB: myitem2.anchorIcon,
piIdA: youritem2.id,
piIdB: myitem2.id
},
userInfo: false
userInfo: true
}).then((res) => {
var _a, _b, _c, _d, _e;
if (res.code === 200) {
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/index.vue:225", "发送成功", res.data);
const keyid = components_generateMsgId.generateMsgId();
const payload = {
data: JSON.stringify({
businessID: "pk",
keyid,
myitem: counter.myitem.id,
pkIdA: youritem2.id,
pkIdB: myitem2.id,
userIdA: youritem2.senderId,
userIdB: myitem2.senderId,
pkTime: youritem2.pkTime,
pkNumber: youritem2.pkNumber,
id: res.data.id,
link: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/pk.png",
btnDisplay: true
}),
description: "邀请参加PK",
extension: "邀请参加PK"
};
const options = {
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
payload,
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
};
const offlinePushInfoCreateParams = {
conversation: currentConversation.value,
payload: options.payload,
messageType: common_vendor.qt.TYPES.MSG_CUSTOM
};
const sendMessageOptions = {
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
};
common_vendor.Qt.sendCustomMessage(options, sendMessageOptions).then((res2) => {
components_request.request({
url: "chat/add",
method: "POST",
data: {
messageInfo: JSON.stringify(res2.data.message),
keyId: keyid
},
userInfo: true
});
});
myitem2.value = null;
youritem2.value = null;
currentConversation.value = null;
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none",
duration: 3e3
});
}
});
myitem2.value = null;
youritem2.value = null;
currentConversation.value = null;
}
const isInputToolbarShow = common_vendor.computed(() => {
return TUIKit_utils_env.isUniFrameWork ? inputToolbarDisplayType.value !== "none" : true;