Blame view
src/mock/modules/log.js
1.24 KB
e7ab2c09a
![]() |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
/* * 操作日志模块 */ // 分页查询 export function findPage(params) { let findPageData = { "code": 200, "msg": null, "data": {} } let pageNum = 1 let pageSize = 8 if(params !== null) { // pageNum = params.pageNum } if(params !== null) { // pageSize = params.pageSize } let content = this.getContent(pageNum, pageSize) findPageData.data.pageNum = pageNum findPageData.data.pageSize = pageSize findPageData.data.totalSize = 50 findPageData.data.content = content return { url: 'log/findPage', type: 'post', data: findPageData } } export function getContent(pageNum, pageSize) { let content = [] for(let i=0; i<pageSize; i++) { let obj = {} let index = ((pageNum - 1) * pageSize) + i + 1 obj.id = index obj.userName = 'admin' + index obj.operation = 'operation' obj.method = 'com.louis.controller.SysUserController.findPage' obj.params = '{"pageNum":"1","pageSize":"8"}' obj.time = 12 obj.ip = '127.0.0.1' obj.remark = 'remark log' + index if(i % 2 === 0) { } obj.createBy= 'admin' obj.createTime= '2018-08-14 11:11:11' obj.createBy= 'admin' obj.createTime= '2018-09-14 12:12:12' content.push(obj) } return content } |