绿满眶商城微信小程序-uniapp
peng
12 小时以前 89efee9a2e20fc04b4537d859917b47cf68a814c
pages/video/video-goods-detail-swiper.vue
@@ -293,6 +293,7 @@
import popups from "@/pages/product/popups/popups.vue"; //气泡框
import takeDownFormSaleGoods from "@/pages/product/m-take-down-sale-goods/index.vue"; //下架框
import setup from "@/pages/product/product/popup/popup.js";
import { getSessionId, userAction } from "@/api/userAction.js";
import { getGoodsDetail } from "@/api/video.js"
import {
@@ -439,6 +440,16 @@
         touchStartX: 0,
         touchEndX: 0,
         minSwipeDistance: 100, // 最小滑动距离,用于判断是否为有效滑动
           pageSessionNo:"",
           actionParam:{
               sessionId:'',
               actionType:"PAGE",
               joinType:"SELF",
               pageCode:"SWIPER_GOODS",
               pageParams:"{}",
               pageStatus:"JOIN",
               pageType:"DETAIL"
            }
      };
   },
@@ -481,6 +492,8 @@
      this.productRefHeight = windowHeight - bottomHeight + "px";
   },
   async onLoad(options) {
      this.actionParam.pageParams = JSON.stringify(options)
      this.videoId = options.videoId;
      this.getGoodsList();
@@ -492,7 +505,28 @@
      });
      // #endif
   },
  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)
  },
   async onShow() {
     getSessionId().then(res=>{
      this.pageSessionNo = res.data.data
      if(this.pageSessionNo){
      let   param = this.actionParam;
         param.sessionId = this.pageSessionNo
         userAction(param)
      }
     })
      // this.goodsDetail = {};
      // debugger
      // //如果有参数ids说明事分销短连接,需要获取参数
@@ -1064,7 +1098,7 @@
.video-container {
   width: 100%;
   height: 100vh;
   background-color: #000;
   background-color: #fff;
}
.video-swiper {