From d7004986135c0885c1b9a92fb48919179732c00d Mon Sep 17 00:00:00 2001
From: xuxj <hugeinfo123>
Date: Sat, 09 May 2020 09:20:13 +0800
Subject: [PATCH] BUG修改
---
SunshineLnsMinApp/pages/zhdt/zhdt.js | 41 ++++++++++++++++++++++++++++++++++++-----
1 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/SunshineLnsMinApp/pages/zhdt/zhdt.js b/SunshineLnsMinApp/pages/zhdt/zhdt.js
index a8fcc04..e81fff8 100644
--- a/SunshineLnsMinApp/pages/zhdt/zhdt.js
+++ b/SunshineLnsMinApp/pages/zhdt/zhdt.js
@@ -11,13 +11,44 @@
dongtai3_1: app.globalData.imgUrl + '/image/dongtai3-1.jpg',
inputShowed: false,
inputVal: "",
+ dataSet:[]
},
/**
* 生命周期函数--监听页面加载
*/
- onLoad: function(options) {
-
+ onLoad: function (options) {
+ var that = this;
+ wx.showLoading();
+ wx.request({
+ url: app.globalData.url + '/api/article/publicMsgQuery',
+ data: {
+ page: 1,
+ size: 1000,
+ flag: '未检动态',
+ },
+ success: function (res) {
+ wx.hideLoading();
+ console.log('res', res);
+ if (res.data.code == 0) {
+ let content = res.data.data.result.content.map(({
+ createTime,
+ ...i
+ }) => ({
+ ...i,
+ createTime: app.formatDate(createTime),
+ }));
+ console.log(content)
+ that.setData({
+ dataSet: content
+ })
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ })
+ }
+ }
+ })
},
linkFunction: function (event) {
@@ -28,19 +59,19 @@
})
},
- showInput: function() {
+ showInput: function () {
this.setData({
inputShowed: true
});
},
- hideInput: function() {
+ hideInput: function () {
this.setData({
inputVal: "",
inputShowed: false
});
},
- clearInput: function() {
+ clearInput: function () {
this.setData({
inputVal: ""
}, () => {});
--
Gitblit v1.8.0