| | |
| | | getActivityDetail, |
| | | activityReport |
| | | } from '@/api/activity.js'; |
| | | import { getSessionId, userAction } from "@/api/userAction.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | collectType: '', |
| | | refId: '', |
| | | }, |
| | | pageSessionNo:"", |
| | | sendOnShow:false, |
| | | actionParam:{ |
| | | sessionId:'', |
| | | actionType:"PAGE", |
| | | joinType:"SELF", |
| | | pageCode:"ACTIVITY_DETAIL", |
| | | pageParams:"{}", |
| | | pageStatus:"JOIN", |
| | | pageType:"DETAIL" |
| | | } |
| | | }; |
| | | }, |
| | | onUnload() { |
| | | let param = this.actionParam; |
| | | if (this.sendOnShow)return |
| | | param.pageStatus = "LEAVE" |
| | | userAction(param) |
| | | }, |
| | | onHide() { |
| | | this.startHidenTime = Date.now() |
| | | let param = this.actionParam; |
| | | this.sendOnShow = true; |
| | | param.pageStatus = "LEAVE" |
| | | userAction(param) |
| | | }, |
| | | onShow() { |
| | | getSessionId().then(res=>{ |
| | | this.pageSessionNo = res.data.data |
| | | if(this.pageSessionNo){ |
| | | let param = this.actionParam; |
| | | param.sessionId = this.pageSessionNo |
| | | userAction(param) |
| | | } |
| | | }) |
| | | }, |
| | | onLoad(options) { |
| | | this.actionParam.pageParams = JSON.stringify(options) |
| | | // 接收 URL 参数 |
| | | if (options.id) { |
| | | this.detailId = options.id; |