Files
smartDriveEEUniApp/unpackage/dist/build/mp-weixin/common/config.js
2026-04-18 07:52:47 +08:00

2 lines
692 B
JavaScript

"use strict";const o=require("./env.js"),t={local:"http://localhost:8091/",prod:"http://api01ai.huayang-star.com/"},r={development:"local",production:"prod",local:"local",prod:"prod"};const e=function(){var t;const e=null==(t=o.envConfig)?void 0:t.apiEnv;{const o=r[e.toLowerCase()];if(o)return o}const n="undefined"!=typeof process&&(null==process?void 0:process.env)?process.env.UNI_APP_API_ENV||"production":"",s=n?n.toLowerCase():"";return r[s]||"prod"}(),n=(s=t[e]||t.prod).endsWith("/")?s:`${s}/`;var s;exports.API_BASE_URL=n,exports.getApiEnv=function(){return e},exports.getApiUrl=function(o=""){const t=o.startsWith("/")?o:`/${o}`,r=t.startsWith("/")?t.slice(1):t;return`${n}${r}`};