forked from nsjcy/frontEnd/nsjcy

liuwh
2020-04-27 4e44bc1fd7806a6c1611302120882b91d96640b5
SunshineLnsMinApp/pages/flcx/flcx.js
@@ -1,9 +1,9 @@
// pages/dxal/dxal.js
import {
  $startWuxRefresher,
  $stopWuxRefresher,
  $stopWuxLoader
} from '../../templeteDist/wuxDist/index';
// import {
//   $startWuxRefresher,
//   $stopWuxRefresher,
//   $stopWuxLoader
// } from '../../templeteDist/wuxDist/index';
var app = getApp();
@@ -28,24 +28,23 @@
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    $startWuxRefresher();
    this.showList()
  },
  showList: function () {
    var that = this;
    // wx.showLoading();
    wx.showLoading();
    wx.request({
      url: app.globalData.url + '/api/v1/searchLaw/search?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)
        } else {
          wx.showToast({
            title: res.data.msg,
@@ -112,7 +111,7 @@
    }, () => {});
  },
  onChange(e) {
  searchIcon(e) {
    console.log('onChange', e)
    this.setData({
      value: e.detail.value,
@@ -122,14 +121,12 @@
    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)