From ba3d748f9eb65a66fca9bd74fc7796b90a0a70ae Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期五, 30 六月 2023 09:06:15 +0800
Subject: [PATCH] Merge branch 'release/v1.1.3发布'

---
 uniapp/pages/goods/goodsDetail.vue |   40 ++++++++++++++++++++++++++--------------
 1 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/uniapp/pages/goods/goodsDetail.vue b/uniapp/pages/goods/goodsDetail.vue
index f635732..90c03aa 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>
@@ -333,10 +333,8 @@
 	  
 	  if(!getApp().globalData.hasinit)
 	  {
-		  console.log("鍒濆鍖�")
 	  	getApp().getAppInfo();
 	  }
-	  //console.log("2222222222222222-"+getApp().globalData.hasbcinit);
 	  if(!getApp().globalData.hasbcinit)
 	  {
 		  getApp().bcInit();
@@ -357,8 +355,19 @@
         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)
+		{
+			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';
@@ -397,6 +406,10 @@
       } else if (this.pageType == 'wph') {
 
       }
+	  else if(this.pageType=='dy')
+	  {
+		  //this.optionsInfo.imgs=[]
+	  }
     },
     methods: {
       closeMdl() {
@@ -406,11 +419,15 @@
       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()
@@ -420,19 +437,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 +470,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;
@@ -579,12 +594,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,7 +607,6 @@
           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

--
Gitblit v1.9.3