const api = require("../../../../utils/api.js") Page({ data: { detailObj: { id: "", title: "", signupEndTime: "", actStartTime: "", actEndTime: "", failureReason: "" }, signupEndTime: "", actStartTime: "", actEndTime: "", }, onLoad (options) { this.getUnPassActivityDetail(options.id) }, onShow () { }, getUnPassActivityDetail (id) { api.unpassActivityDetail(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}` }) } })