diff --git a/pages/heartNew/heartNew.js b/pages/heartNew/heartNew.js index 8be141f..08fe0de 100644 --- a/pages/heartNew/heartNew.js +++ b/pages/heartNew/heartNew.js @@ -802,11 +802,11 @@ Page({ //如果是 详情样式,直接跳转详情页面 if (this.data.shouye.moduleStyle == '4') { wx.navigateTo({ - url: `/subpages/oneKeyService/pages/noticeDetail/noticeDetail?pid=${this.data.shouye.pid}&bannerflag=${this.data.shouye.bannerFlag}&categorycode=${this.data.shouye.categoryCode}&modulestyle=${this.data.shouye.moduleStyle}&categoryname=${this.data.shouye.categoryName}` + url: `/subpages/oneKeyService/pages/noticeDetail/noticeDetail?pid=${this.data.shouye.pid}&bannerflag=${this.data.shouye.bannerFlag}&categorycode=${this.data.shouye.categoryCode}&modulestyle=${this.data.shouye.moduleStyle}&categoryname=${this.data.shouye.categoryName}&detailstyle=${this.data.shouye.detailStyle}` }) } else { wx.navigateTo({ - url: `/subpages/oneKeyService/pages/moduleList/moduleList?pid=${this.data.shouye.id}&bannerflag=${this.data.shouye.bannerFlag}&categorycode=${this.data.shouye.categoryCode}&modulestyle=${this.data.shouye.moduleStyle}&categoryname=${this.data.shouye.categoryName}` + url: `/subpages/oneKeyService/pages/moduleList/moduleList?pid=${this.data.shouye.id}&bannerflag=${this.data.shouye.bannerFlag}&categorycode=${this.data.shouye.categoryCode}&modulestyle=${this.data.shouye.moduleStyle}&categoryname=${this.data.shouye.categoryName}&detailstyle=${this.data.shouye.detailStyle}` }) } }, diff --git a/pages/heartNew/heartNew.wxss b/pages/heartNew/heartNew.wxss index cd0fbc1..ece2d4e 100644 --- a/pages/heartNew/heartNew.wxss +++ b/pages/heartNew/heartNew.wxss @@ -361,7 +361,8 @@ button:last-child { .tab-bar .tab { font-size: 34rpx; font-weight: 500; - color: rgba(171, 171, 171, 1); + /* color: rgba(171, 171, 171, 1); */ + color: rgba(0, 0, 0, 1); width: 25%; height: 100%; line-height: 92rpx; diff --git a/subpages/oneKeyService/pages/moduleList/moduleList.js b/subpages/oneKeyService/pages/moduleList/moduleList.js index 67c0b4a..0cbc30a 100644 --- a/subpages/oneKeyService/pages/moduleList/moduleList.js +++ b/subpages/oneKeyService/pages/moduleList/moduleList.js @@ -95,7 +95,7 @@ Page({ //modulestyle 调用模式 getModuleStyleType () { let moduleStyle = this.data.moduleInfo.modulestyle - if (moduleStyle == '1' || moduleStyle == '3' || moduleStyle == '5' || moduleStyle == '6' || moduleStyle == '7' || moduleStyle == '9') { + if (moduleStyle == '1' || moduleStyle == '3' || moduleStyle == '5' || moduleStyle == '6' || moduleStyle == '7' || moduleStyle == '9' || moduleStyle == '10') { return 'notice_list' } else if (moduleStyle == '2') { return 'module_list' @@ -299,12 +299,12 @@ Page({ const info = e.currentTarget.dataset.info if (info.moduleStyle == '4') { wx.navigateTo({ - url: `../noticeDetail/noticeDetail?pid=${info.pid}&bannerflag=${info.bannerFlag}&categorycode=${info.categoryCode}&modulestyle=${info.moduleStyle}&categoryname=${info.categoryName}&commentFlag=${info.commentFlag}` + url: `../noticeDetail/noticeDetail?pid=${info.pid}&bannerflag=${info.bannerFlag}&categorycode=${info.categoryCode}&modulestyle=${info.moduleStyle}&categoryname=${info.categoryName}&commentFlag=${info.commentFlag}&detailstyle=${info.detailStyle}` }) } else { wx.navigateTo({ - url: `./moduleList?pid=${info.id}&bannerflag=${info.bannerFlag}&categorycode=${info.categoryCode}&modulestyle=${info.moduleStyle}&categoryname=${info.categoryName}&commentFlag=${info.commentFlag}` + url: `./moduleList?pid=${info.id}&bannerflag=${info.bannerFlag}&categorycode=${info.categoryCode}&modulestyle=${info.moduleStyle}&categoryname=${info.categoryName}&commentFlag=${info.commentFlag}&detailstyle=${info.detailStyle}` }) } }, @@ -313,7 +313,7 @@ Page({ toDetail(e){ const info = e.currentTarget.dataset wx.navigateTo({ - url: `../noticeDetail/noticeDetail?id=${info.id}&title=${this.data.moduleInfo.categoryname}&commentFlag=${this.data.moduleInfo.commentFlag}` + url: `../noticeDetail/noticeDetail?id=${info.id}&title=${this.data.moduleInfo.categoryname}&commentFlag=${this.data.moduleInfo.commentFlag}&detailstyle=${this.data.moduleInfo.detailstyle}` }) }, diff --git a/subpages/oneKeyService/pages/moduleList/moduleList.wxml b/subpages/oneKeyService/pages/moduleList/moduleList.wxml index 18afde4..257a1c0 100644 --- a/subpages/oneKeyService/pages/moduleList/moduleList.wxml +++ b/subpages/oneKeyService/pages/moduleList/moduleList.wxml @@ -118,6 +118,21 @@ {{item.noticeTitle}} + + + + + + + + {{item.noticeTitle}} + + + {{filter.formatTime(item.noticeTime, 'yyyy-MM-dd')}} + + + + diff --git a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js index 93d1bad..7d90b30 100644 --- a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js +++ b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js @@ -42,6 +42,8 @@ Page({ dialogCancelText: "", loadMoreVisible: false, // loadMoreVisible 和 loadMoreType 控制 超出一屏时的 加载和没有更多的显示与隐藏 loadMoreType: "none", + detailStyle: [], + detailObj: {} }, /** @@ -52,6 +54,12 @@ Page({ infoCompleted: app.globalData.infoCompleted, commentFlag: options.commentFlag }) + if (options.detailstyle && options.detailstyle != 'undefined') { + this.setData({ + detailStyle: options.detailstyle.split(',') + }) + console.log(this.data.detailStyle) + } if (options.id) { wx.setNavigationBarTitle({ title: options.title @@ -78,6 +86,11 @@ Page({ } this.noticelist() } + if (options.detailstyle) { + this.setData({ + noDeptName: true + }) + } }, swiperChange: function(e) { @@ -150,7 +163,20 @@ Page({ noticeDetail (noticeId){ let that = this; api.noticeDetail(noticeId).then(function (res) { + if (that.data.detailStyle.length > 0) { + Object.keys(res.data).forEach(item => { + let show = that.data.detailStyle.some((showItem) => { + return showItem == item + }) + that.data.detailObj[item] = show + }) + } else { + Object.keys(res.data).forEach(item => { + that.data.detailObj[item] = true + }) + } that.setData({ + detailObj: that.data.detailObj, noticeObj: res.data, noticeObjContent: util.formatRichText(res.data.noticeContent), preloadVisible: false diff --git a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxml b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxml index 910df50..125ac98 100644 --- a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxml +++ b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxml @@ -29,20 +29,20 @@ - {{noticeObj.noticeTitle}} + {{noticeObj.noticeTitle}} - {{noticeObj.deptName}} - {{filter.formatTime(noticeObj.noticeTime, 'yyyy-MM-dd')}} + {{noticeObj.deptName}} + {{filter.formatTime(noticeObj.noticeTime, 'yyyy-MM-dd')}} - + {{noticeObj.readingAmount}} - + diff --git a/utils/config.js b/utils/config.js index 2d49467..836194a 100644 --- a/utils/config.js +++ b/utils/config.js @@ -8,7 +8,7 @@ module.exports = { function BASEURL() { // return 'https://epdc-jinan-test.elinkservice.cn/js/epdc-api/api/' // 锦水测试环境 return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址 - // return 'http://10.10.10.5:9094/epdc-api/api/' + // return 'http://10.10.10.91:9094/epdc-api/api/' // return 'https://nei.netease.com/api/apimock-v2/068b11343b2a993a9292d11f4b3fa8a8/api/' }