diff --git a/.workbuddy/expert-history.json b/.workbuddy/expert-history.json index a9bc86f..dac490d 100644 --- a/.workbuddy/expert-history.json +++ b/.workbuddy/expert-history.json @@ -13,5 +13,5 @@ } ] }, - "lastUpdated": 1775132225586 + "lastUpdated": 1775141282813 } \ No newline at end of file diff --git a/config/env.ts b/config/env.js similarity index 74% rename from config/env.ts rename to config/env.js index 84d3981..2010f0f 100644 --- a/config/env.ts +++ b/config/env.js @@ -2,21 +2,21 @@ // ============ 环境切换开关(修改这里即可切换环境)============ // 可选值: 'development' | 'test' | 'production' -const CURRENT_ENV: 'production' = 'production' +const CURRENT_ENV = 'production' // =========================================================== export const ENV_CONFIG = { // 开发环境 development: { - API_BASE_URL: 'https://glt-dev-api.websoft.top/api', - SERVER_API_URL: 'https://glt-dev-server.websoft.top/api', + API_BASE_URL: 'https://glt-api.websoft.top/api', + SERVER_API_URL: 'https://glt-server.websoft.top/api', APP_NAME: '开发环境', DEBUG: 'true', }, // 测试环境 test: { - API_BASE_URL: 'https://glt-dev-api.websoft.top/api', - SERVER_API_URL: 'https://glt-dev-server.websoft.top/api', + API_BASE_URL: 'https://glt-api.websoft.top/api', + SERVER_API_URL: 'https://glt-server.websoft.top/api', APP_NAME: '测试环境', DEBUG: 'true', }, diff --git a/config/index.ts b/config/index.ts index b9611c4..448419d 100644 --- a/config/index.ts +++ b/config/index.ts @@ -2,7 +2,7 @@ import { defineConfig, type UserConfigExport } from '@tarojs/cli' import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin' import devConfig from './dev' import prodConfig from './prod' -import { getEnvConfig } from './env' +import { getEnvConfig } from './env.js' // import vitePluginImp from 'vite-plugin-imp' // https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数 diff --git a/src/utils/server.ts b/src/utils/server.ts index 400149e..34b1531 100644 --- a/src/utils/server.ts +++ b/src/utils/server.ts @@ -7,7 +7,7 @@ export const TEMPLATE_ID = '10584'; // @ts-ignore export const SERVER_API_URL = process.env.TARO_ENV === 'production' ? 'https://glt-server.websoft.top/api' - : 'https://glt-dev-server.websoft.top/api'; + : 'https://glt-server.websoft.top/api'; /** * 保存用户信息到本地存储 * @param token diff --git a/tsconfig.json b/tsconfig.json index ea5fb7b..dd4c2af 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -37,6 +37,6 @@ }, "skipLibCheck": true }, - "include": ["./src", "./types", "./config"], + "include": ["./src", "./types"], "compileOnSave": false }