fix: mock数据

This commit is contained in:
hongxinzz
2023-05-04 14:19:31 +08:00
parent c72ac07de9
commit 8bdac7152f
6 changed files with 239 additions and 199 deletions

View File

@@ -1,7 +1,7 @@
import { config } from '@/config/axios/config'
import config from '@/config/axios/config'
import { MockMethod } from 'vite-plugin-mock'
const { result_code } = config
const { code } = config
const timeout = 1000
@@ -30,8 +30,10 @@ export default [
timeout,
response: () => {
return {
code: result_code,
data: dictObj
data: {
code: code,
data: dictObj
}
}
}
},
@@ -42,21 +44,23 @@ export default [
timeout,
response: () => {
return {
code: result_code,
data: [
{
label: 'test1',
value: 0
},
{
label: 'test2',
value: 1
},
{
label: 'test3',
value: 2
}
]
data: {
code: code,
data: [
{
label: 'test1',
value: 0
},
{
label: 'test2',
value: 1
},
{
label: 'test3',
value: 2
}
]
}
}
}
}