From ed9dbed48b9d7dd0ff662e50db94e4706ce5342e Mon Sep 17 00:00:00 2001
From: liuwh <hugeinfo123>
Date: Sat, 09 May 2020 11:24:55 +0800
Subject: [PATCH] 小程序心里疏导
---
SunshineLnsMinApp/pages/zscqdxal/zscqdxal.js | 53 ++++++++++++++++++++++++++---------------------------
1 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/SunshineLnsMinApp/pages/zscqdxal/zscqdxal.js b/SunshineLnsMinApp/pages/zscqdxal/zscqdxal.js
index da82fe5..e0b32c7 100644
--- a/SunshineLnsMinApp/pages/zscqdxal/zscqdxal.js
+++ b/SunshineLnsMinApp/pages/zscqdxal/zscqdxal.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();
@@ -24,28 +24,26 @@
scrollTop: 0,
},
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- $startWuxRefresher();
+
+ onShow: function(options) {
+ this.showList()
},
- showList: function () {
+ 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();
+ 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)
+ // $stopWuxRefresher()
+ // $stopWuxLoader('#wux-refresher', this, true)
} else {
wx.showToast({
title: res.data.msg,
@@ -86,7 +84,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 +92,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 +120,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)
@@ -139,5 +135,8 @@
},
onCancel(e) {
console.log('onCancel', e)
+ this.setData({
+ value: '',
+ })
},
})
\ No newline at end of file
--
Gitblit v1.8.0