修复 私聊聊天 头像不正确的bug

This commit is contained in:
sx 2025-02-18 15:02:33 +08:00
parent 0fa8e522b1
commit 0084fe8aa1
1 changed files with 557 additions and 550 deletions

View File

@ -207,6 +207,8 @@ function getHistory(param = {}) {
if (res.code === 200) {
//
const result = res.data
//
list.faceUrl = result.faceUrl
//
if (param.limit == 1) {
@ -464,13 +466,18 @@ function onScreenChange(ev) {
<!-- 普通消息 -->
<view class="message"
:class="[(item.From_Account || item.fromId) == userinfo.id ? 'self' : 'friend']">
<template v-if="msg.type == 'C2C'">
<!-- 如果是我自己 -->
<view v-if="msg.type == 'C2C'">
<template v-if="(item.From_Account || item.fromId) == userinfo.id">
<image :src="userinfo.avatar" class="avatar wh80" mode="aspectFill" />
</template>
<template v-else>
<image :src="list.faceUrl" class="avatar wh80" mode="aspectFill" />
</view>
<view v-else>
</template>
</template>
<template v-else>
<image :src="item.fromFaceUrl" class="avatar wh80" mode="aspectFill" />
</view>
</template>
<view class="df fdc mlr20">
<!-- 昵称 -->