20 lines
723 B
JavaScript
20 lines
723 B
JavaScript
// .env.js 文件
|
|
// 不同环境访问不同的路径
|
|
|
|
const ENV_API_URL = {
|
|
development: 'http://192.168.0.13:9502', //开发环境
|
|
production: 'https://shopapi.houyi2023.cn', //生产环境
|
|
}
|
|
const ENV_WS_URL = {
|
|
// development: 'ws://127.0.0.1:9501/ws', //开发环境
|
|
|
|
// production: 'wss://shopapi.jitucdz.com/ws', //生产环境
|
|
}
|
|
const ENV_STATIC_URL = {
|
|
// development: 'https://shopapi.jitucdz.com', //开发环境
|
|
// production: 'https://shopapi.jitucdz.com', //生产环境
|
|
}
|
|
|
|
export const API_URL = ENV_API_URL[process.env.NODE_ENV || 'development'];
|
|
export const WS_URL = ENV_WS_URL[process.env.NODE_ENV || 'development'];
|
|
export const STATIC_URL = ENV_STATIC_URL[process.env.NODE_ENV || 'development']; |