修改问题

This commit is contained in:
rain
2026-07-11 11:03:45 +08:00
parent edc0a58a54
commit db397a7917
38 changed files with 1082 additions and 7994 deletions
@@ -376,10 +376,10 @@ function createUnavailableMethod(name) {
Use a Chinese comment above the mapping: `// PC YAML 未提供这些业务 paths,保留方法名只用于阻止旧 APP 路径继续发请求。`
- [ ] **Step 5: Verify no APP auth/files network paths remain**
- [ ] **Step 5: Verify the PC auth/files contract**
Run: `Select-String -Path public\js\api-client.js -Pattern '/genealogy/app/auth|/genealogy/app/files'`
Expected: no matches.
Run: `node tests\pc-api-contract.test.js`
Expected: PC 请求契约扫描通过。
- [ ] **Step 6: Run API client test again**
@@ -607,10 +607,10 @@ Expected after implementation: PASS.
Only map file capability. Do not submit article/feed/album/ceremony/growth/memo business forms unless PC YAML provides their business endpoints.
- [ ] **Step 4: Verify no APP file path remains**
- [ ] **Step 4: Verify the PC file contract**
Run: `Select-String -Path public\js\api-client.js,public\js\upload-pages.js -Pattern '/genealogy/app/files'`
Expected: no matches.
Run: `node tests\pc-api-contract.test.js`
Expected: PC 请求契约扫描通过。
---
@@ -688,10 +688,10 @@ Expected after implementation: PASS.
In each affected page script, catch `PC_API_NOT_AVAILABLE` and render a small existing-style empty state. Add a Chinese comment: `// PC YAML 未提供该业务接口,页面先展示接口待确认状态。`
- [ ] **Step 4: Verify no APP business path is emitted from API client**
- [ ] **Step 4: Verify no obsolete business path is emitted from the API client**
Run: `Select-String -Path public\js\api-client.js -Pattern '/genealogy/app/'`
Expected: no network path matches.
Run: `node tests\pc-api-contract.test.js`
Expected: PC 请求契约扫描通过。
---
@@ -743,16 +743,15 @@ node tests\upload-pages.test.js
node tests\region-pages.test.js
node tests\unsupported-pages.test.js
Get-ChildItem -Path public\js -Filter *.js | Where-Object { $_.Name -notin @('jquery360.js','jquery.min.js') } | Sort-Object Name | ForEach-Object { node --check $_.FullName }
Select-String -Path public\js\api-client.js -Pattern '/genealogy/app/'
Select-String -Path public\js\auth-pages.js,public\js\captcha-pages.js,tests\auth-pages.test.js,tests\captcha-pages.test.js -Pattern 'PC_LOGIN|PC_REGISTER|PC_PASSWORD_RESET|APP_LOGIN|APP_REGISTER|APP_FORGOT_PASSWORD'
node tests\pc-api-contract.test.js
git diff --check
```
Expected:
- All listed Node tests pass.
- Business JS syntax check passes.
- `api-client.js` contains no `/genealogy/app/` network path.
- Auth and captcha code/tests contain no stale APP/old PC scene defaults.
- PC 请求契约扫描通过。
- 认证和验证码代码/tests 不含过期场景默认值。
- `git diff --check` passes, or if this directory is not a Git repository, record the exact output.
## Self-Review