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.

17 lines
380 B

// https://github.com/pengzhanbo/vite-plugin-mock-dev-server
import { defineMock } from 'vite-plugin-mock-dev-server'
import proses from '../data'
export default defineMock({
url: '/api/project/prose',
delay: 100,
body: () => {
const prose = proses.value[Math.floor(Math.random() * 8)]
return {
code: 0,
data: prose,
msg: 'success',
}
},
})