优化页面
This commit is contained in:
@@ -63,20 +63,12 @@
|
||||
</template>
|
||||
<!-- `························································标记······················································ -->
|
||||
<template v-else-if="customData.businessID === CHAT_MSG_CUSTOM_TYPE.PK">
|
||||
<div class="pk" v-if="customData.myitem !== counter.myitem.id">
|
||||
<h1>{{ customData.title }}</h1>
|
||||
<div class="button-group" v-if="customData.btnDisplay === true">
|
||||
<button @click="handleAccept(status.agree, customData)" class="buttonAccept">
|
||||
{{ customData.buttonText1 }}
|
||||
</button>
|
||||
<button @click="handleAccept(status.refuse, customData)" class="buttonRefuse">
|
||||
{{ customData.buttonText2 }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pk" v-else>
|
||||
<h1>{{ customData.mytitle }}</h1>
|
||||
<div class="pk" @click="handleAccept(customData)">
|
||||
<image
|
||||
class="Custommessageimage"
|
||||
:src="customData.link"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<!-- ``````````````````````````````````````````````````````````````````````````````````````````````````````````````` -->
|
||||
@@ -104,27 +96,22 @@ import TUIChatEngine, {
|
||||
import { useCounterStore } from "@/stores/counter";
|
||||
import request from "@/components/request";
|
||||
import { Message } from "@tencentcloud/chat";
|
||||
import TencentCloudChat from "@tencentcloud/chat";
|
||||
// import message from '@tencentcloud/chat-uikit-uniapp/locales/en/message';
|
||||
const counter = useCounterStore();
|
||||
|
||||
const status = { agree: 1, refuse: 2 };
|
||||
|
||||
interface Props {
|
||||
messageItem: IMessageModel;
|
||||
content: any;
|
||||
}
|
||||
//```````````````````````````````````````````````````
|
||||
//```````````````````````````````````````````````````标记
|
||||
|
||||
|
||||
function handleAccept(status: number, customData: ICustomMessagePayload) {
|
||||
console.log(custom.value);
|
||||
console.log(message.value);
|
||||
message.value.payload.title = "Hello Tencent";
|
||||
TUIChatService.modifyMessage(message.value).then((res) => {
|
||||
console.log(res);
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
function handleAccept(customData: ICustomMessagePayload) {
|
||||
const customDatainfo = JSON.stringify(customData);
|
||||
uni.redirectTo({
|
||||
url: `/pages/PKMessageprocessing/PKMessageprocessing?customData=${customDatainfo}`,
|
||||
});
|
||||
}
|
||||
//```````````````````````````````````````````````````
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@@ -226,7 +213,7 @@ a {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
background-color: #f5f5f5;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
@@ -270,4 +257,8 @@ a {
|
||||
}
|
||||
//``````````````````````````````````````````````````````````````````````````````````
|
||||
}
|
||||
.Custommessageimage{
|
||||
width: 385rpx;
|
||||
height: 195rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user