|
@ -42,6 +42,8 @@ Page({ |
|
|
dialogCancelText: "", |
|
|
dialogCancelText: "", |
|
|
loadMoreVisible: false, // loadMoreVisible 和 loadMoreType 控制 超出一屏时的 加载和没有更多的显示与隐藏
|
|
|
loadMoreVisible: false, // loadMoreVisible 和 loadMoreType 控制 超出一屏时的 加载和没有更多的显示与隐藏
|
|
|
loadMoreType: "none", |
|
|
loadMoreType: "none", |
|
|
|
|
|
detailStyle: [], |
|
|
|
|
|
detailObj: {} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -52,6 +54,12 @@ Page({ |
|
|
infoCompleted: app.globalData.infoCompleted, |
|
|
infoCompleted: app.globalData.infoCompleted, |
|
|
commentFlag: options.commentFlag |
|
|
commentFlag: options.commentFlag |
|
|
}) |
|
|
}) |
|
|
|
|
|
if (options.detailstyle && options.detailstyle != 'undefined') { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
detailStyle: options.detailstyle.split(',') |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(this.data.detailStyle) |
|
|
|
|
|
} |
|
|
if (options.id) { |
|
|
if (options.id) { |
|
|
wx.setNavigationBarTitle({ |
|
|
wx.setNavigationBarTitle({ |
|
|
title: options.title |
|
|
title: options.title |
|
@ -78,6 +86,11 @@ Page({ |
|
|
} |
|
|
} |
|
|
this.noticelist() |
|
|
this.noticelist() |
|
|
} |
|
|
} |
|
|
|
|
|
if (options.detailstyle) { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
noDeptName: true |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
swiperChange: function(e) { |
|
|
swiperChange: function(e) { |
|
@ -150,7 +163,20 @@ Page({ |
|
|
noticeDetail (noticeId){ |
|
|
noticeDetail (noticeId){ |
|
|
let that = this; |
|
|
let that = this; |
|
|
api.noticeDetail(noticeId).then(function (res) { |
|
|
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({ |
|
|
that.setData({ |
|
|
|
|
|
detailObj: that.data.detailObj, |
|
|
noticeObj: res.data, |
|
|
noticeObj: res.data, |
|
|
noticeObjContent: util.formatRichText(res.data.noticeContent), |
|
|
noticeObjContent: util.formatRichText(res.data.noticeContent), |
|
|
preloadVisible: false |
|
|
preloadVisible: false |
|
|