config.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. var api_config = ""
  2. let upload_url = ""
  3. let H5_url = ""
  4. let update_url = ""
  5. let ws_url = ''
  6. var server_url = 'http://192.168.1.144:8088'
  7. var surl = "http://"+uni.getStorageSync("xjappserver").url+':'+uni.getStorageSync("xjappserver").port
  8. server_url = surl
  9. if(process.env.NODE_ENV === 'development'){ //开发环境
  10. api_config = server_url
  11. upload_url = server_url
  12. H5_url = server_url+"/apph5/#/"
  13. update_url = server_url+"/apph5/downLoad/update.txt"
  14. ws_url = "ws://192.168.20.126:8081"
  15. // api_config = "http://192.168.20.132:8081" //测试环境
  16. // upload_url = "http://rtso-file.siwill.com"
  17. // H5_url = "http://192.168.20.132:8070/apph5/#/"
  18. // update_url = "http://192.168.20.132:8070/apph5/downLoad/update.txt"
  19. // ws_url = "ws://192.168.20.132:8081"
  20. }
  21. else{
  22. api_config = server_url //测试环境
  23. upload_url = server_url
  24. H5_url = server_url+"/apph5/#/"
  25. update_url = server_url+"/apph5/downLoad/update.txt"
  26. ws_url = "ws://192.168.20.132:8081"
  27. // api_config = "http://192.168.20.126:8081" //开发环境
  28. // upload_url = "http://192.168.20.79:9000"
  29. // H5_url = "http://192.168.20.126:8070/apph5/#/"
  30. // update_url = "http://192.168.20.126:8070/apph5/downLoad/update.txt"
  31. // ws_url = "ws://192.168.20.126:8081"
  32. // api_config = "http://rtso-api.siwill.com" //生产环境
  33. // upload_url = "http://rtso-file.siwill.com"
  34. // H5_url = "http://rtso.siwill.com/apph5/#/"
  35. // update_url = "http://rtso.siwill.com/apph5/downLoad/update.txt"
  36. // ws_url = "ws://rtso-api.siwill.com"
  37. }
  38. export {upload_url,api_config,H5_url,update_url,ws_url}