feat(config): add finance rules, activity rules, and real expert application flow
这个提交包含在:
@@ -221,5 +221,47 @@ describe('ContentSecurityService & Compliance Architecture (TDD 微信内容安
|
||||
expect(emojiRegex.test(content)).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('7. 财务分销规则、组局预算规范与大神入驻申请闭环验证 (finance_rules & activity_rules)', () => {
|
||||
it('MySQL 数据库与种子数据必须注册 finance_rules 与 activity_rules 配置项', () => {
|
||||
const mysqlPath = path.join(rootDir, 'server', 'src', 'db', 'mysql.ts');
|
||||
const content = fs.readFileSync(mysqlPath, 'utf-8');
|
||||
expect(content).toContain('finance_rules');
|
||||
expect(content).toContain('platformRatePercent');
|
||||
expect(content).toContain('firstReferralPercent');
|
||||
expect(content).toContain('activity_rules');
|
||||
expect(content).toContain('minParticipants');
|
||||
expect(content).toContain('presetPerPersonFees');
|
||||
});
|
||||
|
||||
it('管理后台 platform-config 必须包含 Tab 9 财务规则与 Tab 10 组局预算面板', () => {
|
||||
const adminConfigPath = path.join(rootDir, 'admin', 'arco-design-pro-vite', 'src', 'views', 'safety', 'platform-config', 'index.vue');
|
||||
const content = fs.readFileSync(adminConfigPath, 'utf-8');
|
||||
expect(content).toContain('finance_rules_config');
|
||||
expect(content).toContain('财务抽成与分销规则');
|
||||
expect(content).toContain('activity_rules_config');
|
||||
expect(content).toContain('组局发单与预算规范');
|
||||
expect(content).toContain('financeRulesForm');
|
||||
expect(content).toContain('activityRulesForm');
|
||||
});
|
||||
|
||||
it('服务端路由必须提供 POST /api/companions/apply 真实申请接口且校验姓名/身份证/安全', () => {
|
||||
const serverIndexPath = path.join(rootDir, 'server', 'src', 'index.ts');
|
||||
const content = fs.readFileSync(serverIndexPath, 'utf-8');
|
||||
expect(content).toContain("app.post('/api/companions/apply'");
|
||||
expect(content).toContain('真实姓名不能为空');
|
||||
expect(content).toContain('身份证号不能为空');
|
||||
});
|
||||
|
||||
it('小程序个人中心与发起组局页面必须动态绑定配置并实现门槛保护', () => {
|
||||
const userIndexContent = fs.readFileSync(path.join(rootDir, 'pwuniapp', 'pages', 'user', 'index.vue'), 'utf-8');
|
||||
const createActContent = fs.readFileSync(path.join(rootDir, 'pwuniapp', 'pages', 'activity', 'create.vue'), 'utf-8');
|
||||
expect(userIndexContent).toContain('applyExpertCert');
|
||||
expect(userIndexContent).toContain('showExpertCertModal');
|
||||
expect(userIndexContent).toContain('finance_rules');
|
||||
expect(createActContent).toContain('presetPerPersonFees');
|
||||
expect(createActContent).toContain('activity_rules');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户