Update environment configuration and enhance asset loading:

- Change development API proxy target to `https://192.168.3.233` and set base URL for recurring investment.
- Introduce `.env.production` for production environment with similar settings.
- Modify `loadExchangeAssets` to support pagination and scrolling for asset loading, improving user experience.
- Update related documentation and internationalization files for new features.
This commit is contained in:
justin
2026-10-10 16:24:01 +08:00
parent ffba1861be
commit 57b026d7d0
15 changed files with 286 additions and 60 deletions
+24 -2
View File
@@ -32,7 +32,7 @@
## 补充:getSimpleStockPage 资产搜索
- 交易所下拉选中后请求标的;`exchangeCodes: [exchangeCode]`,`isUpdatedToday: true`。
- 交易所下拉选中后请求标的;`exchangeCodes: [exchangeCode]`。
- 晶片搜索框防抖调用同一接口并传 `searchName`。
- 映射字段含 `productKey`、`productCodeUnique` 等,便于后续创建计划入参。
@@ -54,7 +54,7 @@
## 补充:Token、代理与服务端多语言
- URL 参数 `token` 写入请求头 `token`(参考 Order-H5);路由跳转保留 query(含 token)。
- 开发代理:`/base/*` → `getAllList` 等;`/trade/*` → `schedule-investment/exchanges` 等(目标 `192.168.3.230:18000`,可改 `.env.development`)。
- 开发代理:`/base/*` → `getAllList` 等;`/trade/*` → `schedule-investment/exchanges` 等(目标 `192.168.3.233`,可改 `.env.development`)。
- 有 token 时启动加载 `getSystemI18nAllList`;组件内用 `useServiceI18n().si18n('I18N_ID')` 解析服务端文案。
- `getScheduleInvestmentExchanges()` 已封装,待业务页面对接。
- `npm run build` 通过。
@@ -233,3 +233,25 @@
- 新增 `src/utils/frequencyDay.ts`,将接口 `1`/`MONDAY`/`MON` 等 weekly 值与带前导零的 monthly 值规范后用于列表与详情展示。
- 创建/预览提交:`WEEKLY` 为 `1`–`7`,`MONTHLY` 为 `1`–`31`;`DAILY` 不传 `frequencyDay`。界面仍显示星期中文名。
- 验证:`npm run build`;参见 `IMPACT_ANALYSIS.md` 对应补充。
---
## 补充:VITE_BASE_URL 子路径(2026-10-10)
- `vite.config.ts` 将 `VITE_BASE_URL` 映射为 Vite `base`;新增 `.env.production`。
- 开发/预览入口:`/recurring-investment/`。
- 验证:`npm run build`。
---
## 补充:HTTP 不再全局注入 clientId / accountId(2026-10-10)
- 移除 `src/api/http.ts` 对全部 POST 请求体的自动合并;仅 `POST /trade/schedule-investment/plan/create` 在 `buildScheduleInvestmentCreateBody` 中携带 URL 的 `clientId`、`accountId`。
- 验证:`npm run build`;参见 `IMPACT_ANALYSIS.md` 对应补充。
---
## 补充:资产下拉滚动分页(2026-10-10)
- `getSimpleStockPage` 每页 50 条;下拉触底 `loadMore` 追加,搜索仍防抖并重置页码。
- 验证:`npm run build`;参见 `IMPACT_ANALYSIS.md` 对应补充。