refactor(ECR-001): Phase F types/sdk 对齐并拆分超标 H5 页

抽出 OpenAPI DTO;将 Ask/Report/Profile/Star 等 8 页拆到 ≤400 行,并修 ScaleSummary、fortuneKey、Scale 选答与单测。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-05 18:19:34 +08:00
co-authored by Cursor
parent 19d3cd5945
commit e735aa43e3
64 changed files with 6198 additions and 4157 deletions
@@ -26,8 +26,9 @@ describe('MembershipPage', () => {
api.getMembership.mockResolvedValue({ active: false, status: 'none' })
const w = mount(MembershipPage)
await flushPromises()
expect(w.text()).toContain('尚未开通')
expect(w.text()).toContain('开通月卡')
expect(w.text()).toContain('开通后可查看画像')
expect(w.text()).toContain('月卡')
expect(w.text()).toContain('模拟开通')
})
it('activates membership after mock pay', async () => {
@@ -45,7 +46,9 @@ describe('MembershipPage', () => {
const w = mount(MembershipPage)
await flushPromises()
await w.findAll('button').find((b) => b.text().includes('开通月卡'))!.trigger('click')
const monthBtn = w.findAll('button').find((b) => b.text().includes('月卡'))
expect(monthBtn).toBeTruthy()
await monthBtn!.trigger('click')
await flushPromises()
expect(api.createOrder).toHaveBeenCalledWith({ kind: 'membership', plan: 'month' })
expect(w.text()).toContain('会员有效')
@@ -58,8 +61,8 @@ describe('MembershipPage', () => {
await flushPromises()
expect(w.text()).toContain('网络错误')
api.getMembership.mockResolvedValue({ active: false, status: 'none' })
await w.find('button.link').trigger('click')
await w.find('button.retry').trigger('click')
await flushPromises()
expect(w.text()).toContain('尚未开通')
expect(w.text()).toContain('开通后可查看画像')
})
})