From 326bdb73c590cb669af344cfdc4ee6f02bf1b0a8 Mon Sep 17 00:00:00 2001
From: Mr Ke <kelq@hugeinfo.com.cn>
Date: Wed, 27 May 2020 10:16:11 +0800
Subject: [PATCH] 链接指纹是杯页面
---
SunshineLnsMinApp/pages/flcx/flcx.js | 133 +++++++++++++++++++++++++++++++++++++++++---
1 files changed, 124 insertions(+), 9 deletions(-)
diff --git a/SunshineLnsMinApp/pages/flcx/flcx.js b/SunshineLnsMinApp/pages/flcx/flcx.js
index 8da6e22..afed36f 100644
--- a/SunshineLnsMinApp/pages/flcx/flcx.js
+++ b/SunshineLnsMinApp/pages/flcx/flcx.js
@@ -1,5 +1,11 @@
-// pages/flcx/flcx.js
-const app = getApp();
+// pages/dxal/dxal.js
+// import {
+// $startWuxRefresher,
+// $stopWuxRefresher,
+// $stopWuxLoader
+// } from '../../templeteDist/wuxDist/index';
+
+var app = getApp();
Page({
@@ -7,19 +13,128 @@
* 页面的初始数据
*/
data: {
- CustomBar: app.globalData.CustomBar,
- wordList: ['标签', '标签', '标签', '标签', '标签', '标签', '标签', '标签', '标签'],
- items: [...new Array(20)].map((n, i) => ({
- title: `Pull down ${i}`,
- content: 'Wux Weapp'
- }))
+ dongtai1_1: app.globalData.imgUrl + '/image/dongtai1-1.jpg',
+ dongtai2_1: app.globalData.imgUrl + '/image/dongtai2-1.jpg',
+ dongtai3_1: app.globalData.imgUrl + '/image/dongtai3-1.jpg',
+ inputShowed: false,
+ inputVal: "",
+ value: '知识产权',
+ items: [],
+ count: 1000,
+ scrollTop: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
+ this.showList()
+ },
- }
+ showList: function() {
+ var that = this;
+ 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();
+ 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]
+ })
+
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ })
+ }
+ }
+ })
+ },
+ onPageScroll(e) {
+ this.setData({
+ scrollTop: e.scrollTop
+ })
+ },
+ onRefresh() {
+ console.log('onRefresh')
+ // this.setData({
+ // count: 10
+ // })
+
+ this.showList();
+
+
+ // setTimeout(() => {
+ // this.setData({
+ // items: this.getList()
+ // })
+ // $stopWuxRefresher()
+ // }, 1000)
+ },
+ onLoadmore() {
+ console.log('onLoadmore')
+ this.showList();
+ },
+
+ getList: (count = 10, step = 0) => [...new Array(count)].map((n, i) => ({
+ title: `Pull down ${i + step}`,
+ content: 'Wux Weapp'
+ })),
+
+ linkFunction: function(event) {
+ var str = event.currentTarget.dataset['str'];
+ var id = event.currentTarget.dataset['id'];
+ wx.navigateTo({
+ url: '../' + str + '/' + str + '?id=' + id
+ })
+ },
+
+ showInput: function() {
+ this.setData({
+ inputShowed: true
+ });
+ },
+
+ hideInput: function() {
+ this.setData({
+ inputVal: "",
+ inputShowed: false
+ });
+ },
+ clearInput: function() {
+ this.setData({
+ inputVal: ""
+ }, () => {});
+ },
+
+ searchIcon(e) {
+ console.log('onChange', e)
+ this.setData({
+ value: e.detail.value,
+ })
+ },
+ onFocus(e) {
+ console.log('onFocus', e)
+ },
+ onBlur(e) {
+ console.log('onBlur', e);
+ this.showList()
+ },
+ onConfirm(e) {
+ console.log('onConfirm', e);
+ this.showList()
+ },
+ onClear(e) {
+ console.log('onClear', e)
+ this.setData({
+ value: '',
+ })
+ },
+ onCancel(e) {
+ console.log('onCancel', e)
+ },
})
\ No newline at end of file
--
Gitblit v1.8.0