Logo white

BJ_web_developers / dyitoc

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • dyitoc
  • src
  • mock
  • pda.js
  • 添加mock 数据
    cb40959e
    liuqimichale authored
    2018-11-29 15:10:59 +0800  
    Browse Code »
pda.js 338 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
import Mock from 'mockjs'

const Random = Mock.Random;
const list = [];

for (let i = 0; i < 10; i++) {
  let newList = {
    title: Random.csentence(5, 30),
    date: Random.date() + ' ' + Random.time()
  }
  list.push(newList)
}

export default {
  getList: () => {
    return {
      total: list.length,
      items: list
    }
  }
}