From dfdc8ef4ffd2d6c8fa0969027c72243f38294af8 Mon Sep 17 00:00:00 2001 From: zou Date: Mon, 6 Jul 2026 15:30:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(F006-W13.4+13.5):=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=B6=88=E6=81=AF=20+=20=E5=AD=97=E5=85=B8=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=20=E7=AB=AF=E7=82=B9=E8=B7=AF=E5=BE=84=E9=94=99=E9=85=8D?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20(5.18=20=E6=95=99=E8=AE=AD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit W13.4 系统消息: - mockTableConfigs user-message 端点 /user/message/message/page (404) → /user/message/page (112 条真数据) - 字段对齐后端: title→name / receiver→content / status→readFlag / sendTime→createDate - type/format 函数把 readFlag 1→已读 0→未读, type 1→系统 2→业务 W13.5 字典类型: - mockTableConfigs sys-dict 端点 /sys/dict-type/page (404) → /sys/dict/type/page (11 条真数据) - 字段 dictType/dictName/remark/createDate 全对齐 W13.5 顺手扫了其它 5 个 configKey 端点, 全是 200 (other-information/groupbuy/seckill/supplier-promoter 都对) 5.18 教训再确认: - 端点 4 URL 都试: /module/page /module/list /module/search /module - 真实分页端点不一定叫 page, 也可能是 search/list - mockTableConfigs 写端点前必先 curl 验证 (不能用 router 名字猜) Playwright 验: - 系统消息: sub="共 112 条" 第一行 "售后申请通知 用户发起了...订单的售后申请" - 字典类型: sub="共 11 条" 第一行 "gender 性别" 遗留 (不阻塞): - 5.x.x 端点路径错配继续扫: 40 个 MockTableView 中其它可疑的还没全扫 - supplier/promoter 端点 200 但 0 条, 显示空列表 - 待处理消息 (/user/message/handel) 后端无端点, 保留 mock --- src/modules/generic/mockTableConfigs.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/modules/generic/mockTableConfigs.ts b/src/modules/generic/mockTableConfigs.ts index 5601fa6..8a46140 100644 --- a/src/modules/generic/mockTableConfigs.ts +++ b/src/modules/generic/mockTableConfigs.ts @@ -542,13 +542,14 @@ const transactionMock = [ ] // ========== user/message ========== +// W13.4: 后端字段是 name/content/readFlag/createDate, 不是 title/receiver/status/sendTime const messageCols: MockColumn[] = [ { prop: 'id', label: 'ID', width: 80 }, - { prop: 'title', label: '消息标题', minWidth: 220 }, - { prop: 'type', label: '类型', width: 100 }, - { prop: 'receiver', label: '接收人', width: 140 }, - { prop: 'status', label: '状态', width: 100, type: 'status' }, - { prop: 'sendTime', label: '发送时间', width: 180, type: 'text' } + { prop: 'name', label: '消息标题', minWidth: 200 }, + { prop: 'content', label: '内容', minWidth: 260 }, + { prop: 'type', label: '类型', width: 80, format: (r: any) => r.type === 1 ? '系统' : r.type === 2 ? '业务' : String(r.type ?? '--') }, + { prop: 'readFlag', label: '状态', width: 80, format: (r: any) => r.readFlag === 1 ? '已读' : r.readFlag === 0 ? '未读' : String(r.readFlag ?? '--') }, + { prop: 'createDate', label: '发送时间', width: 180, type: 'text' } ] const messageMock = [ { id: '1', title: '订单已发货', type: '订单通知', receiver: '深圳科技公司', status: 1, sendTime: now(0) }, @@ -763,7 +764,7 @@ export const MOCK_TABLE_CONFIGS: Record = { 'user-finance-transaction': { endpoint: '/user/finance/transaction-record/page', title: '交易流水', columns: transactionCols, mockData: transactionMock, queryKey: 'orderNo', queryLabel: '关联单号' }, // user/message (2) - 'user-message': { endpoint: '/user/message/message/page', title: '系统消息', columns: messageCols, mockData: messageMock, queryKey: 'title', queryLabel: '消息标题' }, + 'user-message': { endpoint: '/user/message/page', title: '系统消息', columns: messageCols, mockData: messageMock, queryKey: 'title', queryLabel: '消息标题' }, 'user-message-handel': { endpoint: '/user/message/messageHandel/page', title: '待处理消息', columns: messageHandelCols, mockData: messageHandelMock, queryKey: 'title', queryLabel: '事项' }, // sys/log (3) @@ -779,7 +780,7 @@ export const MOCK_TABLE_CONFIGS: Record = { 'sys-userManagement': { endpoint: '/sys/userManagement/page', title: '全国运营中心', columns: operationCols, mockData: userManagementMock, queryKey: 'name', queryLabel: '运营中心' }, // sys (4) - 'sys-dict': { endpoint: '/sys/dict-type/page', title: '字典类型', columns: dictTypeCols, mockData: dictTypeMock, queryKey: 'dictType', queryLabel: '字典类型' }, + 'sys-dict': { endpoint: '/sys/dict/type/page', title: '字典类型', columns: dictTypeCols, mockData: dictTypeMock, queryKey: 'dictType', queryLabel: '字典类型' }, 'sys-notice': { endpoint: '/sys/notice/page', title: '通知公告', columns: noticeCols, mockData: noticeMock, queryKey: 'title', queryLabel: '标题' }, 'sys-params': { endpoint: '/sys/params/page', title: '参数配置', columns: paramsCols, mockData: paramsMock, queryKey: 'paramKey', queryLabel: '参数键' }, 'sys-notice-user': { endpoint: '/sys/notice-user/page', title: '用户通知', columns: noticeUserCols, mockData: noticeUserMock, queryKey: 'userName', queryLabel: '接收人' }