fix:im表情显示修复,删除用户中心已完成红点

This commit is contained in:
lihaoyuan 2025-09-18 17:53:55 +08:00
parent 4391347b87
commit fedecba65c
3 changed files with 48 additions and 35 deletions

View File

@ -51,12 +51,10 @@
<view class="left">
<!-- 文字消息 -->
<view v-if="row.msg.type == 'text'" class="bubble">
<u-parse
:content="row.msg.content.text + ''"
@navigate="navigate"
:imageProp="{ lazyLoad: true }"
<rich-text
:nodes="row.msg.content.text + ''"
class="white"
></u-parse>
></rich-text>
</view>
<!-- 语言消息 -->
<view
@ -179,12 +177,12 @@
</view>
<!-- 文字消息 -->
<view v-if="row.msg.type == 'text'" class="bubble">
<u-parse
:content="row.msg.content.text + ''"
@navigate="navigate"
:imageProp="{ lazyLoad: true }"
></u-parse> </view
><br />
<rich-text
:nodes="row.msg.content.text + ''"
class="white"
></rich-text>
</view>
<br />
<view
v-if="false && row.msg.type == 'text'"
@click="translate(row.msg.content.text, index)"
@ -814,6 +812,7 @@ export default {
let that = this;
this.emojiList = emojiData.imgArr[1].emojiList;
this.emojiPath = emojiData.imgArr[1].emojiPath;
/*that.$Socket.listenlist[this.chattype+this.chat_to_puid]=true;
if(that.$Socket.listenlist[this.chattype+this.chat_to_puid]){
@ -958,6 +957,7 @@ export default {
screenMsg(msg) {
console.info("screenMsg");
console.log("收到消息原始内容:", msg.msg.content.text); //
console.info(msg);
//
@ -1445,6 +1445,7 @@ export default {
},
//
sendBigEmoji(url) {
console.log("发送表情,图片路径:", this.emojiPath + url);
this.hideDrawer(); //
if (!url) {
return;
@ -1487,32 +1488,22 @@ export default {
this.sendMsg(msg, "text");
this.textMsg = ""; //
},
//
replaceEmoji(str) {
//
let replacedStr = str.replace(/\[([^(\]|\[)]*)\]/g, (item, index) => {
// console.log("item: " + item);
console.log("匹配到的表情符号:", item);
for (let i = 0; i < this.emojiList.length; i++) {
let row = this.emojiList[i];
for (let j = 0; j < row.length; j++) {
let EM = row[j];
if (EM.alt == item) {
//线使
//100.gifhttps://www.xxx.com/emoji/100.gif onlinePathhttps://www.xxx.com/emoji/
// let onlinePath = 'https://s2.ax1x.com/2019/04/12/'
// let imgstr = '<image src="'+onlinePath+this.onlineEmoji[EM.url]+'">';
// 线使
let onlinePath = this.emojiPath;
let imgstr =
'<img style="width:24px;height:24px;" src="' +
onlinePath +
EM.url +
'">';
// console.log("imgstr: " + imgstr);
let imgstr = `<img style="width:24px;height:24px;" src="${onlinePath}${EM.url}">`;
return imgstr;
}
}
}
return item;
});
return replacedStr;
},
@ -1523,7 +1514,10 @@ export default {
console.info(content.text);
console.info(type);
console.info(needload);
if (type === "text" && content.text) {
// <div> rich-text
content.text = `<div style="word-wrap: break-word;">${content.text}</div>`;
}
let message_id = 1001;
var mine = {
username: this.userInfo.user_nickname,
@ -1660,6 +1654,7 @@ export default {
addTextMsg(msg) {
console.info("addTextMsg");
console.info(msg);
msg.msg.content.text = this.replaceEmoji(msg.msg.content.text);
this.msgList.push(msg);
},
//
@ -1991,4 +1986,27 @@ export default {
height: 90%;
}
}
</style>
//
.bubble {
padding: 12rpx 16rpx !important;
background-color: #ffffff !important;
.white {
color: #333333 !important;
opacity: 1 !important;
visibility: visible !important;
font-size: 32rpx !important;
line-height: 1.5 !important;
word-wrap: break-word !important;
white-space: normal !important;
}
}
rich-text {
display: inline-block !important;
min-width: 20rpx !important;
vertical-align: middle !important;
}
</style>

View File

@ -87,7 +87,8 @@
"NSMicrophoneUsageDescription" : "此APP会在使用声音识别服务中使用您的麦克风权限",
"NSLocationAlwaysUsageDescription" : "此App会在使用导航服务中使用您的定位权限",
"NSLocationWhenInUseUsageDescription" : "此App会在使用导航服务中使用您的定位权限"
}
},
"dSYMs" : false
},
/* ios */
"sdkConfigs" : {
@ -138,7 +139,7 @@
},
"icons" : {
"ios" : {
"appstore" : "unpackage/icon.png",
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",

View File

@ -468,12 +468,6 @@
url="/member/order/list?type=2060&sl=4"
class="m-cell m-cell-access"
>
<uni-badge
v-if="orders.fin_num_entity > 0"
:text="orders.fin_num_entity"
type="red"
class="badge"
></uni-badge>
<view class="m-cell-hd" style="color: #f30213">
<label class="iconfont zc zc-yiwancheng"></label>
</view>