zhaojs
2023-07-13 70f5b82bc3fceafac2faf470280876b0eca6fac8
uniapp/pages/goods/goodsDetail.vue
@@ -281,7 +281,7 @@
   <uni-popup ref="popup_pddtip" type="center">
      <view class="pdd_pop_contant">
         <view class="pdd_pop_title">比价订单</view>
         <view class="pdd_pop_text">本次自购涉及比价行为,自购收益为0,建议先收藏该商品,2小时候通过大返官app购买,可正常获取对应收益。</view>
         <view class="pdd_pop_text">本次自购涉及比价行为,自购收益为0,建议先收藏该商品,2小时后通过大返官app购买,可正常获取对应收益。</view>
      </view>
   </uni-popup>
  </view>
@@ -373,6 +373,7 @@
      console.log(options);
      if(options.sourcefrom)
      {
         console.log(decodeURIComponent(options.info));
         this.optionsInfo = JSON.parse(decodeURIComponent(options.info));
         this.pageInfo = JSON.parse(decodeURIComponent(options.info));
         console.log(this.optionsInfo)
@@ -382,7 +383,6 @@
         this.optionsInfo = JSON.parse(options.info);
         this.pageInfo = JSON.parse(options.info);
      }
        this.pageType = this.optionsInfo.sourceType;
        if (!this.optionsInfo.faction) {
          if (this.pageType == 'tb' || this.pageType == 'tm' || this.pageType == 'tmshop') this.faction = 't';
@@ -390,10 +390,7 @@
          if (this.pageType == 'pdd') 
        {
           this.faction = 'p';
           if(options.proform&&options.proform=="clipboard")
           {//来自剪贴板
              this.isshowpdd=true;
           }
        }
          if (this.pageType == 'wph') this.faction = 'w';
         if (this.pageType == 'dy') this.faction = 'd';
@@ -422,6 +419,10 @@
        this.pageInfo.showImgs.push(a)
        this.getrecommend()
      } else if (this.pageType == 'pdd') {
        if(this.optionsInfo.predictPromotionRate==0)
        {//比价订单
           this.remindModel=true;
        }
      } else if (this.pageType == 'jd') {
@@ -438,18 +439,18 @@
        this.empowerModel = false
        this.pddempowerModel = false
      },
     closeremind()
     {
        this.remindModel=false;
     },
      getPageInfo(e) {
        var that = this;
        if (this.faction == 'j') {
         var loinf={
            goodsId: this.optionsInfo.goodsId,
            goods: JSON.stringify(this.optionsInfo)
          }
         console.log(loinf)
          this.$u.api.getJdsDetail({
            goodsId: this.optionsInfo.goodsId,
            goods: JSON.stringify(this.optionsInfo)
          }).then(e => {
           console.log(e)
            var res = e.data.detailPics;
            this.JdDetails = that.JdDetails.concat(res)
            that.$forceUpdate()
@@ -578,7 +579,6 @@
            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
@@ -632,10 +632,11 @@
          if (e.code != 0) return that.$alert(e.msg)
        if(that.frompage=='freebuy')
        {//0元购的记录商品id
        console.log(e.data.info.itemId);
          console.log(e.data.info.itemId);
           this.$u.api.updateFirstFreeBrowse({
              goodsid:that.optionsInfo.goodsId,
              new_goodsId:e.data.info.itemId
              new_goodsId:e.data.info.itemId,
            plateform:'tb'
           }).then(e=>{
              
           });
@@ -697,7 +698,20 @@
      },
      getJDsrc() {
        var that = this;
        var that = this;
        console.log(this.frompage);
        console.log(that.optionsInfo.goodsId);
        if(this.frompage=='freebuy')
        {//0元购的记录商品id
           this.$u.api.updateFirstFreeBrowse({
              goodsid:that.optionsInfo.goodsId,
              new_goodsId:that.optionsInfo.goodsId,
               plateform:'jd'
           }).then(e=>{
           });
        }
        this.$u.api.getPrivilegeLink({
          goodsId: this.optionsInfo.goodsId,
          type: 1
@@ -757,6 +771,16 @@
       }).then(e => {
         var res = e.data.info;
        console.log(res)
        if(that.frompage=='freebuy')
        {//0元购的记录商品id
           this.$u.api.updateFirstFreeBrowse({
              goodsid:that.optionsInfo.goodsId,
              new_goodsId:that.optionsInfo.goodsId,
            plateform:'dy'
           }).then(e=>{
           });
        }
         // #ifdef APP-PLUS
         plus.runtime.openURL(res.dy_deeplink, e => {
           uni.navigateTo({