From 9adc57750e63498c52562a4eaaebcb9f2aa69f94 Mon Sep 17 00:00:00 2001 From: xsx <825657193@qq.com> Date: Sun, 16 Jun 2024 15:07:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=9A=E4=BA=BA=E9=9F=B3=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group-rtc-join/group-rtc-join.vue | 89 +++++++++++++++++++ im-uniapp/store/chatStore.js | 2 - im-uniapp/store/configStore.js | 32 +++++++ 3 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 im-uniapp/components/group-rtc-join/group-rtc-join.vue create mode 100644 im-uniapp/store/configStore.js diff --git a/im-uniapp/components/group-rtc-join/group-rtc-join.vue b/im-uniapp/components/group-rtc-join/group-rtc-join.vue new file mode 100644 index 0000000..0c0081f --- /dev/null +++ b/im-uniapp/components/group-rtc-join/group-rtc-join.vue @@ -0,0 +1,89 @@ + + + + + \ No newline at end of file diff --git a/im-uniapp/store/chatStore.js b/im-uniapp/store/chatStore.js index 75950af..5356df3 100644 --- a/im-uniapp/store/chatStore.js +++ b/im-uniapp/store/chatStore.js @@ -51,7 +51,6 @@ export default { } }) }) - console.log(cacheChats.length) }, openChat(state, chatInfo) { let chats = this.getters.findChats(); @@ -295,7 +294,6 @@ export default { }); // 将消息一次性装载回来 state.chats = cacheChats; - console.log(cacheChats.length) this.commit("saveToStorage"); }, saveToStorage(state) { diff --git a/im-uniapp/store/configStore.js b/im-uniapp/store/configStore.js new file mode 100644 index 0000000..ba289c2 --- /dev/null +++ b/im-uniapp/store/configStore.js @@ -0,0 +1,32 @@ +import http from '../common/request' + +export default { + state: { + webrtc: {} + }, + mutations: { + setConfig(state, config) { + state.webrtc = config.webrtc; + }, + clear(state){ + state.webrtc = {}; + } + }, + actions:{ + loadConfig(context){ + return new Promise((resolve, reject) => { + http({ + url: '/system/config', + method: 'GET' + }).then((config) => { + console.log("系统配置",config) + context.commit("setConfig",config); + resolve(); + }).catch((res)=>{ + reject(res); + }); + }) + } + } + +} \ No newline at end of file