Browse Source

改造env环境机制

master
科技小王子 1 month ago
parent
commit
7d255a2d3c
  1. 2
      config/app.ts
  2. 6
      config/env.ts
  3. 2
      package.json
  4. 2
      project.config.json
  5. 4
      src/utils/server.ts

2
config/app.ts

@ -1,7 +1,7 @@
import { API_BASE_URL } from './env' import { API_BASE_URL } from './env'
// 租户ID - 请根据实际情况修改 // 租户ID - 请根据实际情况修改
export const TenantId = 'YOUR_TENANT_ID';
export const TenantId = '10550';
// 接口地址 - 请根据实际情况修改 // 接口地址 - 请根据实际情况修改
export const BaseUrl = API_BASE_URL; export const BaseUrl = API_BASE_URL;
// 当前版本 // 当前版本

6
config/env.ts

@ -2,14 +2,14 @@
export const ENV_CONFIG = { export const ENV_CONFIG = {
// 开发环境 // 开发环境
development: { development: {
API_BASE_URL: 'http://localhost:9200/api',
APP_NAME: 'Taro App Dev',
API_BASE_URL: 'https://cms-api.websoft.top/api',
APP_NAME: '时里院子市集',
DEBUG: 'true', DEBUG: 'true',
}, },
// 生产环境 // 生产环境
production: { production: {
API_BASE_URL: 'https://cms-api.websoft.top/api', API_BASE_URL: 'https://cms-api.websoft.top/api',
APP_NAME: 'Taro App',
APP_NAME: '时里院子市集',
DEBUG: 'false', DEBUG: 'false',
}, },
// 测试环境 // 测试环境

2
package.json

@ -1,5 +1,5 @@
{ {
"name": "template-10549",
"name": "template-10550",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"description": "WebSoft Inc.", "description": "WebSoft Inc.",

2
project.config.json

@ -2,7 +2,7 @@
"miniprogramRoot": "dist/", "miniprogramRoot": "dist/",
"projectname": "websoft", "projectname": "websoft",
"description": "时里院子市集", "description": "时里院子市集",
"appid": "your_wechat_appid",
"appid": "wx5170f9f17a813877",
"setting": { "setting": {
"urlCheck": true, "urlCheck": true,
"es6": false, "es6": false,

4
src/utils/server.ts

@ -2,9 +2,9 @@ import Taro from '@tarojs/taro';
import {User} from "@/api/system/user/model"; import {User} from "@/api/system/user/model";
// 模版套餐ID - 请根据实际情况修改 // 模版套餐ID - 请根据实际情况修改
export const TEMPLATE_ID = 'YOUR_TEMPLATE_ID';
export const TEMPLATE_ID = '10550';
// 服务接口 - 请根据实际情况修改 // 服务接口 - 请根据实际情况修改
export const SERVER_API_URL = 'https://your-server-domain.com/api';
export const SERVER_API_URL = 'https://server.websoft.top/api';
// export const SERVER_API_URL = 'http://127.0.0.1:8000/api'; // export const SERVER_API_URL = 'http://127.0.0.1:8000/api';
/** /**
* *

Loading…
Cancel
Save