绿满眶商城微信小程序-uniapp
peng
2025-10-13 3a2524692711cf35fc142881b2837368ae2c3d25
pages/product/goods.vue
@@ -609,6 +609,18 @@
    // #ifdef MP-WEIXIN
    // #endif
   this.goodsDetail = {};
   //如果有参数ids说明事分销短连接,需要获取参数
   if (this.routerVal.scene) {
     getMpScene(this.routerVal.scene).then((res) => {
       if (res.data.success) {
         let data = res.data.result.split(","); // skuId,goodsId,distributionId
         this.init(data[0], data[1], data[2]);
       }
     });
   } else {
     this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId);
   }
  },
  
  onUnload() {
@@ -634,18 +646,18 @@
           userAction(param)
        }
     })   
    this.goodsDetail = {};
    //如果有参数ids说明事分销短连接,需要获取参数
    if (this.routerVal.scene) {
      getMpScene(this.routerVal.scene).then((res) => {
        if (res.data.success) {
          let data = res.data.result.split(","); // skuId,goodsId,distributionId
          this.init(data[0], data[1], data[2]);
        }
      });
    } else {
      this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId);
    }
    // this.goodsDetail = {};
    // //如果有参数ids说明事分销短连接,需要获取参数
    // if (this.routerVal.scene) {
    //   getMpScene(this.routerVal.scene).then((res) => {
    //     if (res.data.success) {
    //       let data = res.data.result.split(","); // skuId,goodsId,distributionId
    //       this.init(data[0], data[1], data[2]);
    //     }
    //   });
    // } else {
    //   this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId);
    // }
  },
  methods: {