From c9b0f3fa490afc0aeed1df11a723006aba27316b Mon Sep 17 00:00:00 2001
From: liuwh <hugeinfo123>
Date: Wed, 27 May 2020 10:02:57 +0800
Subject: [PATCH] 指纹仪

---
 SunshineLnsMinApp/pages/zhwj/zhwj.js |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/SunshineLnsMinApp/pages/zhwj/zhwj.js b/SunshineLnsMinApp/pages/zhwj/zhwj.js
index e6c1907..94cad91 100644
--- a/SunshineLnsMinApp/pages/zhwj/zhwj.js
+++ b/SunshineLnsMinApp/pages/zhwj/zhwj.js
@@ -67,9 +67,10 @@
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function (options) {
+  onLoad: function(options) {
     var that = this;
     wx.showLoading();
+    that.getData();
     wx.request({
       url: app.globalData.url + '/api/article/publicMsgQuery',
       data: {
@@ -77,7 +78,7 @@
         size: 1000,
         flag: '未检动态',
       },
-      success: function (res) {
+      success: function(res) {
         wx.hideLoading();
         console.log('res', res);
         if (res.data.code == 0) {
@@ -101,8 +102,24 @@
     })
   },
 
+  getData: function() {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/api/social/findImage',
+      success: function(res) {
+        wx.hideLoading();
+        console.log('res', res);
+        if (res.data.code == 0) {
+          that.setData({
+            topImage: res.data.data.length > 0 ? res.data.data[0].url : 'https://xnwj.gznsjc.gov.cn/nsjc-charge/image/juxing.png'
+          })
+        }
+      }
+    })
+  },
+
   // 跳转
-  linkFunction: function (event) {
+  linkFunction: function(event) {
     var str = event.currentTarget.dataset['str'];
     var id = event.currentTarget.dataset['id'];
     wx.navigateTo({

--
Gitblit v1.8.0