时里院子市集
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.3 KiB

配置说明文档

环境配置

1. 复制环境变量文件

cp .env.example .env

2. 修改配置文件

config/app.ts

// 租户ID - 请根据实际情况修改
export const TenantId = 'YOUR_TENANT_ID';
// 接口地址 - 请根据实际情况修改
export const BaseUrl = 'https://your-api-domain.com/api';

src/utils/server.ts

// 模版套餐ID - 请根据实际情况修改
export const TEMPLATE_ID = 'YOUR_TEMPLATE_ID';
// 服务接口 - 请根据实际情况修改
export const SERVER_API_URL = 'https://your-server-domain.com/api';

project.config.json

{
  "appid": "your_wechat_appid"
}

3. 小程序配置

微信小程序

  1. 在微信公众平台申请小程序
  2. 获取AppID并填入 project.config.json
  3. 配置服务器域名白名单

支付宝小程序

  1. 在支付宝开放平台申请小程序
  2. 获取AppID并配置相应文件

字节跳动小程序

  1. 在字节跳动开发者平台申请小程序
  2. 获取AppID并填入 project.tt.json

4. API配置

确保后端API服务正常运行,并配置正确的域名和端口。

5. 安全注意事项

  • 不要将真实的AppID、API密钥等敏感信息提交到公开仓库
  • 使用环境变量管理敏感配置
  • 定期更新密码和密钥
  • 在生产环境中启用HTTPS