| | |
| | | // pages/dxal/dxal.js |
| | | import { |
| | | $startWuxRefresher, |
| | | $stopWuxRefresher, |
| | | $stopWuxLoader |
| | | } from '../../templeteDist/wuxDist/index'; |
| | | // import { |
| | | // $startWuxRefresher, |
| | | // $stopWuxRefresher, |
| | | // $stopWuxLoader |
| | | // } from '../../templeteDist/wuxDist/index'; |
| | | |
| | | var app = getApp(); |
| | | |
| | |
| | | scrollTop: 0, |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad: function (options) { |
| | | $startWuxRefresher(); |
| | | |
| | | onShow: function(options) { |
| | | this.showList() |
| | | }, |
| | | |
| | | showList: function () { |
| | | var that = this; |
| | | // wx.showLoading(); |
| | | wx.showLoading(); |
| | | wx.request({ |
| | | url: app.globalData.url + '/api/v1/searchLaw/caseSearch?page=1&size=' + this.data.count + '&words=' + this.data.value, |
| | | success: function (res) { |
| | | // wx.hideLoading(); |
| | | wx.hideLoading(); |
| | | console.log('res.data.data', res.data.data.data) |
| | | console.log('res', res) |
| | | if (res.data.code == 0) { |
| | | that.setData({ |
| | | items: [...res.data.data.data] |
| | | }) |
| | | $stopWuxRefresher() |
| | | $stopWuxLoader('#wux-refresher', this, true) |
| | | // $stopWuxRefresher() |
| | | // $stopWuxLoader('#wux-refresher', this, true) |
| | | } else { |
| | | wx.showToast({ |
| | | title: res.data.msg, |
| | |
| | | }, () => {}); |
| | | }, |
| | | |
| | | onChange(e) { |
| | | searchIcon(e) { |
| | | console.log('onChange', e) |
| | | this.setData({ |
| | | value: e.detail.value, |
| | |
| | | console.log('onFocus', e) |
| | | }, |
| | | onBlur(e) { |
| | | console.log('onBlur', e) |
| | | this.setData({ |
| | | value: e.detail.value |
| | | }) |
| | | this.showList(); |
| | | console.log('onBlur', e); |
| | | this.showList() |
| | | }, |
| | | onConfirm(e) { |
| | | console.log('onConfirm', e) |
| | | console.log('onConfirm', e); |
| | | this.showList() |
| | | }, |
| | | onClear(e) { |
| | | console.log('onClear', e) |
| | |
| | | }, |
| | | onCancel(e) { |
| | | console.log('onCancel', e) |
| | | this.setData({ |
| | | value: '', |
| | | }) |
| | | }, |
| | | }) |