From 5a887acf1924950715086633d329db045223b5c4 Mon Sep 17 00:00:00 2001
From: liuwh <hugeinfo123>
Date: Tue, 09 Jun 2020 14:47:27 +0800
Subject: [PATCH] test
---
SunshineLnsMinApp/pages/yshjqyfw/yshjqyfw.js | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 47 insertions(+), 1 deletions(-)
diff --git a/SunshineLnsMinApp/pages/yshjqyfw/yshjqyfw.js b/SunshineLnsMinApp/pages/yshjqyfw/yshjqyfw.js
index e6889cc..273dbcf 100644
--- a/SunshineLnsMinApp/pages/yshjqyfw/yshjqyfw.js
+++ b/SunshineLnsMinApp/pages/yshjqyfw/yshjqyfw.js
@@ -6,7 +6,8 @@
* 页面的初始数据
*/
data: {
- wjgk:'./../../images/wjgk.jpg',
+ wjgk: './../../images/wjgk.jpg',
+ qiyefuwu: app.globalData.imgUrl + '/images/qiyefuwu.png',
dongtai1_1: app.globalData.imgUrl + '/image/dongtai1-1.jpg',
dongtai2_1: app.globalData.imgUrl + '/image/dongtai2-1.jpg',
dongtai3_1: app.globalData.imgUrl + '/image/dongtai3-1.jpg',
@@ -61,13 +62,58 @@
badge: 0,
name: '版权'
}],
+ dataSet: []
},
/**
* 生命周期函数--监听页面加载
*/
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,
+ })
+ }
+ }
+ })
+ },
+ folder: function(event) {
+ var title = event.currentTarget.dataset['title'];
+ if(title == "法律宣传"){
+ wx.navigateTo({
+ url: '../law2Publicity/law2Publicity',
+ })
+ }else{
+ wx.navigateTo({
+ url: '../law2Publicitylist/law2Publicitylist?title=' + title,
+ })
+ }
+
},
// 跳转
--
Gitblit v1.8.0