| | |
| | | |
| | | module.exports = { |
| | | //查找守法动态 |
| | | getLawRegulations: function (userId, page, sceneTypeId, fun) { |
| | | getLawRegulations: function (userId, page, condition, fun, perPage = 30) { |
| | | let cb = { |
| | | url: `/laws/condition/${userId}`, |
| | | params: { |
| | | page: page, |
| | | per_page: 30 |
| | | per_page: perPage |
| | | }, |
| | | data: { |
| | | sceneTypeId: sceneTypeId |
| | | } |
| | | data: condition |
| | | } |
| | | Object.assign(cb, fun) |
| | | |
| | | let fun1 = util.deepCopy(cb) |
| | | fun1.success = function (res) { |
| | | res.forEach(r => { |
| | | r.lrPicurl = $f.basePicUrl + r.lrPicurl |
| | | r.lrBodyurl = $f.baseFileUrl + r.lrBodyurl |
| | | }); |
| | | cb.success(res) |
| | | } |
| | | |
| | | $f.post(fun1) |
| | | }, |
| | | |
| | | //获取资源所在系列 |
| | | getSerise: function (userId, seriesId, fun) { |
| | | let cb = { |
| | | url: `/laws/series`, |
| | | params: { |
| | | userId: userId, |
| | | seriesId: seriesId |
| | | }, |
| | | } |
| | | Object.assign(cb, fun) |
| | | |