1234567891011121314151617181920212223242526272829 |
- const STAGE_CONFIG = {
- "api-mock": {
- path: "api-mock",
- },
- dev: {
- path: "/api",
- },
- prod: {
- path: "",
- },
- };
- let stageKey = window.localStorage.getItem("stage");
- if (process.env.NODE_ENV === "production") {
- stageKey = "prod";
- } else {
- stageKey = "dev";
- }
- const stage = STAGE_CONFIG[stageKey || "api-mock"];
- // 0:已创建;1:已创建任务;2:任务运行中;3:已完成
- const orderStatus = {
- 0: "等待中",
- 1: "已创建任务",
- 2: "任务运行中",
- 3: "已完成",
- };
- export { stage, orderStatus };
|