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.
44 lines
1.1 KiB
44 lines
1.1 KiB
const api = require('../../../../utils/api.js')
|
|
|
|
Page({
|
|
data: {
|
|
detailObj: {
|
|
id: '',
|
|
title: '',
|
|
signupEndTime: '',
|
|
actStartTime: '',
|
|
actEndTime: '',
|
|
cancelReason: ''
|
|
},
|
|
signupEndTime:'',//报名截止时间
|
|
actStartTime:'',
|
|
actEndTime:''
|
|
},
|
|
onLoad (options) {
|
|
this.getUnPassActivityDetail(options.id)
|
|
},
|
|
onShow () {
|
|
|
|
},
|
|
getUnPassActivityDetail (id) {
|
|
api.cancelDetail(id).then(res => {
|
|
console.log('取消活动详情', res)
|
|
for(const key in this.data.detailObj) {
|
|
this.data.detailObj[key] = res.data[key]
|
|
}
|
|
this.setData({
|
|
detailObj: this.data.detailObj,
|
|
signupEndTime: this.data.detailObj.signupEndTime.substring(0, 16),
|
|
actStartTime: this.data.detailObj.actStartTime.substring(0, 16),
|
|
actEndTime: this.data.detailObj.actEndTime.substring(0, 16),
|
|
})
|
|
}).catch(err => {
|
|
console.log(err)
|
|
})
|
|
},
|
|
toDetail () {
|
|
wx.navigateTo({
|
|
url: `/subpages/heart/pages/heartDetail/heartDetail?id=${this.data.detailObj.id}`
|
|
})
|
|
}
|
|
})
|