|
|
@ -59,6 +59,7 @@ |
|
|
|
import { addActivityRecord, detail, communityActivityApplicationRecordDelete } from "@/api/activity" |
|
|
|
import Share from "@/components/Share" |
|
|
|
import registerDialog from '@/components/registerDialog'; |
|
|
|
import { setConfig } from '@/utils/jweixin' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -76,12 +77,40 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
setConfig(['updateAppMessageShareData', 'onMenuShareAppMessage', 'updateTimelineShareData']) |
|
|
|
if (this.$route.query.id) { |
|
|
|
this.detail(this.$route.query.id) |
|
|
|
this.share() |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
share() { |
|
|
|
let than = this |
|
|
|
if (wx.updateAppMessageShareData) { |
|
|
|
wx.ready(function () { |
|
|
|
wx.updateAppMessageShareData({ |
|
|
|
title: 'e智社区', |
|
|
|
desc: than.info.title, |
|
|
|
link: `http://epmet-cloud.elinkservice.cn/#/activityDetail?id=${this.$route.query.id}`, |
|
|
|
imgUrl: '', |
|
|
|
success: function () { |
|
|
|
console.log('分享成功'); |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
wx.onMenuShareAppMessage({ |
|
|
|
title: 'e智社区', |
|
|
|
desc: than.info.title, |
|
|
|
link: `http://epmet-cloud.elinkservice.cn/#/activityDetail?id=${this.$route.query.id}}`, |
|
|
|
imgUrl: '', |
|
|
|
success: function () { |
|
|
|
console.log('分享成功'); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
checkIfPast() { |
|
|
|
const currentTimestamp = Date.now(); |
|
|
|
const specifiedTimestamp = new Date(this.info.cutOffTime.replace(/-/g, '/')).getTime(); |
|
|
|