
import moment from 'moment'
const head = {
  errorCode: '0',
  data: null
}
export default [
  {
    url: '/table/getFullData',
    type: 'post',
    response: (req, res, next) => {
      // req.body 可获取post参数
      // req.query 可获取get参数
      return {
        body: [
          {
            key: '0',
            name: '赵生',
            age: 59,
            address: '中国重庆',
            province: '重庆',
            city: '重庆',
          },
          {
            key: '1',
            name: '黄生',
            age: 32,
            address: '中国山东',
            province: '山东',
            city: '济南',
          },
          {
            key: '2',
            name: '李先生',
            age: 40,
            address: '中国浙江',
            province: '浙江',
            city: '杭州',
          },
          {
            key: '21',
            name: '李先生',
            age: 40,
            address: '中国四川',
            province: '四川',
            city: '成都',
          },
          {
            key: '3',
            name: '张三',
            age: 25,
            address: '中国北京',
            province: '北京',
            city: '北京',
          },
          {
            key: '4',
            name: '李四',
            age: 10,
            address: '中国北京',
            province: '北京',
            city: '北京',
          },
          {
            key: '5',
            name: '唐某',
            age: 30,
            address: '中国广东',
            province: '广东',
            city: '广州',
          },
          {
            key: '6',
            name: '唐某',
            age: 30,
            address: '中国广东',
            province: '广东',
            city: '广州',
          },
        ],
        head 
      }
    }
  }, {
    url: '/table/getTreeData',
    type: 'post',
    response: (req, res, next) => {
      // req.body 可获取post参数
      // req.query 可获取get参数
      return {
        body: [
          {
            key: '1',
            name: '黄家',
            age: 32,
            address: '中国山东',
            children: [
              {
                key: 11,
                name: '黄二',
                age: 22,
                address: '山东青岛',
              }, {
                key: 12,
                name: '黄三',
                age: 22,
                address: '山东烟台',
              }, {
                key: 13,
                name: '黄六',
                age: 22,
                address: '山东秦皇岛',
              },
            ]
          },
          {
            key: '2',
            name: '李先生家',
            age: 40,
            address: '中国四川',
            children: [
              {
                key: 21,
                name: '李某八',
                age: 22,
                address: '四川成都',
              }, {
                key: 22,
                name: '李某一',
                age: 22,
                address: '四川绵阳',
              }, {
                key: 23,
                name: '李某三',
                age: 22,
                address: '山东秦皇岛',
              },
            ]
          },
          {
            key: '3',
            name: '张三家',
            age: 25,
            address: '中国北京',
            children: [
              {
                key: 31,
                name: '张某某',
                age: 22,
                address: '北京宣武门',
              }, {
                key: 32,
                name: '张某凯',
                age: 22,
                address: '北京天安门',
              }
            ]
          },
          {
            key: '4',
            name: '李四',
            age: 10,
            address: '中国北京',
          },
          {
            key: '5',
            name: '唐某',
            age: 30,
            address: '中国广东',
          },
        ],
        head 
      }
    }
  }

]
