From 5d4c949b54806b3bce709efffc932d8208b11969 Mon Sep 17 00:00:00 2001 From: liuwh <liuwh@hugeinfo.com.cn> Date: Thu, 27 Feb 2020 09:59:50 +0800 Subject: [PATCH] 2 --- SunshineIns/src/fetch/_fetch.js | 4 +- SunshineLnsMinApp/app.js | 6 +- SunshineLnsMinApp/pages/fzxkt/fzxkt.js | 42 ++++++++++++++++++--- SunshineIns/src/data/menu.js | 4 +- SunshineLnsMinApp/.gitignore | 14 +++++++ 5 files changed, 57 insertions(+), 13 deletions(-) diff --git a/SunshineIns/src/data/menu.js b/SunshineIns/src/data/menu.js index 9883f7d..f61102d 100644 --- a/SunshineIns/src/data/menu.js +++ b/SunshineIns/src/data/menu.js @@ -106,7 +106,7 @@ }, { id: 'questionnaire', - name: '问卷管理部分', + name: '调查问卷管理', icon: msgManage, iconCheck: activeCheck, children: [{ @@ -225,7 +225,7 @@ name: '系统管理', icon: sys, iconCheck: sysCheck, - path: 'http://xnwj.gznsjc.gov.cn/nsjc-charge/base/home.html' + path: 'http://nsjcy.hugeinfo.com.cn/nsjc-charge/base/home.html' }]; diff --git a/SunshineIns/src/fetch/_fetch.js b/SunshineIns/src/fetch/_fetch.js index c1f0b48..dbde3fd 100644 --- a/SunshineIns/src/fetch/_fetch.js +++ b/SunshineIns/src/fetch/_fetch.js @@ -1,8 +1,8 @@ import fetch from 'hife/fetch'; // export const base = 'http://xnwj.gznsjc.gov.cn'; -// export const base = 'http://nsjc.vaiwan.com'; -export const base = 'http://nsjcy.hugeinfo.com.cn'; +export const base = 'http://nsjc.vaiwan.com'; +// export const base = 'http://nsjcy.hugeinfo.com.cn'; // export const base = 'http://192.168.0.147:8081'; diff --git a/SunshineLnsMinApp/.gitignore b/SunshineLnsMinApp/.gitignore new file mode 100644 index 0000000..14ea590 --- /dev/null +++ b/SunshineLnsMinApp/.gitignore @@ -0,0 +1,14 @@ +# Windows +[Dd]esktop.ini +Thumbs.db +$RECYCLE.BIN/ + +# macOS +.DS_Store +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes + +# Node.js +node_modules/ diff --git a/SunshineLnsMinApp/app.js b/SunshineLnsMinApp/app.js index a5cfac7..648c686 100644 --- a/SunshineLnsMinApp/app.js +++ b/SunshineLnsMinApp/app.js @@ -10,10 +10,10 @@ globalData: { userInfo: null, pageData: {}, - //url: 'https://hugeinfo.com.cn/nsjc-charge', - //url: 'http://192.168.0.31:8085/nsjc-charge', + url: 'https://nsjcy.hugeinfo.com.cn/nsjc-charge', + //url: 'http://192.168.0.31:8085/nsjc-charge',y //imgUrl: 'https://hugeinfo.com.cn/nsjc-charge', - url: 'http://nsjc.vaiwan.com/nsjc-charge', + // url: 'http://nsjc.vaiwan.com/nsjc-charge', imgUrl: 'http://nsjc.vaiwan.com/nsjc-charge' }, // 过滤数组 diff --git a/SunshineLnsMinApp/pages/fzxkt/fzxkt.js b/SunshineLnsMinApp/pages/fzxkt/fzxkt.js index 54adb6f..0f5a17d 100644 --- a/SunshineLnsMinApp/pages/fzxkt/fzxkt.js +++ b/SunshineLnsMinApp/pages/fzxkt/fzxkt.js @@ -1,4 +1,5 @@ // pages/fzxkt/fzxkt.js +var app = getApp() Page({ /** @@ -41,35 +42,64 @@ /** * 生命周期函数--监听页面加载 */ - 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(({ + startTime, + ...i + }) => ({ + ...i, + startTime: app.formatDate(startTime), + })); + that.setData({ + items: content + }) + } else { + wx.showToast({ + title: res.data.msg, + }) + } + } + }) }, /** * 生命周期函数--监听页面显示 */ - onShow: function() { + onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ - onHide: function() { + onHide: function () { }, /** * 页面上拉触底事件的处理函数 */ - onReachBottom: function() { + onReachBottom: function () { }, /** * 用户点击右上角分享 */ - onShareAppMessage: function() { + onShareAppMessage: function () { } }) \ No newline at end of file -- Gitblit v1.8.0