diff --git a/.gitignore b/.gitignore index 030d602..83c9b1b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ **/im-message-store/target **/im-tcp/target -**/node_modules/** \ No newline at end of file +**/node_modules/** +hs-im-server/.vs/ diff --git a/hs-im-server/im-tcp/src/main/resources/web.html b/hs-im-server/im-tcp/src/main/resources/web.html index 941521a..8c86711 100644 --- a/hs-im-server/im-tcp/src/main/resources/web.html +++ b/hs-im-server/im-tcp/src/main/resources/web.html @@ -410,7 +410,7 @@ //如果浏览器支持WebSocket if (window.WebSocket) { //参数就是与服务器连接的地址 - socket = new WebSocket("ws://localhost:19000/ws"); + socket = new WebSocket("ws://192.168.1.117:19000/ws"); //客户端收到服务器消息的时候就会执行这个回调方法 socket.onmessage = function (event) { diff --git a/im-uniapp/common/config.js b/im-uniapp/common/config.js index 360bb27..3fb783e 100644 --- a/im-uniapp/common/config.js +++ b/im-uniapp/common/config.js @@ -1,6 +1,9 @@ export default class config{ + static getBaseApiUrl(){ + return process.env.NODE_ENV === 'development' ? 'http://192.168.1.117:8989' :'http://www.shudong.xyz/shudong_api/'; + } static getImApiUrl(){ - return process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:28000/v1' :'http://www.shudong.xyz/shudong_api/'; + return process.env.NODE_ENV === 'development' ? 'http://192.168.1.117:28000/v1' :'http://www.shudong.xyz/shudong_api/'; } static getImAppId(){ return 10000; diff --git a/im-uniapp/common/request.js b/im-uniapp/common/request.js index e2cf242..46b1892 100644 --- a/im-uniapp/common/request.js +++ b/im-uniapp/common/request.js @@ -1,6 +1,7 @@ // #ifdef APP-PLUS import appUpgrade from '@/common/appUpgrade.js'; // #endif +import config from "@/common/config.js" let http = { 'setBaseUrl': (url) => { if (url.charAt(url.length - 1) === "/") { @@ -289,6 +290,6 @@ function downloadFile(con) { // } // }); // 地址及配置 -http.setBaseUrl("http://localhost:8989"); //在线服务器 +http.setBaseUrl(config.getBaseApiUrl()); //在线服务器 // http.setBaseUrl("http://192.168.0.105:8080"); //离线服务器 export default http diff --git a/im-uniapp/wx/tabbar2/index.vue b/im-uniapp/wx/tabbar2/index.vue index c5d1bd8..e04030b 100644 --- a/im-uniapp/wx/tabbar2/index.vue +++ b/im-uniapp/wx/tabbar2/index.vue @@ -52,6 +52,12 @@ userId:"18200000001", userType:"item.userType", chatNo:"item.chatNo" + },{ + name:"测试lld3", + avatar:"item.portrait", + userId:"lld3", + userType:"item.userType", + chatNo:"item.chatNo" } ]