//Mockjs模板示例-JSON格式
{
"total": 20,
"pageNo": 1,
"code": 0,
"message": "@cparagraph()",
"result|1-20": [//随机生成1-20条数据
{
"id|+1": 1,//自增id--初始值为1
"title": "@ctitle",//加c表示Chinese 中文标题
"subtitle|1-6": "我是副标题 ",//模拟名称
"content": "@cparagraph()",//模拟文本
"phone" : "@phone",
"date": "@date('yyyy-MM-dd')",//模拟时间
"image": "@image('200x100', '#894FC4', '#FFF','png','')",//模拟图片-//image( size, background, foreground, format, text )
"userName": "@cname",//加c表示中文名字
"usersNum": "@integer(0,100)",//数量-Random.integer(min,max)
"color": "@color",//模拟色值
"city": "@city(true)", //中国城市
"age|1-100": 100,//模拟1~100随机整数,100只是用来确定类型
"isMale|1": true, // 布尔值
"url": "@url()",//模拟url
"guid": "@guid",//唯一id
"time": "@time",//时间
"now": "@now",//当前时间
"brother|1": ["Alice", "kimi"], // 随机选取 1 个元素
"sister|+1": ["Alice", "kimi", "lily"], // array中顺序选取元素作为结果
"friends|2": ["Alice", "kimi"], // 重复2次属性值生成一个新数组
"string|3": "★"//3表示后面属性值重复次数
}
]
}