| | |
| | | * @param keyword 关键字,若关键字为空白,则按照热门的逻辑搜索 |
| | | * @param type 查询类型,包括[1:法规文件,2:法规条目,3:执法案例,4:环保问题],不填写时表示查询所有类型的前5条 |
| | | */ |
| | | search(obj, cPage = 1) { |
| | | search(obj, cPage = 1, perPage = this.data.perPage) { |
| | | this.obj = obj |
| | | this.setData({loading: true}) |
| | | const t = setTimeout(() => { this.setData({loading: false}) }, 10000); |
| | | var that = this |
| | | const {keyword, type} = obj |
| | | consultservice.searchLaw(app.globalData.accessToken.userId, keyword, cPage, app.globalData.perPage, { |
| | | consultservice.searchLaw(app.globalData.accessToken.userId, keyword, cPage, perPage, { |
| | | onPage(head) { |
| | | that.setData({ |
| | | cPage: head.page, |
| | | tPage: head.totalPage, |
| | | perPage: perPage |
| | | }) |
| | | }, |
| | | success(res) { |