diff --git a/main.js b/main.js index 3358354..28f5174 100644 --- a/main.js +++ b/main.js @@ -13,12 +13,14 @@ uni.$http = $http; // 请求的根路径 // #ifdef H5 -$http.baseUrl = 'https://www.sanduolantoyoga.com/yoga' +// $http.baseUrl = 'https://www.sanduolantoyoga.com/yoga' +$http.baseUrl = 'https://yoga.runpengsoft.com/yoga' // $http.baseUrl = 'http://192.168.13.9:8083' // #endif //#ifdef APP-PLUS -$http.baseUrl = 'https://www.sanduolantoyoga.com/yoga' +// $http.baseUrl = 'https://www.sanduolantoyoga.com/yoga' +$http.baseUrl = 'https://yoga.runpengsoft.com/yoga' // $http.baseUrl = 'http://192.168.13.9:8083' //#endif @@ -26,12 +28,14 @@ $http.baseUrl = 'https://www.sanduolantoyoga.com/yoga' // WebSocket 地址(可根据平台条件编译) // #ifdef H5 // Vue.prototype.$wsUrl = 'ws://192.168.13.9:8528/im' // 开发环境 -Vue.prototype.$wsUrl = 'wss://www.sanduolantoyoga.com/yoga-imserver' // 生产环境 +// Vue.prototype.$wsUrl = 'wss://www.sanduolantoyoga.com/yoga-imserver' // 生产环境 +Vue.prototype.$wsUrl = 'wss://www.sanduolantoyoga.com/yoga-imserver/' // 生产环境 // #endif // #ifdef APP-PLUS // Vue.prototype.$wsUrl = 'ws://192.168.13.9:8528/im' // 开发环境 -Vue.prototype.$wsUrl = 'wss://www.sanduolantoyoga.com/yoga-imserver' // 生产环境 +// Vue.prototype.$wsUrl = 'wss://www.sanduolantoyoga.com/yoga-imserver' // 生产环境 +Vue.prototype.$wsUrl = 'wss://yoga.runpengsoft.com/yoga-imserver/' // 生产环境 // #endif // 请求开始之前做一些事情 diff --git a/store/chatStore.js b/store/chatStore.js index a1619db..7775637 100644 --- a/store/chatStore.js +++ b/store/chatStore.js @@ -516,7 +516,7 @@ const chatModule = { if (msgInfo.id && msgInfo.id > 0) { for (let i = 0; i < chat.messages.length; i++) { const m = chat.messages[i]; - if (m.id && msgInfo.id < m.id) { + if (m.id && Number(msgInfo.id) < Number(m.id)) { insertPos = i; console.log(`消息乱序修正: ${chat.messages.length} -> ${insertPos}`); break; @@ -530,6 +530,7 @@ const chatModule = { // 标记已存储为 false(已在 mutation 中完成) // 保存到本地 dispatch('saveToStorage', { withColdMessage: false }); + }, // ========== 更新消息 ==========