Browse Source

feat:兼容安卓和ios

master
xsx 2 years ago
parent
commit
fd49e001ac
  1. 8
      im-ui/src/view/Login.vue
  2. 17
      im-uniapp/.env.js
  3. 36
      im-uniapp/package.json

8
im-ui/src/view/Login.vue

@ -26,6 +26,14 @@
<li>群聊会话窗口增加邀请退群移除解散提示</li> <li>群聊会话窗口增加邀请退群移除解散提示</li>
</ul> </ul>
</div> </div>
<div>
<h3>最近更新(2024-02-24)</h3>
<ul>
<li>uniapp端兼容ios和andriod,
<a href="https://www.boxim.online/download/boxim.apk" target="_blank">点击下载安卓客户端</a>
</li>
</ul>
</div>
<div> <div>
<h3>项目依旧完全开源可内网部署如果项目对您有帮助,请帮忙点个star:</h3> <h3>项目依旧完全开源可内网部署如果项目对您有帮助,请帮忙点个star:</h3>
</div> </div>

17
im-uniapp/.env.js

@ -1,23 +1,16 @@
//设置环境(打包前修改此变量) //设置环境(打包前修改此变量)
const ENV = "PROD"; const ENV = "DEV";
const UNI_APP = {}
const UNI_APP = {
}
if(ENV=="DEV"){ if(ENV=="DEV"){
// 开发环境 UNI_APP.BASE_URL = "http://127.0.0.1:8888";
UNI_APP.BASE_URL = "http://192.168.2.67:8888"; UNI_APP.WS_URL = "ws://127.0.0.1:8878/im";
UNI_APP.WS_URL = "ws://192.168.2.67:8878/im"; // H5 走本地代理解决跨域问题
// H5 走本地代理避免跨域问题
// #ifdef H5 // #ifdef H5
UNI_APP.BASE_URL = "/api"; UNI_APP.BASE_URL = "/api";
// #endif // #endif
} }
if(ENV=="PROD"){ if(ENV=="PROD"){
// 生产环境
UNI_APP.BASE_URL = "https://www.boxim.online/api"; UNI_APP.BASE_URL = "https://www.boxim.online/api";
UNI_APP.WS_URL = "wss://www.boxim.online:81/im"; UNI_APP.WS_URL = "wss://www.boxim.online:81/im";
} }
export default UNI_APP export default UNI_APP

36
im-uniapp/package.json

@ -1,42 +1,6 @@
{ {
"uni-app": { "uni-app": {
"scripts": { "scripts": {
/*
"dev-h5": {
"title": "开发环境-H5",
"browser":"chrome",
"env": {
"UNI_PLATFORM": "h5",
"BASE_URL": "/api",
"WS_URL": "ws://127.0.0.1:8878/im"
}
},
"dev-wx-mini": {
"title": "开发环境-微信小程序",
"env": {
"UNI_PLATFORM": "mp-weixin",
"BASE_URL": "http://127.0.0.1:8888",
"WS_URL": "ws://127.0.0.1:8878/im"
}
},
"prod-h5": {
"title": "正式环境-H5",
"browser":"chrome",
"env": {
"UNI_PLATFORM": "h5",
"BASE_URL": "https://www.boxim.online/api",
"WS_URL": "wss://www.boxim.online:81/im"
}
},
"prod-wx-mini": {
"title": "正式环境-微信小程序",
"env": {
"UNI_PLATFORM": "mp-weixin",
"BASE_URL": "https://www.boxim.online/api",
"WS_URL": "wss://www.boxim.online:81/im"
}
}
*/
} }
} }
} }
Loading…
Cancel
Save