fix(消息头像): 修复消息列表中接收者头像显示问题
This commit is contained in:
parent
f043ee6fa3
commit
28c617a33d
12
App.vue
12
App.vue
|
|
@ -230,9 +230,10 @@ export default {
|
|||
receiverId: data.ReceiverId,
|
||||
sendDate: data.SendDate,
|
||||
message: data.Message,
|
||||
sendUserType: 2,
|
||||
sendUserType: data.SendUserType, // 0 AI 1 学生 2 教师 3 提示
|
||||
};
|
||||
const id = data.Id || data.id || Math.random().toString(36).substring(2);
|
||||
const id =
|
||||
data.Id || data.id || Math.random().toString(36).substring(2);
|
||||
const msg = {
|
||||
...processData,
|
||||
messageType: 0,
|
||||
|
|
@ -403,9 +404,10 @@ uni-page-body {
|
|||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
|
||||
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||
"Microsoft Yahei", sans-serif;
|
||||
font-family:
|
||||
-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
|
||||
"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Microsoft Yahei",
|
||||
sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
// max-width: 1536rpx;
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@
|
|||
</view>
|
||||
<image
|
||||
class="user-avatar"
|
||||
:src="headSculptureUrl"
|
||||
:src="$getHeadImgUrl(vuex_user.HeadSculptureUrl)"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
|
|
@ -375,7 +375,7 @@
|
|||
<view class="message-content-container-Teacher">
|
||||
<image
|
||||
class="ai-avatar"
|
||||
:src="receiverHeadSculptureUrl"
|
||||
:src="getReceiverHeadSculptureUrl(message)"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<view
|
||||
|
|
@ -640,12 +640,6 @@ export default {
|
|||
},
|
||||
|
||||
computed: {
|
||||
headSculptureUrl() {
|
||||
return this.$getHeadImgUrl(this.vuex_user.HeadSculptureUrl);
|
||||
},
|
||||
receiverHeadSculptureUrl() {
|
||||
return this.$getHeadImgUrl(this.vuex_msgUser.headSculptureUrl);
|
||||
},
|
||||
aiMessageGroups() {
|
||||
return Array.isArray(this.vuex_aiMessageGroups)
|
||||
? this.vuex_aiMessageGroups
|
||||
|
|
@ -711,6 +705,11 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
// 获取消息头像
|
||||
getReceiverHeadSculptureUrl(message) {
|
||||
return this.$getHeadImgUrl(message.headSculptureUrl);
|
||||
},
|
||||
|
||||
async handleLeftClick() {
|
||||
await this.getChatHistoryList();
|
||||
await this.GetDialogueList_User();
|
||||
|
|
|
|||
Loading…
Reference in New Issue