Skip to content

Commit

Permalink
fix(api): 修复userInfoApi类型检查错误
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Nov 30, 2022
1 parent 3c23293 commit 77229f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export interface UserInfoResult {
name: string; // 名称
username: string; // 用户名
}
export function userInfoApi(returnAxios = false, noLoading = true) {
return request<UserInfoResult, [], typeof returnAxios>(
export function userInfoApi<T extends boolean = false>(returnAxios:T = false as T, noLoading = true) {
return request<UserInfoResult, [], T>(
() => ({
url: Api.USER_INFO,
method: 'get',
Expand Down

0 comments on commit 77229f6

Please sign in to comment.