From d9cb8e57537fe5764018f53a224f6afceec64f9e Mon Sep 17 00:00:00 2001
From: liuwh <liuwh@hugeinfo.com.cn>
Date: Tue, 24 Mar 2020 09:22:06 +0800
Subject: [PATCH] 提交
---
SunshineLnsMinApp/pages/law2Publicity/law2Publicity.js | 37 ++++++++++++++++---------------------
1 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/SunshineLnsMinApp/pages/law2Publicity/law2Publicity.js b/SunshineLnsMinApp/pages/law2Publicity/law2Publicity.js
index d34d9e0..e520aea 100644
--- a/SunshineLnsMinApp/pages/law2Publicity/law2Publicity.js
+++ b/SunshineLnsMinApp/pages/law2Publicity/law2Publicity.js
@@ -6,6 +6,7 @@
* 页面的初始数据
*/
data: {
+ user: app.globalData.imgUrl + '/image/user.svg',
dataSet: [],
isHideLoadMore: true, //loading样式
isHideMorebtn: true, //更多按钮样式
@@ -16,24 +17,25 @@
/**
* 生命周期函数--监听页面加载
*/
- onLoad: function(options) {
+ onLoad: function (options) {
this.setData({
isHideLoadMore: false
}, this.showList(options.id))
},
- showList: function(id) {
+ showList: function (id) {
var that = this;
// d46ee05998ce48f893a63623cbde6875
wx.request({
- url: app.globalData.url + '/api/article/legalServiceQuery?page=1&size=' + that.data.size + '&ownerId=' +id,
- success: function(res) {
+ url: app.globalData.url + '/api/article/publicMsgQuery?page=1&size=' + that.data.size + '&flag=法律宣传',
+ success: function (res) {
console.log(res)
if (res.data.code == 0) {
- (res.data.data.content).forEach(e => {
+ (res.data.data.units).forEach(e => {
(e.createTime) = app.formatDate(e.createTime)
})
- var dataSet = res.data.data.content;
+ var dataSet = res.data.data.units;
+ console.log(dataSet)
if (res.data.data.totalElements < that.data.size) {
// 到底了,没数据加载
that.setData({
@@ -56,7 +58,7 @@
})
}
},
- complete: function() {
+ complete: function () {
that.setData({
isHideLoadMore: true
})
@@ -65,7 +67,7 @@
},
// 跳转详情
- link: function(e) {
+ link: function (e) {
var id = e.currentTarget.dataset.id;
console.log(e.currentTarget.dataset.id);
wx.navigateTo({
@@ -73,22 +75,15 @@
})
},
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function() {
-
+ folder: function (event) {
+ var title = event.currentTarget.dataset['title'];
+ wx.navigateTo({
+ url: '../law2Publicitylist/law2Publicitylist?title=' + title,
+ })
},
// 加载更多
- getMore: function() {
+ getMore: function () {
// 有加载更多按钮
if (!this.data.isHideMorebtn) {
this.setData({
--
Gitblit v1.8.0