From e8e496cf37f0d0c0d3fbb9bb53667eaebf714963 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 28 Feb 2022 10:26:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=A5=BD=E5=8F=8B=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E6=8E=92=E9=99=A4?= =?UTF-8?q?=E8=87=AA=E5=B7=B1=EF=BC=8C=E4=BD=86=E6=98=AF=E8=BF=98=E8=A6=81?= =?UTF-8?q?=E6=8A=8A=E8=87=AA=E5=B7=B1=E7=9A=84=E4=BF=A1=E6=81=AF=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=88=B0=E5=86=85=E5=AD=98=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 2 +- manifest.json | 2 +- pages/im/components/conversation/messageCell.vue | 2 +- store/modules/im.js | 10 +++++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 5b16def..cb91b00 100644 --- a/main.js +++ b/main.js @@ -40,7 +40,7 @@ usqlite.connect({ fail: () => { contactModel.create((err, res) => { console.error('SQLITE 创建表格', err, res) - uni.setStorageSync('FIRST_RUN', 'X') + uni.setStorageSync('FIRST_RUN', true) }) } }) diff --git a/manifest.json b/manifest.json index 28d6cdf..3153cbb 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name" : "ZH-HEALTH", "appid" : "__UNI__C29473D", "description" : "ZH-HEALTH,您手上的健康管理专家", - "versionName" : "1.0.20", + "versionName" : "1.0.21", "versionCode" : 100, "transformPx" : false, /* 5+App特有相关 */ diff --git a/pages/im/components/conversation/messageCell.vue b/pages/im/components/conversation/messageCell.vue index 7041980..25b78a5 100644 --- a/pages/im/components/conversation/messageCell.vue +++ b/pages/im/components/conversation/messageCell.vue @@ -8,7 +8,7 @@ {{ contact(item.targetId).name }} - [群] + {{ item.sentTime|timeCustomCN }} diff --git a/store/modules/im.js b/store/modules/im.js index 01e2b92..fadf352 100644 --- a/store/modules/im.js +++ b/store/modules/im.js @@ -6,7 +6,7 @@ import { export default { state: { contacts: {}, - myInfo: {} + myInfo: {} }, getters: { contacts(state) { @@ -41,6 +41,7 @@ export default { updateContactInfo(state, contactInfo) { Vue.set(state.contacts, contactInfo.targetId, contactInfo) }, + // 设置我的资料 setSenderInfo(state, contactInfo) { state.myInfo = { userId: contactInfo.targetId, @@ -69,8 +70,11 @@ export default { }) }, setSenderInfo({ - commit - }, contactInfo) { + commit, + dispatch + }, contactInfo) { + contactInfo.type = 0 // type 更改为0,标记是我自己 + dispatch('updateContact', contactInfo) commit('setSenderInfo', contactInfo) }, // 载入好友信息