优化页面
This commit is contained in:
@@ -70,14 +70,16 @@
|
||||
<NewAddedPk class="createModule" ref="createModule"></NewAddedPk>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
<script>
|
||||
import formatDate from "../../components/formatDate.js";
|
||||
import TimeFormatting from "../../components/TimeFormatting.js";
|
||||
// import VerifyLogin from "../../components/VerifyLogin.js";
|
||||
import NewAddedPk from "../../pages/NewAddedPk/NewAddedPk.vue";
|
||||
import request from "../../components/request.js";
|
||||
import { isEnabledMessageReadReceiptGlobal } from "../../TUIKit/components/TUIChat/utils/utils.js";
|
||||
import OfflinePushInfoManager from "../../TUIKit/components/TUIChat/offlinePushInfoManager/index.js";
|
||||
// // import { isEnabledMessageReadReceiptGlobal } from "../../TUIKit/components/TUIChat/utils/utils.js";
|
||||
// const isEnabledMessageReadReceiptGlobal = require('../../TUIKit/components/TUIChat/utils/utils.js');
|
||||
// // import OfflinePushInfoManager from "../../TUIKit/components/TUIChat/offlinePushInfoManager/index.js";
|
||||
// const OfflinePushInfoManager = require('../../TUIKit/components/TUIChat/offlinePushInfoManager/index.js');
|
||||
import TUIChatEngine, {
|
||||
TUIStore,
|
||||
StoreName,
|
||||
@@ -142,46 +144,21 @@ export default {
|
||||
this.userlist();
|
||||
},
|
||||
invite() {
|
||||
if (this.item.pkTime !== this.list[this.InvitingPartyEventindex].pkTime) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "请保持时间一致",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// if (this.item.pkTime !== this.list[this.InvitingPartyEventindex].pkTime) {
|
||||
// uni.showToast({
|
||||
// icon: "none",
|
||||
// title: "请保持时间一致",
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// 发送邀请消息
|
||||
const payload = {
|
||||
data: JSON.stringify({
|
||||
businessID: "pk",
|
||||
title: "PK邀请",
|
||||
buttonText1: "接受邀请",
|
||||
buttonText2: "拒绝邀请",
|
||||
}),
|
||||
description: "邀请参加PK",
|
||||
extension: "邀请参加PK",
|
||||
};
|
||||
|
||||
TUIStore.watch(StoreName.CONV, {
|
||||
currentConversation: (conversation) => {
|
||||
this.currentConversation = conversation;
|
||||
},
|
||||
const conversationID = `C2C${this.item.senderId}`;
|
||||
const myitem = JSON.stringify(this.list[this.InvitingPartyEventindex]);
|
||||
const youritem = JSON.stringify(this.item);
|
||||
uni.redirectTo({
|
||||
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}&myitem=${myitem}&youritem=${youritem}`,
|
||||
});
|
||||
const options = {
|
||||
to: `C2C${this.list[this.InvitingPartyEventindex].senderId}`,
|
||||
conversationType: this.currentConversation?.value?.type,
|
||||
payload,
|
||||
needReadReceipt:isEnabledMessageReadReceiptGlobal(),
|
||||
};
|
||||
|
||||
const offlinePushInfoCreateParams = {
|
||||
conversation: this.currentConversation,
|
||||
payload: options.payload,
|
||||
messageType: TUIChatEngine.TYPES.MSG_CUSTOM,
|
||||
};
|
||||
const sendMessageOptions = {
|
||||
offlinePushInfo: OfflinePushInfoManager.create(offlinePushInfoCreateParams),
|
||||
};
|
||||
TUIChatService.sendCustomMessage(options, sendMessageOptions);
|
||||
/////////
|
||||
},
|
||||
close() {
|
||||
|
||||
Reference in New Issue
Block a user