You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
599 B
29 lines
599 B
import {MockMethod} from 'vite-plugin-mock';
|
|
import {sendCodeApi} from "../src/interface";
|
|
|
|
|
|
const Mock = require('mockjs')
|
|
|
|
export default [
|
|
{
|
|
url: sendCodeApi,
|
|
method: 'post',
|
|
response: ({ query }) => {
|
|
return Mock.mock({
|
|
'result':'OK',
|
|
'message':'验证码发送成功'
|
|
})
|
|
},
|
|
},
|
|
{
|
|
url: '/api/post',
|
|
method: 'post',
|
|
timeout: 2000,
|
|
response: {
|
|
code: 0,
|
|
data: {
|
|
name: 'vben',
|
|
},
|
|
},
|
|
},
|
|
] as MockMethod[]; |