zhaojs
2023-06-10 69ea24e8fdfb41fc48c3fdb8c444645c13b1bbc4
uniapp/pages/goods/goodsDetail.vue
@@ -225,7 +225,10 @@
            </view>
          </view>
          <view class="rightbackbox btnbox colCenCen" @tap="getCouponUrl()">
            <view class="priceText">
           <view v-if="frompage=='freebuy'" class="priceText">
              ¥{{optionsInfo.actualPrice}}
           </view>
            <view v-else class="priceText">
              ¥{{optionsInfo.fanli}}
            </view>
            <view class="texttips">
@@ -296,7 +299,8 @@
        showtar: false,
        platform: '',
        inviteCodeShow: false,
        inviterShow: false
        inviterShow: false,
      frompage:'',
      };
    },
    onPageScroll(e) {
@@ -312,6 +316,7 @@
        console.log("初始化")
        getApp().getAppInfo();
     }
     //console.log("2222222222222222-"+getApp().globalData.hasbcinit);
     if(!getApp().globalData.hasbcinit)
     {
        getApp().bcInit();
@@ -323,6 +328,10 @@
      this.showtar = getApp().globalData.ifwt == 1 ? false : true;
      this.platform = plus.os.name
      // #endif
     if(options.frompage)
     {
        this.frompage=options.frompage;
     }
      if (options.id) {
        this.optionsInfo.goodsId = options.id
        this.pageType = this.optionsInfo.sourceType ? this.optionsInfo.sourceType : 'tb';
@@ -512,6 +521,7 @@
            console.log(this.pageType)
            if (this.pageType == 'tb' || this.pageType == 'tmshop' || this.pageType == 'tm') {
              if (this.user.tb_account) {
                this.getTbsrc()
              } else {
                this.empowerModel = true
@@ -566,6 +576,16 @@
        }).then(e => {
         console.log(e)
          if (e.code != 0) return that.$alert(e.msg)
        if(that.frompage=='freebuy')
        {//0元购的记录商品id
        console.log(e.data.info.itemId);
           this.$u.api.updateFirstFreeBrowse({
              goodsid:that.optionsInfo.goodsId,
              new_goodsId:e.data.info.itemId
           }).then(e=>{
           });
        }
          var res = e.data.info;
          var tburl = res.shortUrl
          // #ifdef APP-PLUS