let configJSON; if (process.env.NODE_ENV === "development") { configJSON = { base: { // ip: "http://localhost", // auth_port: "44344", // public_port: "44344", // backend_port: "44344", // ip: "http://222.169.228.163", // auth_port: "7696", // public_port: "7692", // backend_port: "7692", // ip: "http://192.168.0.228", // auth_port: "7696", // public_port: "7692", // backend_port: "7692", ip: localStorage.getItem('config_ip'), auth_port: localStorage.getItem('config_auth_port'), public_port: localStorage.getItem('config_public_port'), backend_port: localStorage.getItem('config_backend_port'), }, basic: {}, upload: { ip: "http://localhost", }, authServer: { ip: "http://localhost", }, crm: { ip: "http://localhost", }, oms: { ip: "http://localhost", }, wx: { ip: "http://localhost", basicPort: "", }, client: { client_id: "basic-web", client_secret: "1q2w3e*", grant_type: "password", }, }; } else { // 发布环境 configJSON = { base: { // ip: "http://192.168.0.140", // auth_port: "8066", // public_port: "8092", // backend_port: "8092", // ip: "http://222.169.228.163", // auth_port: "7696", // public_port: "7692", // backend_port: "7692", // ip: "http://192.168.0.228", // auth_port: "7696", // public_port: "7692", // backend_port: "7692", // ip: "http://192.168.0.68", // auth_port: "8066", // public_port: "8092", // backend_port: "8092", ip: localStorage.getItem('config_ip'), auth_port: localStorage.getItem('config_auth_port'), public_port: localStorage.getItem('config_public_port'), backend_port: localStorage.getItem('config_backend_port'), }, basic: {}, upload: { ip: "http://localhost", }, authServer: { ip: "http://localhost", }, crm: { ip: "http://localhost", }, oms: { ip: "http://localhost", }, wx: { ip: "http://localhost", basicPort: "", }, client: { client_id: "basic-web", client_secret: "1q2w3e*", grant_type: "password", }, }; // configJSON.base.ip = `${window.location.protocol}//${window.location.hostname}`; // configJSON.base.auth_port = // configJSON.base.backend_port = // configJSON.base.public_port = // window.location.port; } export default configJSON;