feat(withdraw): convert withdraw records modal into dedicated independent page

这个提交包含在:
xcbyy
2026-10-13 10:06:15 +08:00
父节点 cf11d5654b
当前提交 661d0d2589
共有 8 个文件被更改,包括 1907 次插入 和 229 次删除

查看文件

@@ -172,16 +172,31 @@ describe('ClientFeatures (TDD 测试套件: 用户端功能闭环)', () => {
});
describe('6. 系统与隐私设置闭环验证', () => {
it('个人中心页面必须包含手机号脱敏计算、服务通知与清理缓存能力', () => {
it('个人中心与独立设置页面必须实现手机号脱敏计算、服务通知、清理缓存与版本合规', () => {
// 个人中心验证:包含脱敏计算与跳转独立设置页
const userVuePath = path.join(uniPagesDir, 'user', 'index.vue');
const content = fs.readFileSync(userVuePath, 'utf-8');
const userContent = fs.readFileSync(userVuePath, 'utf-8');
expect(content).toContain('openSettingsModal');
expect(content).toContain('privacyHidePhone');
expect(content).toContain('displayPhone');
expect(content).toContain('clearLocalCache');
expect(content).toContain('cacheSizeText');
expect(content).toContain('v2.6.0 正式版');
expect(userContent).toContain('openSettingsModal');
expect(userContent).toContain('privacyHidePhone');
expect(userContent).toContain('displayPhone');
expect(userContent).toContain('clearLocalCache');
expect(userContent).toContain('cacheSizeText');
expect(userContent).toContain('/pages/user/settings');
// 独立系统与隐私设置页面规格验证
const settingsVuePath = path.join(uniPagesDir, 'user', 'settings.vue');
expect(fs.existsSync(settingsVuePath)).toBe(true);
const settingsContent = fs.readFileSync(settingsVuePath, 'utf-8');
expect(settingsContent).toContain('privacyHidePhone');
expect(settingsContent).toContain('onToggleHidePhone');
expect(settingsContent).toContain('noticeSubscribe');
expect(settingsContent).toContain('onToggleNotice');
expect(settingsContent).toContain('clearLocalCache');
expect(settingsContent).toContain('cacheSizeText');
expect(settingsContent).toContain('v2.6.0 正式版');
expect(settingsContent).toContain('goToProtocol');
});
});

查看文件

@@ -130,7 +130,7 @@ describe('ContentSecurityService & Compliance Architecture (TDD 微信内容安
const raw = fs.readFileSync(pagesJsonPath, 'utf-8');
const config = JSON.parse(raw);
expect(Array.isArray(config.pages)).toBe(true);
expect(config.pages.length).toBe(18);
expect(config.pages.length).toBe(20);
for (const pageItem of config.pages) {
const vueFilePath = path.join(rootDir, 'pwuniapp', `${pageItem.path}.vue`);
@@ -719,6 +719,45 @@ describe('ContentSecurityService & Compliance Architecture (TDD 微信内容安
}
});
});
describe('16. 独立专属提现审批明细与记录页面验证 (pages/user/withdraw-records.vue)', () => {
it('pages.json 必须成功注册 pages/user/withdraw-records 且物理文件必须存在', () => {
const recordsPath = path.join(rootDir, 'pwuniapp', 'pages', 'user', 'withdraw-records.vue');
expect(fs.existsSync(recordsPath)).toBe(true);
const pagesJsonPath = path.join(rootDir, 'pwuniapp', 'pages.json');
const pagesJson = fs.readFileSync(pagesJsonPath, 'utf-8');
expect(pagesJson).toContain('pages/user/withdraw-records');
expect(pagesJson).toContain('提现审批明细');
});
it('独立提现记录页面必须支持状态选项卡筛选、总览统计与数据拉取', () => {
const recordsPath = path.join(rootDir, 'pwuniapp', 'pages', 'user', 'withdraw-records.vue');
const content = fs.readFileSync(recordsPath, 'utf-8');
expect(content).toContain('tabList');
expect(content).toContain('filteredRecords');
expect(content).toContain('getUserWithdrawals');
expect(content).toContain('goToWithdraw');
});
it('提现页面必须实现对提现记录独立页面的原生导航跳转', () => {
const wdPath = path.join(rootDir, 'pwuniapp', 'pages', 'user', 'withdraw.vue');
const content = fs.readFileSync(wdPath, 'utf-8');
expect(content).toContain('/pages/user/withdraw-records');
});
it('提现记录页面代码严禁包含任何系统 Emoji 与 showModal 4 字门禁违规', () => {
const recordsPath = path.join(rootDir, 'pwuniapp', 'pages', 'user', 'withdraw-records.vue');
const content = fs.readFileSync(recordsPath, 'utf-8');
const emojiRegex = /(?:\p{Extended_Pictographic}|\p{Emoji_Presentation}|[\u2600-\u27BF])/u;
expect(emojiRegex.test(content)).toBe(false);
const modalMatches = content.matchAll(/(?:confirmText|cancelText):\s*['"]([^'"]+)['"]/g);
for (const match of modalMatches) {
const btnText = match[1];
expect(btnText.length).toBeLessThanOrEqual(4);
}
});
});
});