You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
6.3 KiB
97 lines
6.3 KiB
const api = require("../../utils/api")
|
|
import util from "../../../../utils/util"
|
|
Page({
|
|
data: {
|
|
noticeObj: '',
|
|
noticeObjContent: '<p style="text-indent: 21pt; margin: 0pt 0pt 0.0001pt; text-align: justify; font-family: Calibri; font-size: 10.5pt;"><span style="font-family: 宋体; font-size: 14.0000pt;"><span style="font-family: 宋体;">项目位于合作社院内,紧邻</span>220国道,距离济菏高速平阴县出入口不到2公里, 交通方便、地理位置优越。</span></p>↵<p style="margin: 0pt 0pt 0.0001pt; text-align: justify; font-family: Calibri; font-size: 10.5pt;"><span style="font-family: 宋体; font-size: 14.0000pt;"><span style="font-family: 宋体;">项目位于平阴县城西部前阮二村盆三津区内,西临龙桥洼区,东临博士注区。<img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp05%2F19100120461512E-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1640768653&t=7db6abc17756c233533936be29211370" />三个洼区都属于黄河淤积平原,土地肥沃,是平阴县主要小麦、玉米、大豆等粮食主产区,项目资源丰富。</span></span></p><p style="text-indent: 21pt; margin: 0pt 0pt 0.0001pt; text-align: justify; font-family: Calibri; font-size: 10.5pt;"><span style="font-family: 宋体; font-size: 14.0000pt;"><span style="font-family: 宋体;">项目位于合作社院内,紧邻</span>220国道,距离济菏高速平阴县出入口不到2公里, 交通方便、地理位置优越。</span></p>↵<p style="margin: 0pt 0pt 0.0001pt; text-align: justify; font-family: Calibri; font-size: 10.5pt;"><span style="font-family: 宋体; font-size: 14.0000pt;"><span style="font-family: 宋体;">项目位于平阴县城西部前阮二村盆三津区内,西临龙桥洼区,东临博士注区。三个洼区都属于黄河淤积平原,土地肥沃,是平阴县主要小麦、玉米、大豆等粮食主产区,项目资源丰富。</span></span></p><p style="text-indent: 21pt; margin: 0pt 0pt 0.0001pt; text-align: justify; font-family: Calibri; font-size: 10.5pt;"><span style="font-family: 宋体; font-size: 14.0000pt;"><span style="font-family: 宋体;">项目位于合作社院内,紧邻</span>220国道,距离济菏高速平阴县出入口不到2公里, 交通方便、地理位置优越。</span></p>↵<p style="margin: 0pt 0pt 0.0001pt; text-align: justify; font-family: Calibri; font-size: 10.5pt;"><span style="font-family: 宋体; font-size: 14.0000pt;"><span style="font-family: 宋体;">项目位于平阴县城西部前阮二村盆三津区内,西临龙桥洼区,东临博士注区。三个洼区都属于黄河淤积平原,土地肥沃,是平阴县主要小麦、玉米、大豆等粮食主产区,项目资源丰富。</span></span></p><p style="text-indent: 21pt; margin: 0pt 0pt 0.0001pt; text-align: justify; font-family: Calibri; font-size: 10.5pt;"><span style="font-family: 宋体; font-size: 14.0000pt;"><span style="font-family: 宋体;">项目位于合作社院内,紧邻</span>220国道,距离济菏高速平阴县出入口不到2公里, 交通方便、地理位置优越。</span></p>↵<p style="margin: 0pt 0pt 0.0001pt; text-align: justify; font-family: Calibri; font-size: 10.5pt;"><span style="font-family: 宋体; font-size: 14.0000pt;"><span style="font-family: 宋体;">项目位于平阴县城西部前阮二村盆三津区内,西临龙桥洼区,东临博士注区。三个洼区都属于黄河淤积平原,土地肥沃,是平阴县主要小麦、玉米、大豆等粮食主产区,项目资源丰富。</span></span></p>',
|
|
isShow: false,
|
|
isShowBtn: false, // 是否显示 展开-收起
|
|
pageIndex: 1,
|
|
pageSize: 10,
|
|
loadMoreType: 'none',
|
|
loadMoreVisible: false,
|
|
activeList: [],
|
|
id: '',
|
|
},
|
|
onLoad: function (options) {
|
|
if (options.id) {
|
|
this.setData({
|
|
id: options.id
|
|
})
|
|
this.getVolunteerUnionDetail(options.id)
|
|
this.getVolunteerUnionActiveList()
|
|
}
|
|
},
|
|
onReachBottom: function () {
|
|
this.setData({
|
|
loadMoreVisible: true
|
|
})
|
|
if (this.data.loadMoreType === "loading") {
|
|
this.setData({
|
|
pageIndex: this.data.pageIndex + 1
|
|
})
|
|
this.getVolunteerUnionActiveList()
|
|
}
|
|
},
|
|
// 获取
|
|
getVolunteerUnionDetail (id) {
|
|
api.getVolunteerUnionDetail({ id }).then(res => {
|
|
this.setData({
|
|
noticeObj: res.data,
|
|
noticeObjContent: util.formatRichText(res.data.content)
|
|
})
|
|
let query = wx.createSelectorQuery().in(this)
|
|
query.select('.alliance-introduce').boundingClientRect()
|
|
query.exec(res => {
|
|
console.log(res[0].height)
|
|
if (res[0].height > 100) {
|
|
this.setData({
|
|
isShowBtn: true
|
|
})
|
|
}
|
|
})
|
|
}).catch(err => {
|
|
console.log(err)
|
|
})
|
|
},
|
|
getVolunteerUnionActiveList () {
|
|
const para = {
|
|
pageIndex: this.data.pageIndex,
|
|
pageSize: this.data.pageSize,
|
|
unionActId: this.data.id
|
|
}
|
|
api.getVolunteerUnionActList(para).then(res => {
|
|
console.log(res)
|
|
this.setData({
|
|
activeList: [...this.data.activeList,...res.data],
|
|
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none',
|
|
loadMoreVisible: res.data.length === this.data.pageSize ? false : true
|
|
})
|
|
if (this.data.activeList.length == 0) {
|
|
this.setData({
|
|
loadMoreType: 'none',
|
|
loadMoreVisible: false,
|
|
})
|
|
}
|
|
}).catch(err => {
|
|
this.setData({
|
|
activeList: [],
|
|
loadMoreType: 'none',
|
|
loadMoreVisible: false,
|
|
})
|
|
console.log(err)
|
|
})
|
|
},
|
|
// 展开和收起 富文本内容
|
|
isShowOrHide () {
|
|
this.setData({
|
|
isShow: !this.data.isShow
|
|
})
|
|
},
|
|
// 前往活动详情
|
|
navigateToActDetail (e) {
|
|
wx.navigateTo({
|
|
url: `../allianceActDetail/allianceActDetail?id=${e.currentTarget.dataset.id}`
|
|
})
|
|
}
|
|
})
|