-
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
b0ff508
commit 1233701
Showing
5 changed files
with
79 additions
and
13 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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# 访问地址 | ||
http://111.229.138.125/admin/index.html | ||
|
||
# 目录结构 | ||
|
||
``` | ||
|
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,42 @@ | ||
import { MockMethod } from 'vite-plugin-mock' | ||
|
||
// @ts-ignore | ||
const testMock: MockMethod = [ | ||
{ | ||
url: '/api/login', | ||
method: 'post', | ||
timeout: 1000, | ||
response: ({ data }: any) => { | ||
return { | ||
code: 0, | ||
data: { | ||
token: 'thisIsToken' | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
url: '/api/perm', | ||
method: 'get', | ||
timeout: 1000, | ||
response: ({ data }: any) => { | ||
console.log('登录请求数据 =>', data) | ||
return { | ||
code: 0, | ||
data: ['perm-1'] | ||
} | ||
} | ||
}, | ||
{ | ||
url: '/api/logout', | ||
method: 'get', | ||
timeout: 1000, | ||
response: () => { | ||
return { | ||
code: 0 | ||
} | ||
} | ||
} | ||
] | ||
|
||
export default testMock |
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
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