重构:移动源码到 src/ 目录,支持 CLI 构建

This commit is contained in:
kk
2026-06-26 17:55:48 +08:00
parent a85117cca7
commit 437764c9d2
348 changed files with 8914 additions and 40210 deletions
+21
View File
@@ -0,0 +1,21 @@
/**
* 开发环境配置
*/
const dev = {
// 业务 API 地址(vms-api,端口 4000
apiBaseUrl: 'http://192.168.0.23:4000',
// 网关地址(vms-gateway,端口 4001)— 用户授权、短信等接口走网关
apiGatewayUrl: 'https://gateway.arklinksmart.cn',
// 授权回调地址(支付宝/微信 OAuth redirect_uri
authRedirectUri: 'https://gateway.arklinksmart.cn/api/v1/user/auth/callback',
// 开发阶段硬编码 Token(生产环境应从登录流程获取)
bearerToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImRlZXB2ZW5kaW5nIiwic3ViIjoiMTY0MDI0MTEyNiIsImZyb20iOiJwb3MiLCJyb2xlIjoicG9zIiwibWFpbmJvYXJkX2lkIjoiVDEwMDIiLCJwb3Nfc24iOiIxNjQwMjQxMTI2IiwiaWF0IjoxNzc4NDkxOTA3LCJleHAiOjE3NzkwOTY3MDd9.DjscZtrTCr30XOngToUifxoel4q2EGES_uqGQernkvg',
// 是否开启请求日志
enableRequestLog: true,
};
export default dev;
+20
View File
@@ -0,0 +1,20 @@
/**
* 环境配置入口
* 根据编译模式自动选择 dev / prod 配置
*/
import common from './index.js';
import dev from './dev.js';
import prod from './prod.js';
// uni-app 编译时通过 define 注译 __UNI_PLATFORM__
// H5 开发模式下 process.env.NODE_ENV === 'development'
const isProd = process.env.NODE_ENV === 'production';
const envConfig = isProd ? prod : dev;
const config = {
...common,
...envConfig,
};
export default config;
+19
View File
@@ -0,0 +1,19 @@
/**
* 公共配置(开发/生产环境共享)
*/
const common = {
// 应用信息
appName: '悟空智能',
appVersion: '1.0.0',
// 默认设备ID(开发调试用)
defaultDeviceId: '',
// 客服电话
servicePhone: '13264706088',
// 请求超时时间(ms
requestTimeout: 10000,
};
export default common;
+20
View File
@@ -0,0 +1,20 @@
/**
* 生产环境配置
*/
const prod = {
// 业务 API 地址(vms-api
apiBaseUrl: 'https://api.arklink.com',
// 网关地址(vms-gateway)— 用户授权、短信等接口走网关
apiGatewayUrl: 'https://gateway.arklink.com',
// 授权回调地址(支付宝/微信 OAuth redirect_uri
authRedirectUri: 'https://gateway.arklink.com/api/v1/user/auth/callback',
// 生产环境 Token 从登录流程获取,此处为空
bearerToken: '',
enableRequestLog: false,
};
export default prod;