From 55803b1a7b478aade9b6e59ca6675777375e2a92 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期五, 07 七月 2023 15:48:24 +0800
Subject: [PATCH] no message

---
 uniapp/pages/goods/goodsDetail.vue |   99 ++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 81 insertions(+), 18 deletions(-)

diff --git a/uniapp/pages/goods/goodsDetail.vue b/uniapp/pages/goods/goodsDetail.vue
index f635732..7e2ed89 100644
--- a/uniapp/pages/goods/goodsDetail.vue
+++ b/uniapp/pages/goods/goodsDetail.vue
@@ -28,8 +28,8 @@
         <view class="pagetopBar-container colCen">
           <view class="topbarbox"></view>
         </view>
-        <view class="currentbox rowCenCen" v-if="optionsInfo.imageList || pageInfo.showImgs">
-          <view>{{currentIndex+1}}/{{pageType=='jd'?optionsInfo.imgs.length:pageInfo.showImgs.length}}</view>
+        <view class="currentbox rowCenCen" v-if="pageInfo.imgs&&pageInfo.imgs.length>0">
+          <view>{{currentIndex+1}}/{{pageInfo.imgs.length}}</view>
         </view>
       </view>
     </view>
@@ -212,6 +212,8 @@
             </view>
           </view>
         </view>
+		
+	
 
        <!-- <view class="right-container rowCen borderBox" v-if="!showtar || platform!='iOS'">
           <view class="leftsharebox btnbox colCenCen" @tap="goPath()">
@@ -276,6 +278,12 @@
     <u-popup v-model="inviterShow" mode="center" border-radius="32" v-if="inviterShow" :mask-close-able='true'>
       <inviter-model ref='invitermodel' @rewrite='rewriteCode' @setInvite='setCodebtn'></inviter-model>
     </u-popup>
+	<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灏忔椂鍚庨�氳繃澶ц繑瀹榓pp璐拱锛屽彲姝e父鑾峰彇瀵瑰簲鏀剁泭銆�</view>
+		</view>
+	</uni-popup>
   </view>
 </template>
 
@@ -321,6 +329,7 @@
         inviteCodeShow: false,
         inviterShow: false,
 		frompage:'',
+		isshowpdd:false
       };
     },
     onPageScroll(e) {
@@ -333,15 +342,19 @@
 	  
 	  if(!getApp().globalData.hasinit)
 	  {
-		  console.log("鍒濆鍖�")
 	  	getApp().getAppInfo();
 	  }
-	  //console.log("2222222222222222-"+getApp().globalData.hasbcinit);
 	  if(!getApp().globalData.hasbcinit)
 	  {
 		  getApp().bcInit();
 	  }
     },
+	 onReady(){
+		 if(this.isshowpdd)
+		 {
+			this.$refs.popup_pddtip.open();
+		 }
+	},
     onLoad(options) {
       this.appinfo = utils.getCacheSync('appInfo')
       // #ifdef APP-PLUS
@@ -357,13 +370,28 @@
         this.pageType = this.optionsInfo.sourceType ? this.optionsInfo.sourceType : 'tb';
         this.faction = this.optionsInfo.faction ? this.optionsInfo.faction : 't';
       } else {
-        this.optionsInfo = JSON.parse(options.info);
-        this.pageInfo = JSON.parse(options.info);
+		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)
+		}
+		else
+		{
+			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';
           if (this.pageType == 'jd') this.faction = 'j';
-          if (this.pageType == 'pdd') this.faction = 'p';
+          if (this.pageType == 'pdd') 
+		  {
+			  this.faction = 'p';
+			 
+		  }
           if (this.pageType == 'wph') this.faction = 'w';
 		   if (this.pageType == 'dy') this.faction = 'd';
         } else {
@@ -391,18 +419,30 @@
         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') {
 
       } else if (this.pageType == 'wph') {
 
       }
+	  else if(this.pageType=='dy')
+	  {
+		  //this.optionsInfo.imgs=[]
+	  }
     },
     methods: {
       closeMdl() {
         this.empowerModel = false
         this.pddempowerModel = false
       },
+	  closeremind()
+	  {
+		  this.remindModel=false;
+	  },
       getPageInfo(e) {
         var that = this;
         if (this.faction == 'j') {
@@ -410,7 +450,7 @@
             goodsId: this.optionsInfo.goodsId,
             goods: JSON.stringify(this.optionsInfo)
           }).then(e => {
-            console.log(e);
+			  console.log(e)
             var res = e.data.detailPics;
             this.JdDetails = that.JdDetails.concat(res)
             that.$forceUpdate()
@@ -420,19 +460,16 @@
           this.$u.api.getGoodsDetail({
             goodsId: this.optionsInfo.goodsId
           }).then(e => {
-            console.log(e)
             if (e.code != 0) return that.$alert(e.msg)
             var res = e.data.info;
             this.pageInfo = res
             this.pageInfo.showImgs = []
-            console.log(this.pageInfo)
             this.pageInfo.imgs.map(items => {
               var a = {}
               a.url = items
               this.pageInfo.showImgs.push(a)
             })
             this.optionsInfo = res
-            console.log(this.pageInfo);
           }).catch(function(err) {})
         } else if (this.faction == 'p') {
           var that = this;
@@ -456,13 +493,14 @@
               a.url = items
               this.pageInfo.showImgs.push(a)
             })
-            console.log(this.pageInfo);
           })
         }else if(this.faction == 'd'){
+			console.log(this.optionsInfo.goodsId);
 			var that = this;
 			this.$u.api.getDyGoodsDetail({
 			  goodsId: this.optionsInfo.goodsId
 			}).then(e => {
+				console.log(e);
 			  var res = e.data.info;
 			  this.pageInfo = res
 			  that.optionsInfo.imgs = that.pageInfo.imgs;
@@ -541,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
@@ -579,12 +616,10 @@
       },
       
       updataUser() {
-        console.log('鏇存柊')
         var that = this;
         this.$u.api.getUserInfo({}).then(e => {
           utils.setCache('userInfo', e.data.userinfo)
           that.user = e.data.userinfo;
-          console.log(that.user)
         }).catch(function(err) {})
       },
 
@@ -594,14 +629,14 @@
           goodsId: this.optionsInfo.goodsId,
           type: 0
         }).then(e => {
-			console.log(e)
           if (e.code != 0) return that.$alert(e.msg)
 		  if(that.frompage=='freebuy')
 		  {//0鍏冭喘鐨勮褰曞晢鍝乮d
-		  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=>{
 		  		
 		  	});
@@ -723,6 +758,16 @@
 	    }).then(e => {
 	      var res = e.data.info;
 		  console.log(res)
+		  if(that.frompage=='freebuy')
+		  {//0鍏冭喘鐨勮褰曞晢鍝乮d
+		  	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({
@@ -836,6 +881,24 @@
   }
 </style>
 <style lang="scss" scoped>
+	.pdd_pop_contant{
+		background-color: rgb(255, 255, 255);
+		    padding: 40rpx;
+		    width: 80%;
+			margin:0 auto;
+		    border-radius: 20rpx;
+		.pdd_pop_title
+		{
+			text-align: center;
+			margin-bottom: 30rpx;
+			font-size: 18px;
+		}
+		.pdd_pop_text
+		{
+			margin-bottom: 30rpx;
+			color: #868080;
+		}
+	}
   .container {
     .flexbox {
       position: fixed;

--
Gitblit v1.9.3