From b44e169dd8a6e0f15d3788970176922e96aec6e1 Mon Sep 17 00:00:00 2001
From: zhao_js <349234519@qq.com>
Date: 星期三, 15 十一月 2023 09:55:33 +0800
Subject: [PATCH] no message

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

diff --git a/uniapp/pages/goods/goodsDetail.vue b/uniapp/pages/goods/goodsDetail.vue
index 7e2ed89..9c50ade 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({
@@ -577,6 +589,7 @@
             this.inviteCodeShow = true
           } else {
             console.log(this.pageType)
+			console.log(this.user.tb_account)
             if (this.pageType == 'tb' || this.pageType == 'tmshop' || this.pageType == 'tm') {
               if (this.user.tb_account) {
                 this.getTbsrc()
@@ -618,8 +631,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) {})
       },
 
@@ -629,6 +648,7 @@
           goodsId: this.optionsInfo.goodsId,
           type: 0
         }).then(e => {
+			
           if (e.code != 0) return that.$alert(e.msg)
 		  if(that.frompage=='freebuy')
 		  {//0鍏冭喘鐨勮褰曞晢鍝乮d
@@ -649,12 +669,14 @@
               pname: 'com.taobao.taobao',
               action: 'taobao://'
             })) {
+				
             const plug = uni.requireNativePlugin('xiguazhu-baichuan')
+			 console.log(tburl);
             plug.detailPage({
               url: tburl,
               "openType": 0
             }, result => {
-              //  console.log(result);
+              console.log(result);
             });
           } else {
             uni.navigateTo({
@@ -698,7 +720,20 @@
       },
 
       getJDsrc() {
-        var that = this;
+		  var that = this;
+		  console.log(this.frompage);
+		  console.log(that.optionsInfo.goodsId);
+		  if(this.frompage=='freebuy')
+		  {//0鍏冭喘鐨勮褰曞晢鍝乮d
+		  	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

--
Gitblit v1.9.3