2020-06-15 17:07:49 +08:00
|
|
|
const Mock = require('mockjs')
|
2019-02-20 13:16:24 +08:00
|
|
|
|
2019-04-19 20:41:52 +08:00
|
|
|
const data = Mock.mock({
|
|
|
|
'items|30': [{
|
|
|
|
id: '@id',
|
|
|
|
title: '@sentence(10, 20)',
|
|
|
|
'status|1': ['published', 'draft', 'deleted'],
|
|
|
|
author: 'name',
|
|
|
|
display_time: '@datetime',
|
|
|
|
pageviews: '@integer(300, 5000)'
|
|
|
|
}]
|
|
|
|
})
|
|
|
|
|
2020-06-15 17:07:49 +08:00
|
|
|
module.exports = [
|
2019-04-19 20:41:52 +08:00
|
|
|
{
|
2020-01-09 20:53:06 +08:00
|
|
|
url: '/vue-admin-template/table/list',
|
2019-04-19 20:41:52 +08:00
|
|
|
type: 'get',
|
|
|
|
response: config => {
|
|
|
|
const items = data.items
|
|
|
|
return {
|
|
|
|
code: 20000,
|
|
|
|
data: {
|
|
|
|
total: items.length,
|
|
|
|
items: items
|
|
|
|
}
|
|
|
|
}
|
2019-02-20 13:16:24 +08:00
|
|
|
}
|
|
|
|
}
|
2019-04-19 20:41:52 +08:00
|
|
|
]
|