| | |
| | | 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) { |
| | |
| | | }) |
| | | }, |
| | | |
| | | showInput: function() { |
| | | showInput: function () { |
| | | this.setData({ |
| | | inputShowed: true |
| | | }); |
| | | }, |
| | | |
| | | hideInput: function() { |
| | | hideInput: function () { |
| | | this.setData({ |
| | | inputVal: "", |
| | | inputShowed: false |
| | | }); |
| | | }, |
| | | clearInput: function() { |
| | | clearInput: function () { |
| | | this.setData({ |
| | | inputVal: "" |
| | | }, () => {}); |