diff --git a/pages/chat/index.vue b/pages/chat/index.vue index 6fac02a..e0f39f6 100644 --- a/pages/chat/index.vue +++ b/pages/chat/index.vue @@ -179,6 +179,8 @@ export default { onLoad(options) { console.log(this.vuex_msgList); + console.log(this.vuex_msgUser,'this.vuex_msgUser'); + this.baseUrl = this.$u.http.config.baseUrl; @@ -197,7 +199,7 @@ export default { return this.baseUrl + "/" + this.vuex_msgUser.receiverHeadSculptureUrl; } - return "/static/common/images/avatar_default.jpg"; + return "/static/common/images/avatar_default2.png"; }, headSculptureUrl() { diff --git a/static/common/images/avatar_default2.png b/static/common/images/avatar_default2.png new file mode 100644 index 0000000..b3db991 Binary files /dev/null and b/static/common/images/avatar_default2.png differ diff --git a/store/index.js b/store/index.js index 417e216..cab4120 100644 --- a/store/index.js +++ b/store/index.js @@ -282,18 +282,16 @@ const store = new Vuex.Store({ (i) => i && (i.receiverId === friendId || i.friendId === friendId) ); if (target) { - // 获取消息接收方用户信息 + commit("set_MsgUser", target); + Vue.prototype.$u.api .GetReceiverUserInfoApi({ Id: friendId }) .then((res) => { if (res.succeed && res.data) { commit("set_MsgUser", { ...target, ...res.data }); - } else { - commit("set_MsgUser", target); } }); - // 跳转到对话页,参数按需调整 uni.navigateTo({ url: `/pages/chat/index`, });