14 lines
535 B
TypeScript
Executable File
14 lines
535 B
TypeScript
Executable File
const accountInfo = wx.getAccountInfoSync()
|
|
const envVersion = accountInfo?.miniProgram?.envVersion || 'release'
|
|
|
|
const BASE_URL_MAP: Record<string, string> = {
|
|
develop: 'http://localhost:8080',
|
|
trial: 'http://guzjwuna.prod.ihnm9taa.e13h9xq5.com',
|
|
release: 'http://guzjwuna.prod.ihnm9taa.e13h9xq5.com'
|
|
}
|
|
|
|
export const ENV = envVersion
|
|
export const USE_CLOUD = envVersion !== 'develop'
|
|
export const BASE_URL = BASE_URL_MAP[envVersion] || BASE_URL_MAP['release']
|
|
export const FILE_BASE_URL = `${BASE_URL}/api/v1/file`
|