fix(F006-W13.4+13.5): 系统消息 + 字典类型 端点路径错配修正 (5.18 教训)
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
This commit is contained in:
parent
99166d8abe
commit
dfdc8ef4ff
@ -542,13 +542,14 @@ const transactionMock = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
// ========== user/message ==========
|
// ========== user/message ==========
|
||||||
|
// W13.4: 后端字段是 name/content/readFlag/createDate, 不是 title/receiver/status/sendTime
|
||||||
const messageCols: MockColumn[] = [
|
const messageCols: MockColumn[] = [
|
||||||
{ prop: 'id', label: 'ID', width: 80 },
|
{ prop: 'id', label: 'ID', width: 80 },
|
||||||
{ prop: 'title', label: '消息标题', minWidth: 220 },
|
{ prop: 'name', label: '消息标题', minWidth: 200 },
|
||||||
{ prop: 'type', label: '类型', width: 100 },
|
{ prop: 'content', label: '内容', minWidth: 260 },
|
||||||
{ prop: 'receiver', label: '接收人', width: 140 },
|
{ prop: 'type', label: '类型', width: 80, format: (r: any) => r.type === 1 ? '系统' : r.type === 2 ? '业务' : String(r.type ?? '--') },
|
||||||
{ prop: 'status', label: '状态', width: 100, type: 'status' },
|
{ prop: 'readFlag', label: '状态', width: 80, format: (r: any) => r.readFlag === 1 ? '已读' : r.readFlag === 0 ? '未读' : String(r.readFlag ?? '--') },
|
||||||
{ prop: 'sendTime', label: '发送时间', width: 180, type: 'text' }
|
{ prop: 'createDate', label: '发送时间', width: 180, type: 'text' }
|
||||||
]
|
]
|
||||||
const messageMock = [
|
const messageMock = [
|
||||||
{ id: '1', title: '订单已发货', type: '订单通知', receiver: '深圳科技公司', status: 1, sendTime: now(0) },
|
{ id: '1', title: '订单已发货', type: '订单通知', receiver: '深圳科技公司', status: 1, sendTime: now(0) },
|
||||||
@ -763,7 +764,7 @@ export const MOCK_TABLE_CONFIGS: Record<string, MockConfig> = {
|
|||||||
'user-finance-transaction': { endpoint: '/user/finance/transaction-record/page', title: '交易流水', columns: transactionCols, mockData: transactionMock, queryKey: 'orderNo', queryLabel: '关联单号' },
|
'user-finance-transaction': { endpoint: '/user/finance/transaction-record/page', title: '交易流水', columns: transactionCols, mockData: transactionMock, queryKey: 'orderNo', queryLabel: '关联单号' },
|
||||||
|
|
||||||
// user/message (2)
|
// 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: '事项' },
|
'user-message-handel': { endpoint: '/user/message/messageHandel/page', title: '待处理消息', columns: messageHandelCols, mockData: messageHandelMock, queryKey: 'title', queryLabel: '事项' },
|
||||||
|
|
||||||
// sys/log (3)
|
// sys/log (3)
|
||||||
@ -779,7 +780,7 @@ export const MOCK_TABLE_CONFIGS: Record<string, MockConfig> = {
|
|||||||
'sys-userManagement': { endpoint: '/sys/userManagement/page', title: '全国运营中心', columns: operationCols, mockData: userManagementMock, queryKey: 'name', queryLabel: '运营中心' },
|
'sys-userManagement': { endpoint: '/sys/userManagement/page', title: '全国运营中心', columns: operationCols, mockData: userManagementMock, queryKey: 'name', queryLabel: '运营中心' },
|
||||||
|
|
||||||
// sys (4)
|
// 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-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-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: '接收人' }
|
'sys-notice-user': { endpoint: '/sys/notice-user/page', title: '用户通知', columns: noticeUserCols, mockData: noticeUserMock, queryKey: 'userName', queryLabel: '接收人' }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user