| | |
| | | import setup from "./product/popup/popup"; |
| | | import { getSessionId, userAction,userShare } from "@/api/userAction.js"; |
| | | import { getSTSToken } from '@/api/common.js' |
| | | import {addPrizeNum} from '@/api/prize.js' |
| | | export default { |
| | | components: { |
| | | popups, |
| | |
| | | this.shareParam.shareOption = JSON.stringify(this.routerVal) |
| | | userShare(this.shareParam).then(res => { |
| | | this.shareId = res.data.data; |
| | | |
| | | let param = { |
| | | addType:"SHARE_GOODS_VIDEO", |
| | | extend:"", |
| | | } |
| | | let extend = {shareId:this.shareId} |
| | | param.extend = JSON.stringify(extend) |
| | | addPrizeNum(param); |
| | | |
| | | // 当获取到shareId后,再resolve分享配置 |
| | | resolve({ |
| | |
| | | }); |
| | | }, |
| | | async onLoad (options) { |
| | | if(option.shareId){ |
| | | this.actionParam.shareId = option.shareId; |
| | | if(options.shareId){ |
| | | this.actionParam.shareId = options.shareId; |
| | | this.actionParam.joinType = 'SHARE' |
| | | console.log('触发onLoad') |
| | | } |
| | | this.actionParam.pageParams = JSON.stringify(option) |
| | | this.actionParam.pageParams = JSON.stringify(options) |
| | | if(options.q){ |
| | | const queryParam = { |
| | | id:'', |
| | |
| | | async onShow () { |
| | | getSessionId().then(res=>{ |
| | | this.pageSessionNo = res.data.data |
| | | this.actionParam.sessionId = this.pageSessionNo |
| | | if(this.pageSessionNo){ |
| | | let param = Object.assign({}, this.actionParam); |
| | | param.sessionId = this.pageSessionNo |
| | | userAction(param) |
| | | } |
| | | }) |