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/zhdtInfo/zhdtInfo.js |   96 ++++++++++++++---------------------------------
 1 files changed, 29 insertions(+), 67 deletions(-)

diff --git a/SunshineLnsMinApp/pages/zhdtInfo/zhdtInfo.js b/SunshineLnsMinApp/pages/zhdtInfo/zhdtInfo.js
index 30ea5b2..39ad0a6 100644
--- a/SunshineLnsMinApp/pages/zhdtInfo/zhdtInfo.js
+++ b/SunshineLnsMinApp/pages/zhdtInfo/zhdtInfo.js
@@ -8,121 +8,83 @@
   data: {
     id: '',
     swiperList: [],
+    data:{},
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function(options) {
+  onLoad: function (options) {
     console.log(options.id)
-    this.setData({
-      id: options.id,
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/api/article/publicMsgDetails?msgId=' + options.id,
+      success: function (res) {
+        wx.hideLoading();
+        console.log(res)
+        if (res.data.code == 0) {
+          that.setData({
+            data: {
+              ...res.data.data,
+              createTime: app.formatDate(res.data.data.createTime),
+            }
+          })
+        } else {
+          wx.showModal({
+            title: '提示',
+            content: "请求失败!"
+          })
+        }
+      }
     })
-    if (options.id == '1') {
-      this.setData({
-        swiperList: [{
-          id: 0,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai1-1.jpg',
-        }, {
-          id: 1,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai1-2.jpg',
-        }, {
-          id: 2,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai1-3.jpg',
-        }],
-      })
-    } else if (options.id == '2') {
-      this.setData({
-        swiperList: [{
-          id: 0,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai2-1.jpg',
-        }, {
-          id: 1,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai2-2.jpg',
-        }, {
-          id: 4,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai2-5.jpg',
-        }, {
-          id: 5,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai2-6.jpg',
-        }, {
-          id: 6,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai2-7.jpg',
-        }],
-      })
-    }else{
-      this.setData({
-        swiperList: [{
-          id: 0,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai3-1.jpg',
-        }, {
-          id: 1,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai3-2.jpg',
-        }, {
-          id: 2,
-          type: 'image',
-          url: app.globalData.imgUrl + '/image/dongtai3-3.jpg',
-        }],
-      })
-    }
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
-  onReady: function() {
+  onReady: function () {
 
   },
 
   /**
    * 生命周期函数--监听页面显示
    */
-  onShow: function() {
+  onShow: function () {
 
   },
 
   /**
    * 生命周期函数--监听页面隐藏
    */
-  onHide: function() {
+  onHide: function () {
 
   },
 
   /**
    * 生命周期函数--监听页面卸载
    */
-  onUnload: function() {
+  onUnload: function () {
 
   },
 
   /**
    * 页面相关事件处理函数--监听用户下拉动作
    */
-  onPullDownRefresh: function() {
+  onPullDownRefresh: function () {
 
   },
 
   /**
    * 页面上拉触底事件的处理函数
    */
-  onReachBottom: function() {
+  onReachBottom: function () {
 
   },
 
   /**
    * 用户点击右上角分享
    */
-  onShareAppMessage: function() {
+  onShareAppMessage: function () {
 
   }
 })
\ No newline at end of file

--
Gitblit v1.8.0