优化页面

This commit is contained in:
pengxiaolong
2025-05-30 22:04:45 +08:00
parent c747f9625c
commit 050ceedd59
66 changed files with 1215 additions and 190 deletions

View File

@@ -8,6 +8,8 @@ const TUIKit_components_TUIChat_entryChatOnly = require("./TUIChat/entry-chat-on
const TUIKit_components_TUIChat_utils_utils = require("./TUIChat/utils/utils.js");
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("./TUIChat/offlinePushInfoManager/index.js");
const stores_counter = require("../../stores/counter.js");
const components_request = require("../../components/request.js");
const components_generateMsgId = require("../../components/generateMsgId.js");
const TUIKit_components_TUIChat_server = require("./TUIChat/server.js");
const TUIKit_components_TUIConversation_server = require("./TUIConversation/server.js");
const TUIKit_components_TUISearch_searchTypeList = require("./TUISearch/search-type-list.js");
@@ -32,17 +34,15 @@ 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);
if (options.myitem) {
myitem.value = JSON.parse(options.myitem);
counter.$patch({ myitem: myitem.value });
youritem.value = JSON.parse(options.youritem);
counter.$patch({ youritem: youritem.value });
setTimeout(() => {
sendCustomMessage(myitem, youritem);
}, 1e3);
}
myitem.value = JSON.parse(options.myitem);
youritem.value = JSON.parse(options.youritem);
counter.$patch({ youritem: youritem.value });
setTimeout(() => {
sendCustomMessage(myitem.value, youritem.value);
}, 1e3);
});
common_vendor.onUnload(() => {
TUIKit_components_TUIChat_entryChatOnly.logout(false).then(() => {
@@ -80,12 +80,17 @@ 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",
title: "PK邀请",
buttonText1: "接受邀请",
buttonText2: "拒绝邀请"
buttonText2: "拒绝邀请",
keyid,
myitem: counter.myitem.id,
btnDisplay: true,
mytitle: "等待对方接受邀请"
}),
description: "邀请参加PK",
extension: "邀请参加PK"
@@ -104,9 +109,29 @@ const _sfc_main$4 = /* @__PURE__ */ common_vendor.defineComponent({
const sendMessageOptions = {
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
};
common_vendor.Qt.sendCustomMessage(options, sendMessageOptions);
common_vendor.Qt.getMessageList().then((res) => {
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/index.vue:232", "消息列表···································", res);
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",
data: {
pkIdA: youritem2.id,
pkIdB: myitem2.id,
userIdA: youritem2.senderId,
userIdB: myitem2.senderId,
pkTime: youritem2.pkTime,
status: 0
},
userInfo: false
});
myitem2.value = null;
youritem2.value = null;