21 lines
399 B
JavaScript
21 lines
399 B
JavaScript
|
import Mock from 'mockjs'
|
||
|
|
||
|
export default {
|
||
|
list: () => {
|
||
|
const items = Mock.mock({
|
||
|
'items|30': [{
|
||
|
id: '@id',
|
||
|
title: '@sentence(10, 20)',
|
||
|
'status|1': ['published', 'draft', 'deleted'],
|
||
|
author: 'name',
|
||
|
display_time: '@datetime',
|
||
|
pageviews: '@integer(300, 5000)'
|
||
|
}]
|
||
|
})
|
||
|
return {
|
||
|
code: 20000,
|
||
|
data: items
|
||
|
}
|
||
|
}
|
||
|
}
|