From 015d11ba5ae3c468529a5288b4add1be81a9f312 Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Tue, 9 Jun 2020 14:20:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/eventlist/eventlist.js | 6 ++++ .../pages/impression/impression.wxss | 2 +- subpages/understandJs/pages/index/index.js | 6 ++-- .../pages/noticeDetail/noticeDetail.js | 29 +++++++++++++++++-- .../pages/noticeDetail/noticeDetail.wxss | 3 ++ 5 files changed, 39 insertions(+), 7 deletions(-) diff --git a/subpages/associationNew/pages/eventlist/eventlist.js b/subpages/associationNew/pages/eventlist/eventlist.js index 1073344..ce307f8 100644 --- a/subpages/associationNew/pages/eventlist/eventlist.js +++ b/subpages/associationNew/pages/eventlist/eventlist.js @@ -172,6 +172,9 @@ Page({ //点赞 clicklike(e) { + if (this.verifyCompleteInfo()) { + return false + } let index = e.currentTarget.dataset.index // if (this.data.bannedFlag == '1') {//被禁言 @@ -208,6 +211,9 @@ Page({ }, // Textarea获取焦点 clickTextarea(e) { + if (this.verifyCompleteInfo()) { + return false + } let index = e.currentTarget.dataset.index if (this.data.bannedFlag == '1') {//被禁言 wx.showToast({ diff --git a/subpages/understandJs/pages/impression/impression.wxss b/subpages/understandJs/pages/impression/impression.wxss index 860c0ed..7a2244f 100644 --- a/subpages/understandJs/pages/impression/impression.wxss +++ b/subpages/understandJs/pages/impression/impression.wxss @@ -32,7 +32,7 @@ page { margin-top: 15rpx; /* width: calc(100% - 56rpx); */ - height: 75rpx; + /* height: 75rpx; */ font-size: 28rpx; font-family: PingFang SC; font-weight: 500; diff --git a/subpages/understandJs/pages/index/index.js b/subpages/understandJs/pages/index/index.js index 51a5f15..220df51 100644 --- a/subpages/understandJs/pages/index/index.js +++ b/subpages/understandJs/pages/index/index.js @@ -72,13 +72,13 @@ Page({ }, goDetails(e) {//模块编码(0-政策导航,1-印象,2-味道,3-硬核,4-档案) console.log(JSON.stringify(e.currentTarget.dataset) + e.currentTarget.dataset.modulecode) - if (e.currentTarget.dataset.modulecode == 'notice_impression' || e.currentTarget.dataset.modulecode == 'notice_warning') {//印象 //警事 + if (e.currentTarget.dataset.modulecode == 'notice_warning') { //警事 wx.navigateTo({ url: `../impression/impression?modulecode=${e.currentTarget.dataset.modulecode}` }) - } else if (e.currentTarget.dataset.modulecode == 'notice_taste') {//味道 + } else if (e.currentTarget.dataset.modulecode == 'notice_impression' || e.currentTarget.dataset.modulecode == 'notice_taste') {//印象//味道 wx.navigateTo({ - url: `../delicious/delicious?modulecode=${e.currentTarget.dataset.modulecode}` + url: `../noticeDetail/noticeDetail?modulecode=${e.currentTarget.dataset.modulecode}` }) } else if (e.currentTarget.dataset.modulecode == 'module_hardcore') {//硬核 wx.navigateTo({ diff --git a/subpages/understandJs/pages/noticeDetail/noticeDetail.js b/subpages/understandJs/pages/noticeDetail/noticeDetail.js index 3c90394..e84b5c4 100644 --- a/subpages/understandJs/pages/noticeDetail/noticeDetail.js +++ b/subpages/understandJs/pages/noticeDetail/noticeDetail.js @@ -8,28 +8,51 @@ Page({ */ data: { noticeObj: {}, - noticeObjContent: '' + noticeObjContent: '', + pageIndex:1, + pageSize:10, + noticeCategory:'' }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { + this.setData({ + noticeCategory:options.modulecode + }) if (options.modulecode == 'notice_taste'){//味道 wx.setNavigationBarTitle({ title: '锦水味道' }) + this.noticelist() } else if(options.modulecode == 'notice_impression'){ wx.setNavigationBarTitle({ title: '锦水印象' }) + this.noticelist() } else if(options.modulecode == 'notice_warning'){ wx.setNavigationBarTitle({ title: '锦水警事' }) + this.browseNotice(options.id) + this.noticeDetail(options.id) + } + }, + + noticelist() { + let that = this; + let params = { + pageIndex: that.data.pageIndex, + pageSize: that.data.pageSize, + noticeCategory: that.data.noticeCategory } - this.browseNotice(options.id) - this.noticeDetail(options.id) + api.noticelist(params).then(function (res) { //了解锦水-模块管理接口 + that.browseNotice(res.data[0].id) + that.noticeDetail(res.data[0].id) + }).catch(err => { + console.log(err) + }) }, noticeDetail(noticeId){ let that = this; diff --git a/subpages/understandJs/pages/noticeDetail/noticeDetail.wxss b/subpages/understandJs/pages/noticeDetail/noticeDetail.wxss index 1518535..abc52be 100644 --- a/subpages/understandJs/pages/noticeDetail/noticeDetail.wxss +++ b/subpages/understandJs/pages/noticeDetail/noticeDetail.wxss @@ -1,3 +1,6 @@ +page{ + background: #f7f7f7; +} .notice-detail { width: 100%; height: 100%;