From a2d1b9886b00b5f4d4722c3379d3bd4f2f94b421 Mon Sep 17 00:00:00 2001
From: LAPTOP-RI7D261L\Mr Ke <545800322@qq.com>
Date: Mon, 09 Mar 2020 17:02:35 +0800
Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/nsjcy/frontEnd/nsjcy

---
 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