fix(report): optimize wechat toast length limit and add admin violation reports management center
这个提交包含在:
@@ -35,6 +35,47 @@ describe('ClientFeatures (TDD 测试套件: 用户端功能闭环)', () => {
|
||||
expect(checkResult.code).toBe(87014);
|
||||
expect(checkResult.suggest).toBe('block');
|
||||
});
|
||||
|
||||
it('后端 repository 必须实现 handleReport 处置流转并支持处分与驳回', () => {
|
||||
const repoPath = path.join(serverSrcDir, 'db', 'repository.ts');
|
||||
const content = fs.readFileSync(repoPath, 'utf-8');
|
||||
|
||||
expect(content).toContain('handleReport');
|
||||
expect(content).toContain('handle_result');
|
||||
expect(content).toContain('handle_note');
|
||||
expect(content).toContain('handled_at');
|
||||
});
|
||||
|
||||
it('后端 index.ts 必须暴露 POST /api/reports/:id/handle 路由', () => {
|
||||
const indexPath = path.join(serverSrcDir, 'index.ts');
|
||||
const content = fs.readFileSync(indexPath, 'utf-8');
|
||||
|
||||
expect(content).toContain("app.post('/api/reports/:id/handle'");
|
||||
expect(content).toContain('repo.handleReport');
|
||||
});
|
||||
|
||||
it('管理后台必须挂载 SafetyReports 路由且存在对应处理页面视图', () => {
|
||||
const routePath = path.join(rootDir, 'admin', 'arco-design-pro-vite', 'src', 'router', 'routes', 'modules', 'safety.ts');
|
||||
const routeContent = fs.readFileSync(routePath, 'utf-8');
|
||||
expect(routeContent).toContain("path: 'reports'");
|
||||
expect(routeContent).toContain("name: 'SafetyReports'");
|
||||
|
||||
const viewPath = path.join(rootDir, 'admin', 'arco-design-pro-vite', 'src', 'views', 'safety', 'reports', 'index.vue');
|
||||
expect(fs.existsSync(viewPath)).toBe(true);
|
||||
const viewContent = fs.readFileSync(viewPath, 'utf-8');
|
||||
expect(viewContent).toContain('/api/reports');
|
||||
expect(viewContent).toContain('handleAction');
|
||||
});
|
||||
|
||||
it('小程序端 Toast 提示必须在 7 汉字以内以防被微信小程序方块图标截断', () => {
|
||||
const orderListPath = path.join(uniPagesDir, 'order', 'list.vue');
|
||||
const orderContent = fs.readFileSync(orderListPath, 'utf-8');
|
||||
expect(orderContent).toContain("title: '举报提交成功'");
|
||||
|
||||
const detailPath = path.join(uniPagesDir, 'expert', 'detail.vue');
|
||||
const detailContent = fs.readFileSync(detailPath, 'utf-8');
|
||||
expect(detailContent).toContain("title: '举报提交成功'");
|
||||
});
|
||||
});
|
||||
|
||||
describe('2. 订单待支付倒计时与退款仲裁工单闭环验证', () => {
|
||||
|
||||
在新工单中引用
屏蔽一个用户