From e8e496cf37f0d0c0d3fbb9bb53667eaebf714963 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 28 Feb 2022 10:26:48 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=A5=BD=E5=8F=8B?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B7=B1=EF=BC=8C=E4=BD=86=E6=98=AF=E8=BF=98?= =?UTF-8?q?=E8=A6=81=E6=8A=8A=E8=87=AA=E5=B7=B1=E7=9A=84=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=8A=A0=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) }, // 载入好友信息 From bf94cca5334d714e9b98b155f36df1a310216966 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 28 Feb 2022 12:15:11 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E9=94=AE=E7=9B=98=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=EF=BC=8C=E6=94=B9=E5=96=84=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=86=85=E5=AE=B9=E5=B0=91=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E6=8E=A8=E5=B1=8F=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E4=BD=86=E6=98=AF=E6=9C=89=E7=82=B9=E5=8D=A1=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/conversation/messageCell.vue | 2 +- pages/im/group/chat.vue | 25 ++++++-- pages/im/mixins/imBase.js | 3 + pages/im/private/chat.vue | 57 +++++++++++++------ utils/im/index.js | 3 +- 5 files changed, 67 insertions(+), 23 deletions(-) diff --git a/pages/im/components/conversation/messageCell.vue b/pages/im/components/conversation/messageCell.vue index 25b78a5..7041980 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/pages/im/group/chat.vue b/pages/im/group/chat.vue index 9f1a5c1..62c8741 100644 --- a/pages/im/group/chat.vue +++ b/pages/im/group/chat.vue @@ -1,6 +1,6 @@