Initial commit
This commit is contained in:
22
common/config.js
Normal file
22
common/config.js
Normal file
@@ -0,0 +1,22 @@
|
||||
// const BASE_HOST = 'your-server-ip'
|
||||
// const CHAT_URL = `http://${BASE_HOST}:10008`
|
||||
// const API_URL = `http://${BASE_HOST}:10002`
|
||||
// const WS_URL = `ws://${BASE_HOST}:10001`
|
||||
|
||||
const BASE_DOMAIN = '47.117.71.33:15219'
|
||||
const CHAT_URL = `http://${BASE_DOMAIN}/chat`
|
||||
const API_URL = `http://${BASE_DOMAIN}/api`
|
||||
const WS_URL = `ws://${BASE_DOMAIN}/msg_gateway`
|
||||
|
||||
const version = 'Uniapp-Demo'
|
||||
|
||||
const getRegisterUrl = () => uni.getStorageSync("IMRegisteUrl") || CHAT_URL;
|
||||
const getApiUrl = () => uni.getStorageSync("IMApiUrl") || API_URL;
|
||||
const getWsUrl = () => uni.getStorageSync("IMWsUrl") || WS_URL;
|
||||
|
||||
module.exports = {
|
||||
version,
|
||||
getRegisterUrl,
|
||||
getApiUrl,
|
||||
getWsUrl,
|
||||
};
|
||||
Reference in New Issue
Block a user