Browse Source

♻️ refactor(admin): 修改首页图标查询参数格式

- 将type参数移至filters对象中,使用JSON.stringify格式化
- 优化查询参数结构,提高接口调用规范性
yourname 9 tháng trước cách đây
mục cha
commit
b95c88541f

+ 4 - 2
src/client/admin/pages/HomeIcons.tsx

@@ -30,9 +30,11 @@ const HomeIconsPage: React.FC = () => {
     queryFn: async () => {
     queryFn: async () => {
       const response = await homeIconClient.$get({
       const response = await homeIconClient.$get({
         query: {
         query: {
-          type: activeTab,
           page: 1,
           page: 1,
-          pageSize: 100
+          pageSize: 100,
+          filters: JSON.stringify({
+            type: activeTab
+          })
         }
         }
       });
       });
       if (response.status !== 200) throw new Error('获取图标失败');
       if (response.status !== 200) throw new Error('获取图标失败');