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,
|
receiverId: data.ReceiverId,
|
||||||
sendDate: data.SendDate,
|
sendDate: data.SendDate,
|
||||||
message: data.Message,
|
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 = {
|
const msg = {
|
||||||
...processData,
|
...processData,
|
||||||
messageType: 0,
|
messageType: 0,
|
||||||
|
|
@ -403,9 +404,10 @@ uni-page-body {
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
|
font-family:
|
||||||
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
|
||||||
"Microsoft Yahei", sans-serif;
|
"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Microsoft Yahei",
|
||||||
|
sans-serif;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
// max-width: 1536rpx;
|
// max-width: 1536rpx;
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
class="user-avatar"
|
class="user-avatar"
|
||||||
:src="headSculptureUrl"
|
:src="$getHeadImgUrl(vuex_user.HeadSculptureUrl)"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -375,7 +375,7 @@
|
||||||
<view class="message-content-container-Teacher">
|
<view class="message-content-container-Teacher">
|
||||||
<image
|
<image
|
||||||
class="ai-avatar"
|
class="ai-avatar"
|
||||||
:src="receiverHeadSculptureUrl"
|
:src="getReceiverHeadSculptureUrl(message)"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
|
|
@ -640,12 +640,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
headSculptureUrl() {
|
|
||||||
return this.$getHeadImgUrl(this.vuex_user.HeadSculptureUrl);
|
|
||||||
},
|
|
||||||
receiverHeadSculptureUrl() {
|
|
||||||
return this.$getHeadImgUrl(this.vuex_msgUser.headSculptureUrl);
|
|
||||||
},
|
|
||||||
aiMessageGroups() {
|
aiMessageGroups() {
|
||||||
return Array.isArray(this.vuex_aiMessageGroups)
|
return Array.isArray(this.vuex_aiMessageGroups)
|
||||||
? this.vuex_aiMessageGroups
|
? this.vuex_aiMessageGroups
|
||||||
|
|
@ -711,6 +705,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取消息头像
|
||||||
|
getReceiverHeadSculptureUrl(message) {
|
||||||
|
return this.$getHeadImgUrl(message.headSculptureUrl);
|
||||||
|
},
|
||||||
|
|
||||||
async handleLeftClick() {
|
async handleLeftClick() {
|
||||||
await this.getChatHistoryList();
|
await this.getChatHistoryList();
|
||||||
await this.GetDialogueList_User();
|
await this.GetDialogueList_User();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue