var Mock = require('mockjs');
module.exports = function () {
return {
notes : Mock.mock({
'note|20-50': [{
'id': '@id()',
'topic': '@ctitle()',
'content': '@cparagraph()',
'create': '@date("yyyy-MM-dd")',
'modification': '@date("yyyy-MM-dd")',
'img': '@image(200x200,@hex)',
'time': '@time()',
'type|1': ['Html','CSS','PHP'],
'ulr': '@url("http","localhost:8080")'
}]
})
};
}
注意:在@image图片的时候,宽高200*200
不能用*
号,而是要用字母的x
,大小写都可以。