feat(withdraw): build dedicated withdrawal page with optimized layout and multichannel support

这个提交包含在:
xcbyy
2026-10-13 09:19:34 +08:00
父节点 e867488d0d
当前提交 1fb0cc4273
共有 9 个文件被更改,包括 1962 次插入 和 16 次删除

查看文件

@@ -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(16);
expect(config.pages.length).toBe(17);
for (const pageItem of config.pages) {
const vueFilePath = path.join(rootDir, 'pwuniapp', `${pageItem.path}.vue`);
@@ -674,6 +674,53 @@ describe('ContentSecurityService & Compliance Architecture (TDD 微信内容安
});
});
});
describe('15. 独立专属收益提现页面验证 (pages/user/withdraw.vue)', () => {
it('pages.json 必须成功注册 pages/user/withdraw 且物理文件必须存在', () => {
const wdPath = path.join(rootDir, 'pwuniapp', 'pages', 'user', 'withdraw.vue');
expect(fs.existsSync(wdPath)).toBe(true);
const pagesJsonPath = path.join(rootDir, 'pwuniapp', 'pages.json');
const pagesJson = fs.readFileSync(pagesJsonPath, 'utf-8');
expect(pagesJson).toContain('pages/user/withdraw');
expect(pagesJson).toContain('收益提现');
});
it('独立提现页面必须支持微信零钱、支付宝、银行卡三渠道与金额输入校验', () => {
const wdPath = path.join(rootDir, 'pwuniapp', 'pages', 'user', 'withdraw.vue');
const content = fs.readFileSync(wdPath, 'utf-8');
expect(content).toContain('currentChannel');
expect(content).toContain('WECHAT');
expect(content).toContain('ALIPAY');
expect(content).toContain('BANK');
expect(content).toContain('withdrawAmount');
expect(content).toContain('handleFillAllCommission');
expect(content).toContain('withdrawCommission');
expect(content).toContain('showRecordsDrawer');
});
it('个人中心与工作台必须实现对专属提现页面的原生导航跳转', () => {
const userPath = path.join(rootDir, 'pwuniapp', 'pages', 'user', 'index.vue');
const userContent = fs.readFileSync(userPath, 'utf-8');
expect(userContent).toContain('/pages/user/withdraw');
const wsPath = path.join(rootDir, 'pwuniapp', 'pages', 'expert', 'workspace.vue');
const wsContent = fs.readFileSync(wsPath, 'utf-8');
expect(wsContent).toContain('/pages/user/withdraw');
});
it('提现页面代码严禁包含任何系统 Emoji 与 showModal 4 字门禁违规', () => {
const wdPath = path.join(rootDir, 'pwuniapp', 'pages', 'user', 'withdraw.vue');
const content = fs.readFileSync(wdPath, '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);
}
});
});
});