Jelajahi Sumber

feta 增加用户表单

Young 4 bulan lalu
induk
melakukan
af2f5a156d

+ 232 - 0
src/pages/Settings/User.tsx

@@ -0,0 +1,232 @@
+import {ActionType, PageContainer, ProForm, ProFormText, ProTable,} from '@ant-design/pro-components';
+import {Button, Card, Modal} from 'antd';
+import React, {useRef} from 'react';
+import {AddOutline} from 'antd-mobile-icons';
+import {EditBundle, useEdit} from '@/core/hooks/useEdit';
+import { deleteUserRemoveApi, getUserDetailsApi, postUserPageApi, postUserSaveApi } from '@/services/swagger/userAdmin';
+
+const Edit: React.FC<{ bundle: EditBundle; onSuccess?: () => void }> = (props) => {
+  const {bundle} = props;
+  const [form] = ProForm.useForm<SectApi.UserSaveQuery>();
+  const [loading, setLoading] = React.useState(false);
+
+  return (
+    <Modal
+      confirmLoading={loading}
+      title={bundle.id ? '编辑用户' : '添加用户'}
+      open={bundle.open}
+      onOk={async () => {
+        await form.validateFields();
+
+        try {
+          setLoading(true);
+
+          await postUserSaveApi({
+            id: bundle.id,
+            ...form.getFieldsValue()
+          });
+        } finally {
+          setLoading(false);
+        }
+
+        props.onSuccess?.();
+        bundle.close();
+      }}
+      onCancel={() => {
+        form.resetFields();
+        bundle.close();
+      }}
+    >
+      <ProForm
+        className={'mt-5'}
+        form={form}
+        labelCol={{span: 4}}
+        layout={'horizontal'}
+        submitter={false}
+        request={async () => {
+          if (bundle.id !== undefined) {
+            console.log(bundle.id, 'bundle');
+            const res = await getUserDetailsApi({id: bundle.id});
+
+            return {
+              ...res.data
+            }
+          }
+
+          return Promise.resolve({});
+        }}
+      >
+        <ProFormText
+          name={'name'}
+          label={'用户名称'}
+          rules={[
+            {
+              required: true,
+              message: '请输入用户名称',
+            },
+            {
+              min: 3,
+              max: 20,
+              message: '用户名称长度必须在3-20之间',
+            },
+          ]}
+          placeholder={'请输入账号'}
+        ></ProFormText>
+        <ProFormText
+          name="nickname"
+          label="姓名"
+          rules={[
+            {
+              required: true,
+              message: '请输入姓名',
+            },
+            {
+              min: 2,
+              max: 20,
+              message: '姓名长度必须在2-20之间',
+            },
+          ]}
+          placeholder={'请输入用户姓名'}
+        />
+        <ProFormText.Password
+          name="password"
+          label="密码"
+          placeholder={'请输入密码'}
+          rules={[
+            {
+              required: true,
+              message: '请输入密码',
+            },
+            {
+              min: 6,
+              max: 50,
+              message: '密码长度必须在6-50之间',
+            },
+          ]}
+        />
+      </ProForm>
+    </Modal>
+  );
+};
+
+const Staff: React.FC = () => {
+  const bundle = useEdit();
+  const ref = useRef<ActionType>();
+
+
+
+  return (
+    <PageContainer content={''}>
+      {bundle.open && <Edit bundle={bundle} onSuccess={() => ref.current?.reload()}></Edit>}
+      <Card>
+        <ProTable<SectApi.StaffVO>
+          rowKey={'id'}
+
+          request={async (params, ...rest) => {
+            console.log(params, ...rest)
+
+            const res = await postUserPageApi(
+
+              {
+                current: params.current || 1,
+                size: params.pageSize || 10,
+              }
+              );
+
+            return {
+              success: res.success,
+              total: res.data.total,
+              data: res.data.records,
+            };
+          }}
+          columns={[
+            {
+              title: 'ID',
+              dataIndex: 'id',
+            },
+            {
+              title: '所属峰',
+              dataIndex: 'peakName',
+            },
+            {
+              title: '名称',
+              dataIndex: 'name',
+            },
+            {
+              title: '手机号码',
+              dataIndex: 'mobile',
+            },
+            {
+              title: '昵称',
+              dataIndex: 'nickname',
+            },
+            {
+              title: '会员等级',
+              dataIndex: 'userLevelName',
+            },
+            {
+              title: '宗门登记',
+              dataIndex: 'factionLevelName',
+            },
+            {
+              title: '紫币',
+              dataIndex: 'purpleCoin',
+            },
+            {
+              title: '紫晶',
+              dataIndex: 'purpleSpar',
+            },
+            {
+              title: '状态',
+              dataIndex: 'status',
+              render: (text, _) => {
+                return text === 1 ? "启用" : "禁用"
+              }
+            },
+            {
+              title: '操作',
+              valueType: 'option',
+              render: (_, record) => [
+                <a key={'edit'} onClick={() => bundle.update(record.id as number)}>
+                  编辑
+                </a>,
+                <a
+                  key={'delete'}
+                  onClick={async () => {
+                    if(record.id) {
+                      await deleteUserRemoveApi({id: record.id})
+                      ref.current?.reload();
+                    }
+                  }}
+                >
+                  删除
+                </a>,
+              ],
+            },
+          ]
+          }
+          search={{
+            labelWidth: 'auto',
+          }}
+          form={{
+            ignoreRules: false,
+          }}
+
+
+          actionRef={ref}
+          toolbar={{
+            actions: [
+              <Button icon={<AddOutline/>} key={'add'} type={'primary'} onClick={bundle.create}>
+                添加
+              </Button>,
+            ],
+            settings: [],
+          }}
+
+        ></ProTable>
+      </Card>
+    </PageContainer>
+  );
+};
+
+export default Staff;

+ 0 - 91
src/pages/Settings/Users.tsx

@@ -1,91 +0,0 @@
-import React, { useRef } from 'react';
-import { ActionType, PageContainer, ProTable } from '@ant-design/pro-components';
-import { Card, Image, Popconfirm } from 'antd';
-import { deleteUserRemoveApi, getUserDetailsApi, postUserPageApi } from '@/services/swagger/userAdmin';
-
-
-const Users = () => {
-  const ref = useRef<ActionType>();
-
-  return (
-    <PageContainer>
-      <Card>
-        <ProTable<SectApi.UserVO>
-          actionRef={ref}
-          rowKey="id"
-          search={false}
-          toolbar={{
-            actions: [],
-            settings: [],
-          }}
-          request={async (params) => {
-            const { current, pageSize } = params;
-            const result = await postUserPageApi({
-              current:current || 1,
-              size:pageSize || 20,
-
-            });
-            return {
-              data: result.data.records,
-              total: result.data.total,
-              success: result.success,
-            };
-          }}
-          columns={[
-            {
-              title: 'ID',
-              dataIndex: 'id',
-            },
-            {
-              title: '头像',
-              dataIndex: 'avatarThumbnail',
-              render: (text, record) => {
-                return <Image src={record.avatarThumbnail} width={50}></Image>;
-              },
-            },
-            {
-              title: '手机号码',
-              dataIndex: 'mobile',
-            },
-            {
-              title: '昵称',
-              dataIndex: 'nickname',
-            },
-            {
-              title: '操作',
-              valueType: 'option',
-              render: (_, record) => [
-                <a
-                  key={'edit'}
-                  onClick={async () => {
-                    if(record.id) {
-                      const user = await getUserDetailsApi({id: record.id});
-                      console.log(user);
-                    }
-                  }}
-                >
-                  编辑
-                </a>,
-                <Popconfirm
-                  key={'delete'}
-                  title={'确认删除吗?'}
-                  onConfirm={async () => {
-                    if(record.id) {
-                      await deleteUserRemoveApi({id: record.id});
-                      ref.current?.reload();
-                    }
-
-                  }}
-                >
-                  <a key={'delete'}>删除</a>
-                </Popconfirm>,
-              ],
-            },
-          ]}
-        ></ProTable>
-      </Card>
-    </PageContainer>
-  );
-};
-
-export default Users;

+ 4 - 19
src/services/swagger/clientsAuth.ts

@@ -2,27 +2,12 @@
 /* eslint-disable */
 import { invoke as request } from '@/core/network';
 
-/** 获取 Ticket POST /apis/clients/auth/getTicket */
-export async function postAuthGetTicketApi(
-  body: SectApi.AuthTicketQuery | SectApi.Mobile | SectApi.Qq | SectApi.WeiBo,
+/** 登录 POST /apis/clients/auth/login */
+export async function postAuthLoginApi(
+  body: SectApi.ClientsLoginQuery,
   options?: { [key: string]: any },
 ) {
-  return request<SectApi.AuthTicketVO>('/apis/clients/auth/getTicket', {
-    method: 'POST',
-    headers: {
-      'Content-Type': 'application/json',
-    },
-    data: body,
-    ...(options || {}),
-  });
-}
-
-/** 获取 Token POST /apis/clients/auth/getToken */
-export async function postAuthGetTokenApi(
-  body: SectApi.AuthTokenQuery,
-  options?: { [key: string]: any },
-) {
-  return request<SectApi.AuthTokenInfoVO>('/apis/clients/auth/getToken', {
+  return request<SectApi.ClientsTokenVO>('/apis/clients/auth/login', {
     method: 'POST',
     headers: {
       'Content-Type': 'application/json',

+ 22 - 0
src/services/swagger/index.ts

@@ -3,20 +3,42 @@
 // API 更新时间:
 // API 唯一标识:
 import * as userConfigClients from './userConfigClients';
+import * as userLevelClients from './userLevelClients';
+import * as userClients from './userClients';
+import * as peakStageClients from './peakStageClients';
+import * as peakLevelClients from './peakLevelClients';
+import * as peakClients from './peakClients';
+import * as factionLevelClients from './factionLevelClients';
 import * as clientsAuth from './clientsAuth';
+import * as userLevelAdmin from './userLevelAdmin';
 import * as userAdmin from './userAdmin';
 import * as staffAdmin from './staffAdmin';
 import * as roleAdmin from './roleAdmin';
+import * as peakStageAdmin from './peakStageAdmin';
+import * as peakLevelAdmin from './peakLevelAdmin';
+import * as peakAdmin from './peakAdmin';
 import * as menuAdmin from './menuAdmin';
+import * as factionLevelAdmin from './factionLevelAdmin';
 import * as zidianpeizhiguanlihoutaiApi from './zidianpeizhiguanlihoutaiApi';
 import * as yonghuqiandaokehuduanApi from './yonghuqiandaokehuduanApi';
 export default {
   userConfigClients,
+  userLevelClients,
+  userClients,
+  peakStageClients,
+  peakLevelClients,
+  peakClients,
+  factionLevelClients,
   clientsAuth,
+  userLevelAdmin,
   userAdmin,
   staffAdmin,
   roleAdmin,
+  peakStageAdmin,
+  peakLevelAdmin,
+  peakAdmin,
   menuAdmin,
+  factionLevelAdmin,
   zidianpeizhiguanlihoutaiApi,
   yonghuqiandaokehuduanApi,
 };

+ 381 - 74
src/services/swagger/typings.d.ts

@@ -1,48 +1,17 @@
 declare namespace SectApi {
-  type AuthTicketQuery = {
-    /** 登录类型 */
-    loginType?: 'qq' | 'weiBo' | 'mobile' | 'weChat';
-    /** 客户端类型 */
-    clientType: 'app';
-  };
-
-  type AuthTicketVO = {
-    /** ticket,用于后续 Token 登录 */
-    ticket?: string;
-    /** 社交ID */
-    socialId?: string;
-    /** 社交类型 */
-    socialType?: string;
-    /** 名称 */
-    nickname?: string;
-    /** 头像-缩略图 */
-    avatarThumbnail?: string;
-    /** 头像-原图 */
-    avatarOriginal?: string;
-    /** 是否绑定手机号 */
-    hasBindMobile?: boolean;
+  type ClientsLoginQuery = {
+    clientType?: string;
+    loginType?: string;
+    /** 手机号 */
+    mobile: string;
+    /** 验证码 */
+    code: string;
   };
 
-  type AuthTokenInfoVO = {
+  type ClientsTokenVO = {
     /** token */
     token?: string;
-    /** 手机号 */
-    mobile?: string;
-    /** 名称 */
-    nickname?: string;
-    /** 头像-缩略图 */
-    avatarThumbnail?: string;
-    /** 头像-原图 */
-    avatarOriginal?: string;
-  };
-
-  type AuthTokenQuery = {
-    /** 登录类型 */
-    loginType: 'qq' | 'weiBo' | 'mobile' | 'weChat';
-    /** 客户端类型 */
-    clientType: 'app';
-    /** 通过 getTicket 获取的 ticket */
-    ticket?: string;
+    user?: UserVO;
   };
 
   type Config = {
@@ -80,10 +49,26 @@ declare namespace SectApi {
     permission?: number;
   };
 
+  type deleteFactionLevelRemoveApiParams = {
+    id: number;
+  };
+
   type deleteMenuRemoveApiParams = {
     id: number;
   };
 
+  type deletePeakLevelRemoveApiParams = {
+    id: number;
+  };
+
+  type deletePeakRemoveApiParams = {
+    id: number;
+  };
+
+  type deletePeakStageRemoveApiParams = {
+    id: number;
+  };
+
   type deleteRoleRemoveApiParams = {
     id: number;
   };
@@ -92,18 +77,91 @@ declare namespace SectApi {
     id: number;
   };
 
+  type deleteUserLevelRemoveApiParams = {
+    id: number;
+  };
+
   type deleteUserRemoveApiParams = {
     id: number;
   };
 
+  type FactionLevelPageQuery = {
+    cursor?: string;
+    direction?: string;
+    current?: number;
+    size?: number;
+    sorted?: string;
+    sortColumn?: string;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+    asc?: boolean;
+    desc?: boolean;
+  };
+
+  type FactionLevelSaveQuery = {
+    /** 自增 ID */
+    id?: number;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+  };
+
+  type FactionLevelVO = {
+    /** 创建时间 */
+    createTime?: string;
+    /** 更新时间 */
+    updateTime?: string;
+    /** 自增 ID */
+    id?: number;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+  };
+
   type getConfigGetApiParams = {
     code: string;
   };
 
+  type getFactionLevelDetailsApiParams = {
+    id: number;
+  };
+
+  type getFactionLevelDetailsApiParams = {
+    id: number;
+  };
+
   type getMenuDetailsApiParams = {
     id: number;
   };
 
+  type getPeakDetailsApiParams = {
+    id: number;
+  };
+
+  type getPeakDetailsApiParams = {
+    id: number;
+  };
+
+  type getPeakLevelDetailsApiParams = {
+    id: number;
+  };
+
+  type getPeakLevelDetailsApiParams = {
+    id: number;
+  };
+
+  type getPeakStageDetailsApiParams = {
+    id: number;
+  };
+
+  type getPeakStageDetailsApiParams = {
+    id: number;
+  };
+
   type getRoleDetailsApiParams = {
     id: number;
   };
@@ -116,36 +174,92 @@ declare namespace SectApi {
     id: number;
   };
 
+  type getUserDetailsApiParams = {
+    id: number;
+  };
+
+  type getUserLevelDetailsApiParams = {
+    id: number;
+  };
+
+  type getUserLevelDetailsApiParams = {
+    id: number;
+  };
+
+  type getUserSignIsSignApiParams = {
+    day?: number;
+  };
+
   type IPageConfigVO = {
     size?: number;
     records?: ConfigVO[];
     current?: number;
+    pages?: number;
+    total?: number;
+  };
+
+  type IPageFactionLevelVO = {
+    size?: number;
+    records?: FactionLevelVO[];
+    current?: number;
+    pages?: number;
+    total?: number;
+  };
+
+  type IPagePeakLevelVO = {
+    size?: number;
+    records?: PeakLevelVO[];
+    current?: number;
+    pages?: number;
+    total?: number;
+  };
+
+  type IPagePeakStageVO = {
+    size?: number;
+    records?: PeakStageVO[];
+    current?: number;
+    pages?: number;
     total?: number;
+  };
+
+  type IPagePeakVO = {
+    size?: number;
+    records?: PeakVO[];
+    current?: number;
     pages?: number;
+    total?: number;
   };
 
   type IPageRoleVO = {
     size?: number;
     records?: RoleVO[];
     current?: number;
-    total?: number;
     pages?: number;
+    total?: number;
   };
 
   type IPageStaffVO = {
     size?: number;
     records?: StaffVO[];
     current?: number;
+    pages?: number;
     total?: number;
+  };
+
+  type IPageUserLevelVO = {
+    size?: number;
+    records?: UserLevelVO[];
+    current?: number;
     pages?: number;
+    total?: number;
   };
 
   type IPageUserVO = {
     size?: number;
     records?: UserVO[];
     current?: number;
-    total?: number;
     pages?: number;
+    total?: number;
   };
 
   type MenuSaveQuery = {
@@ -219,16 +333,118 @@ declare namespace SectApi {
     children?: MenuVO[];
   };
 
-  type Mobile =
-    // #/components/schemas/AuthTicketQuery
-    AuthTicketQuery & {
-      /** 手机号 */
-      mobile?: string;
-      /** 验证码 */
-      code?: string;
-      /** 社交票据 */
-      socialTicket?: string;
-    };
+  type PeakLevelPageQuery = {
+    cursor?: string;
+    direction?: string;
+    current?: number;
+    size?: number;
+    sorted?: string;
+    sortColumn?: string;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+    asc?: boolean;
+    desc?: boolean;
+  };
+
+  type PeakLevelSaveQuery = {
+    /** 自增 ID */
+    id?: number;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+  };
+
+  type PeakLevelVO = {
+    /** 创建时间 */
+    createTime?: string;
+    /** 更新时间 */
+    updateTime?: string;
+    /** 自增 ID */
+    id?: number;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+  };
+
+  type PeakPageQuery = {
+    cursor?: string;
+    direction?: string;
+    current?: number;
+    size?: number;
+    sorted?: string;
+    sortColumn?: string;
+    /** 名称 */
+    name?: string;
+    asc?: boolean;
+    desc?: boolean;
+  };
+
+  type PeakSaveQuery = {
+    /** 自增 ID */
+    id?: number;
+    /** 名称 */
+    name?: string;
+  };
+
+  type PeakStagePageQuery = {
+    cursor?: string;
+    direction?: string;
+    current?: number;
+    size?: number;
+    sorted?: string;
+    sortColumn?: string;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+    /** 经验值-最小 */
+    expMin?: number;
+    /** 经验值-最大 */
+    expMax?: number;
+    asc?: boolean;
+    desc?: boolean;
+  };
+
+  type PeakStageSaveQuery = {
+    /** 自增 ID */
+    id?: number;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+    /** 经验值 */
+    exp?: number;
+  };
+
+  type PeakStageVO = {
+    /** 创建时间 */
+    createTime?: string;
+    /** 更新时间 */
+    updateTime?: string;
+    /** 自增 ID */
+    id?: number;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+    /** 经验值 */
+    exp?: number;
+  };
+
+  type PeakVO = {
+    /** 创建时间 */
+    createTime?: string;
+    /** 更新时间 */
+    updateTime?: string;
+    /** 自增 ID */
+    id?: number;
+    /** 名称 */
+    name?: string;
+  };
 
   type postConfigListPrefixApiParams = {
     prefix: string;
@@ -238,13 +454,6 @@ declare namespace SectApi {
     prefix: string;
   };
 
-  type Qq =
-    // #/components/schemas/AuthTicketQuery
-    AuthTicketQuery & {
-      /** accessToken */
-      accessToken?: string;
-    };
-
   type RolePageQuery = {
     cursor?: string;
     direction?: string;
@@ -353,6 +562,43 @@ declare namespace SectApi {
     content?: string;
   };
 
+  type UserLevelPageQuery = {
+    cursor?: string;
+    direction?: string;
+    current?: number;
+    size?: number;
+    sorted?: string;
+    sortColumn?: string;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+    asc?: boolean;
+    desc?: boolean;
+  };
+
+  type UserLevelSaveQuery = {
+    /** 自增 ID */
+    id?: number;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+  };
+
+  type UserLevelVO = {
+    /** 创建时间 */
+    createTime?: string;
+    /** 更新时间 */
+    updateTime?: string;
+    /** 自增 ID */
+    id?: number;
+    /** 名称 */
+    name?: string;
+    /** 等级 */
+    level?: number;
+  };
+
   type UserPageQuery = {
     cursor?: string;
     direction?: string;
@@ -360,33 +606,94 @@ declare namespace SectApi {
     size?: number;
     sorted?: string;
     sortColumn?: string;
+    /** 所属峰 */
+    peakId?: number;
+    /** 用户名称 */
+    name?: string;
+    /** 头像 */
+    avatar?: string;
+    /** 手机号 */
+    mobile?: string;
+    /** 用户名 */
+    nickname?: string;
+    /** 会员等级 */
+    userLevel?: number;
+    /** 宗门等级 */
+    factionLevel?: number;
+    /** 紫币-最小值 */
+    purpleCoinMin?: number;
+    /** 紫币-最大值 */
+    purpleCoinMax?: number;
+    /** 紫晶-最小值 */
+    purpleSparMin?: number;
+    /** 紫晶-最大值 */
+    purpleSparMax?: number;
+    /** 状态 */
+    status?: number;
     asc?: boolean;
     desc?: boolean;
   };
 
+  type UserPwdEditQuery = {
+    /** 旧密码,若未设置过则为空 */
+    oldPwd?: string;
+    /** 新密码 */
+    newPwd?: string;
+  };
+
+  type UserSaveQuery = {
+    /** 自增 ID */
+    id?: number;
+    /** 所属峰 */
+    peakId?: number;
+    /** 用户名称 */
+    name?: string;
+    /** 头像 */
+    avatar?: string;
+    /** 手机号 */
+    mobile?: string;
+    /** 用户名 */
+    nickname?: string;
+    /** 会员等级 */
+    userLevel?: number;
+    /** 宗门等级 */
+    factionLevel?: number;
+    /** 紫币 */
+    purpleCoin?: number;
+    /** 紫晶 */
+    purpleSpar?: number;
+    /** 状态 */
+    status?: number;
+  };
+
   type UserVO = {
     /** 创建时间 */
     createTime?: string;
     /** 更新时间 */
     updateTime?: string;
-    /** 用户ID */
+    /** 自增 ID */
     id?: number;
+    /** 所属峰 */
+    peakId?: number;
+    /** 用户名称 */
+    name?: string;
+    /** 头像 */
+    avatar?: string;
     /** 手机号 */
     mobile?: string;
     /** 用户名 */
     nickname?: string;
-    /** 头像-缩略图 */
-    avatarThumbnail?: string;
-    /** 头像-原图 */
-    avatarOriginal?: string;
-  };
-
-  type WeiBo =
-    // #/components/schemas/AuthTicketQuery
-    AuthTicketQuery & {
-      /** accessToken */
-      accessToken?: string;
-      /** refreshToken */
-      refreshToken?: string;
-    };
+    /** 会员等级 */
+    userLevel?: number;
+    /** 宗门等级 */
+    factionLevel?: number;
+    /** 紫币 */
+    purpleCoin?: number;
+    /** 紫晶 */
+    purpleSpar?: number;
+    /** 状态 */
+    status?: 0 | 1;
+    /** 是否设置了密码 */
+    hasPwd?: boolean;
+  };
 }

+ 15 - 0
src/services/swagger/userAdmin.ts

@@ -46,3 +46,18 @@ export async function deleteUserRemoveApi(
     ...(options || {}),
   });
 }
+
+/** 保存用户 POST /apis/admin/user/save */
+export async function postUserSaveApi(
+  body: SectApi.UserSaveQuery,
+  options?: { [key: string]: any },
+) {
+  return request<boolean>('/apis/admin/user/save', {
+    method: 'POST',
+    headers: {
+      'Content-Type': 'application/json',
+    },
+    data: body,
+    ...(options || {}),
+  });
+}

+ 15 - 0
src/services/swagger/yonghuqiandaokehuduanApi.ts

@@ -10,6 +10,21 @@ export async function getUserSignCntApi(options?: { [key: string]: any }) {
   });
 }
 
+/** 查询用户当天是否签到 GET /apis/clients/user_sign/is_sign */
+export async function getUserSignIsSignApi(
+  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
+  params: SectApi.getUserSignIsSignApiParams,
+  options?: { [key: string]: any },
+) {
+  return request<boolean>('/apis/clients/user_sign/is_sign', {
+    method: 'GET',
+    params: {
+      ...params,
+    },
+    ...(options || {}),
+  });
+}
+
 /** 获取用户签到列表 GET /apis/clients/user_sign/list */
 export async function getUserSignListApi(options?: { [key: string]: any }) {
   return request<number[]>('/apis/clients/user_sign/list', {