| | |
| | | import { getRecommendTag3 } from "@/api/video-tag.js"; |
| | | import { getFileKey } from "@/utils/file.js"; |
| | | import { getVideoGoodsList } from "@/api/goods.js"; |
| | | import { getSessionId, userAction } from "@/api/userAction.js"; |
| | | |
| | | export default { |
| | | components: {MyTag}, |
| | |
| | | screenWidth: 375, |
| | | gap: 10, // 图片间距 |
| | | windowHeight: 0, |
| | | marginBottom: 0 |
| | | marginBottom: 0, |
| | | pageSessionNo:"", |
| | | actionParam:{ |
| | | sessionId:'', |
| | | actionType:"PAGE", |
| | | joinType:"SELF", |
| | | pageCode:"PUBLISH_VIDEO", |
| | | pageParams:"{}", |
| | | pageStatus:"JOIN", |
| | | pageType:"LIST" |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | return (this.screenWidth - (this.gap * 4) - 20) / 3 |
| | | } |
| | | }, |
| | | onLoad() { |
| | | 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) |
| | | }, |
| | | onLoad(options) { |
| | | this.actionParam.pageParams = JSON.stringify(options) |
| | | |
| | | // 获取屏幕宽度 |
| | | const systemInfo = uni.getSystemInfoSync() |
| | | this.screenWidth = systemInfo.windowWidth |
| | |
| | | this.getVideoGoodsByEs() |
| | | }, |
| | | onShow() { |
| | | getSessionId().then(res=>{ |
| | | this.pageSessionNo = res.data.data |
| | | if(this.pageSessionNo){ |
| | | let param = this.actionParam; |
| | | param.sessionId = this.pageSessionNo |
| | | userAction(param) |
| | | } |
| | | }) |
| | | this.initCOS() |
| | | // 初始化推荐标签 |
| | | this.getRecommendTags() |