fix: 修复员工门户规章制度页面报错,新增更新说明文档

This commit is contained in:
freedakgmail
2026-07-28 07:33:44 +08:00
parent 5e22a82163
commit 7ab6200d1a
2 changed files with 263 additions and 2 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ export default function MyPolicies() {
queryKey: ['portal-policies'],
queryFn: async () => {
const res = await portalApi.get('/policies') as any
return res.data ?? []
return res.data?.data ?? res.data ?? []
},
})
@@ -37,7 +37,7 @@ export default function MyPolicies() {
queryFn: async () => {
if (!selectedId) return null
const res = await portalApi.get(`/policies/${selectedId}`) as any
return res.data ?? null
return res.data?.data ?? res.data ?? null
},
enabled: !!selectedId,
})