修复 私聊聊天 头像不正确的bug
This commit is contained in:
parent
0fa8e522b1
commit
0084fe8aa1
|
@ -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">
|
||||
<!-- 昵称 -->
|
||||
|
|
Loading…
Reference in New Issue