123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- module.exports = function () {
- var faker = require("faker");
- faker.locale = "zh_CN";
- var _ = require("lodash");
- return {
- "index-count":{
- code:200,
- data:{
- wait_edit:(faker.random.number()%100)+1,
- wait_sign:(faker.random.number()%100)+1,
- already_active:(faker.random.number()%100)+1,
- already_sign:(faker.random.number()%100)+1,
- temp:(faker.random.number()%100)+1,
- out_date:(faker.random.number()%100)+1
- }
- },
- contract:{
- code:200,
- data:_.times(20,function (n) {
- return _.times(5,function (j) {
- return {
- id:n*10+j,
- status:(j%2===0?'待签署':'已签署'),
- title:faker.commerce.productName(),
- date:faker.date.recent(),
- }
- })
- })
- },
- contact:{
- code:200,
- data:_.times(20,function (n) {
- return{
- username:faker.name.firstName()+faker.name.lastName(),
- userRealname:'已实名',
- phone:faker.phone.phoneNumber('1##########'),
- userImg:faker.image.avatar()
- }
- })
- },
- 'current-user':{
- code:200,
- data:{
- username:faker.name.firstName()+faker.name.lastName(),
- userRealname:'已实名',
- phone:faker.phone.phoneNumber('1##########'),
- userImg:faker.image.avatar()
- }
- },
- 'switch-user':{
- code:200,
- data:_.times(5,function (n) {
- return{
- username:((faker.random.number()%100>50)?faker.name.firstName()+faker.name.lastName():faker.company.companyName()),
- isRealname:'已实名',
- }
- })
- }
- }
- }
|