From 4e44bc1fd7806a6c1611302120882b91d96640b5 Mon Sep 17 00:00:00 2001 From: liuwh <hugeinfo123> Date: Mon, 27 Apr 2020 17:50:19 +0800 Subject: [PATCH] bug修复 --- SunshineLnsMinApp/pages/flcx/flcx.js | 45 +++++++++++++++++++++------------------------ 1 files changed, 21 insertions(+), 24 deletions(-) diff --git a/SunshineLnsMinApp/pages/flcx/flcx.js b/SunshineLnsMinApp/pages/flcx/flcx.js index b8fd8f4..afed36f 100644 --- a/SunshineLnsMinApp/pages/flcx/flcx.js +++ b/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(); @@ -27,25 +27,24 @@ /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { - $startWuxRefresher(); + onLoad: function(options) { + this.showList() }, - showList: function () { + 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(); + success: function(res) { + 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, @@ -86,7 +85,7 @@ content: 'Wux Weapp' })), - linkFunction: function (event) { + linkFunction: function(event) { var str = event.currentTarget.dataset['str']; var id = event.currentTarget.dataset['id']; wx.navigateTo({ @@ -94,25 +93,25 @@ }) }, - showInput: function () { + showInput: function() { this.setData({ inputShowed: true }); }, - hideInput: function () { + hideInput: function() { this.setData({ inputVal: "", inputShowed: false }); }, - clearInput: function () { + clearInput: function() { this.setData({ inputVal: "" }, () => {}); }, - 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) -- Gitblit v1.8.0