From 0e1bce71603c5cbb92b3fe6387c87430528d18a9 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期二, 18 七月 2023 16:14:45 +0800
Subject: [PATCH] no message

---
 uniapp/pages/goods/goodsDetail.vue |   50 ++++++++++++++++++++++++++++++++++----------------
 1 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/uniapp/pages/goods/goodsDetail.vue b/uniapp/pages/goods/goodsDetail.vue
index bc5f29f..48d87d0 100644
--- a/uniapp/pages/goods/goodsDetail.vue
+++ b/uniapp/pages/goods/goodsDetail.vue
@@ -329,7 +329,8 @@
         inviteCodeShow: false,
         inviterShow: false,
 		frompage:'',
-		isshowpdd:false
+		isshowpdd:false,
+		beforePddAuth:false,
       };
     },
     onPageScroll(e) {
@@ -406,6 +407,12 @@
         } else {
           this.memberId = ''
         }
+		console.log(this.user);
+		if(this.user.pdd_authority_ios==1||this.user.pdd_authority_android==1)
+		{
+			this.beforePddAuth=true;
+		}
+		console.log(this.beforePddAuth);
       } catch (e) {
         this.memberId = ''
       }
@@ -419,10 +426,10 @@
         this.pageInfo.showImgs.push(a)
         this.getrecommend()
       } else if (this.pageType == 'pdd') {
-		  if(this.optionsInfo.predictPromotionRate==0)
+		  /* if(this.optionsInfo.predictPromotionRate==0)
 		  {//姣斾环璁㈠崟
 			  this.remindModel=true;
-		  }
+		  } */
 
       } else if (this.pageType == 'jd') {
 
@@ -445,6 +452,7 @@
 	  },
       getPageInfo(e) {
         var that = this;
+		console.log(this.faction)
         if (this.faction == 'j') {
           this.$u.api.getJdsDetail({
             goodsId: this.optionsInfo.goodsId,
@@ -472,14 +480,7 @@
             this.optionsInfo = res
           }).catch(function(err) {})
         } else if (this.faction == 'p') {
-          var that = this;
-          this.$u.api.getPddDetail({
-            goods_sign: this.optionsInfo.goods_sign
-          }).then(e => {
-            var res = e.data;
-            that.pageInfo = res;
-			that.optionsInfo.imgs = that.pageInfo.imgs;
-          })
+			this.getPddGoodsDetail(this.optionsInfo.goods_sign);
         } else if (this.faction == 'w') {
           var that = this;
           this.$u.api.getWphGoodsDetail({
@@ -508,17 +509,28 @@
 			})
         }
       },
-      
-
+	  getPddGoodsDetail(goods_sign)
+	  {
+		  var that = this;
+		  this.$u.api.getPddDetail({
+		    goods_sign: goods_sign
+		  }).then(e => {
+		    var res = e.data;
+		    that.pageInfo = res;
+			console.log(res);
+		  	that.optionsInfo.imgs = that.pageInfo.imgs;
+			if(res.predictPromotionRate==0)
+			{//姣斾环璁㈠崟
+				this.remindModel=true;
+			}
+		  })
+	  },
       goDetails(info) {
         info.searchSource = 1
         uni.navigateTo({
           url: './goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
         })
       },
-
-
-
       getrecommend() {
         var that = this;
         this.$u.api.getSimilerGoods({
@@ -618,8 +630,14 @@
       updataUser() {
         var that = this;
         this.$u.api.getUserInfo({}).then(e => {
+		  console.log(e)
           utils.setCache('userInfo', e.data.userinfo)
           that.user = e.data.userinfo;
+		  if(that.pageType == 'pdd'&&!that.beforePddAuth&&(e.data.userinfo.pdd_authority_ios == 1||e.data.userinfo.pdd_authority_android == 1))
+		  {//閲嶆柊鏌ヨ鍟嗗搧璇︽儏
+		   console.log('閲嶆柊鏌ヨpdd鍟嗗搧');
+		  	that.getPddGoodsDetail(that.optionsInfo.goods_sign);0
+		  }
         }).catch(function(err) {})
       },
 

--
Gitblit v1.9.3