-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7beb06
commit 213b24f
Showing
12 changed files
with
191 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NEXT_PUBLIC_BASE_URL=http://api.promonkeyli.top:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
EXT_PUBLIC_BASE_URL=http://127.0.0.1:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import { generateService } from "@umijs/openapi"; | ||
|
||
const BASE_URL = "http://api.promonkeyli.top:8080"; | ||
|
||
generateService({ | ||
schemaPath: "http://127.0.0.1:8001/swagger/doc.json", | ||
requestLibPath: 'import request from "@/utils/http"', | ||
schemaPath: `${BASE_URL}/swagger/doc.json`, | ||
serversPath: "src", | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
// @ts-ignore | ||
/* eslint-disable */ | ||
// @ts-ignore | ||
import { request } from "umi"; | ||
import request from '@/utils/http'; | ||
|
||
/** 用户登录 POST /login */ | ||
export async function postLogin(body: API.User, options?: { [key: string]: any }) { | ||
return request<API.User>('/login', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
data: body, | ||
...(options || {}), | ||
}); | ||
} | ||
|
||
/** 我的工具项新增 POST /tool/add */ | ||
export async function postAdd( | ||
body: API.Tool, | ||
options?: { [key: string]: any }, | ||
) { | ||
return request<API.Tool>("/tool/add", { | ||
method: "POST", | ||
export async function postToolAdd(body: API.Tool, options?: { [key: string]: any }) { | ||
return request<API.Tool>('/tool/add', { | ||
method: 'POST', | ||
headers: { | ||
"Content-Type": "application/json", | ||
'Content-Type': 'application/json', | ||
}, | ||
data: body, | ||
...(options || {}), | ||
}); | ||
} | ||
|
||
/** 我的工具信息列表获取 GET /tool/list */ | ||
export async function getList(options?: { [key: string]: any }) { | ||
return request<API.Tool>("/tool/list", { | ||
method: "GET", | ||
export async function getToolList(options?: { [key: string]: any }) { | ||
return request<API.Tool>('/tool/list', { | ||
method: 'GET', | ||
...(options || {}), | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,9 @@ declare namespace API { | |
name?: string; | ||
url?: string; | ||
}; | ||
|
||
type User = { | ||
password?: string; | ||
username?: string; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.