mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增图片 mock 地址
This commit is contained in:
@@ -8,6 +8,7 @@ export const rankListUrl = '/mock/rankList'
|
||||
export const numberFloatUrl = '/mock/number/float'
|
||||
export const numberIntUrl = '/mock/number/int'
|
||||
export const textUrl = '/mock/text'
|
||||
export const imageUrl = '/mock/image'
|
||||
|
||||
const mockObject: MockMethod[] = [
|
||||
{
|
||||
@@ -37,6 +38,11 @@ const mockObject: MockMethod[] = [
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchText,
|
||||
},
|
||||
{
|
||||
url: imageUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchImage,
|
||||
},
|
||||
]
|
||||
|
||||
export default mockObject
|
||||
|
||||
@@ -80,4 +80,10 @@ export default {
|
||||
msg: '请求成功',
|
||||
data: '@paragraph(1, 10)',
|
||||
},
|
||||
fetchImage: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: `https://robohash.org/${Math.round(Math.random()*10)}`,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user