From d2c5aeeb8e059dbdeb2a8b28d187bf5ad1d9dc82 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期一, 21 七月 2025 11:40:02 +0800
Subject: [PATCH] 解决主包过大问题

---
 pages/product/goods.vue |   82 ++++++++++++++++++++++++++++-------------
 1 files changed, 56 insertions(+), 26 deletions(-)

diff --git a/pages/product/goods.vue b/pages/product/goods.vue
index 099ba11..cd99290 100644
--- a/pages/product/goods.vue
+++ b/pages/product/goods.vue
@@ -184,21 +184,21 @@
           <Evaluation id="main5" :goodsDetail="goodsDetail" />
 
           <!-- 搴楅摵鎺ㄨ崘 -->
-          <storeLayout id="main7" :storeDetail="storeDetail" :goodsDetail="goodsDetail" :res="recommendList" />
+          <!-- <storeLayout id="main7" :storeDetail="storeDetail" :goodsDetail="goodsDetail" :res="recommendList" /> -->
 
           <!-- 瀹濊礉璇︽儏 -->
           <GoodsIntro id="main9" :res="goodsDetail" :goodsParams="goodsParams" :goodsId="goodsDetail.goodsId"
             v-if="goodsDetail.id" />
 
           <!-- 瀹濊礉鎺ㄨ崘 -->
-          <GoodsRecommend id="main11" :res="likeGoodsList" />
+          <!-- <GoodsRecommend id="main11" :res="likeGoodsList" /> -->
         </view>
       </scroll-view>
 
 
       <view class="page-bottom mp-iphonex-bottom" id="pageBottom">
         <view class="icon-btn">
-          <view class="icon-btn-item" @click="navigateToStore(goodsDetail.storeId)">
+        <view class="icon-btn-item" @click="navigateToStore(goodsDetail.storeId)">
             <u-icon size="34" class="red" name="home-fill"></u-icon>
             <view class="red icon-btn-name">搴楅摵</view>
           </view>
@@ -213,10 +213,10 @@
           </view>
         </view>
         <!-- 涓嬫灦灞曠ず -->
-        <div class="detail-btn" v-if="takeDownFromSale">
+<!--        <div class="detail-btn" v-if="takeDownFromSale">
           <view class="to-store-car to-store-btn"  @click="reStartTakeDownSale">
             鏌ョ湅绫讳技鍟嗗搧</view>
-        </div>
+        </div> -->
         <!-- 姝e父缁撶畻椤甸潰 -->
         <view class="detail-btn" v-if="!isGroup && !takeDownFromSale">
           <view class="to-store-car to-store-btn" v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS'" @click="shutMask(4)">
@@ -299,13 +299,15 @@
 import storeLayout from "./product/shop/-shop"; //搴楅摵缁勪欢
 import Evaluation from "./product/evaluation/-evaluation"; //璇勪环缁勪欢
 import GoodsSwiper from "./product/goods/-goods-swiper"; //杞挱鍥剧粍浠�
-import popupGoods from "@/components/m-buy/goods"; //璐墿杞﹀晢鍝佺殑妯″潡
+import popupGoods from "@/pages/product/m-buy/goods.vue"; //璐墿杞﹀晢鍝佺殑妯″潡
 import popupAddress from "./product/popup/address"; //鍦板潃閫夋嫨妯″潡
-import shares from "@/components/m-share/index"; //鍒嗕韩
-import popups from "@/components/popups/popups"; //姘旀场妗�
-import takeDownFormSaleGoods from "@/components/m-take-down-sale-goods/index"; //涓嬫灦妗�
+import shares from "@/pages/product/m-share/index.vue"; //鍒嗕韩
+import popups from "@/pages/product/popups/popups.vue"; //姘旀场妗�
+import takeDownFormSaleGoods from "@/pages/product/m-take-down-sale-goods/index"; //涓嬫灦妗�
 import setup from "./product/popup/popup";
-
+	import {
+		getSTSToken
+	} from '@/api/common.js'
 export default {
   components: {
     popups,
@@ -342,21 +344,21 @@
       // #endif
       navbarListData: [
         //瀵艰埅鏍忓垪琛ㄦ爮鏁版嵁
-        {
-          title: "棣栭〉",
-          icon: "home-fill",
-          ___type: "other",
-        },
+        // {
+        //   title: "棣栭〉",
+        //   icon: "home-fill",
+        //   ___type: "other",
+        // },
         {
           title: "璐墿杞�",
           icon: "bag-fill",
           ___type: "other",
         },
-        {
-          title: "鎼滅储",
-          icon: "search",
-          ___type: "category",
-        },
+        // {
+        //   title: "鎼滅储",
+        //   icon: "search",
+        //   ___type: "category",
+        // },
         {
           title: "涓汉涓績",
           icon: "account-fill",
@@ -398,10 +400,10 @@
           text: "璇︽儏",
           id: "3",
         },
-        {
-          text: "鎺ㄨ崘",
-          id: "4",
-        },
+        // {
+        //   text: "鎺ㄨ崘",
+        //   id: "4",
+        // },
       ],
       tabScrollTop: null,
       scrollArr: [],
@@ -576,8 +578,35 @@
           this.$store.state.distributionId = distributionId;
         }
       }
+	  const sts = await getSTSToken();
+	  const stsUrl = sts.data.data.endpoint
+	  // // 澶勭悊鏁版嵁
+	  // goodsList.data.result.records.forEach(item => {
+	  // 	if (item.thumbnail !== '' && item.thumbnail !== null && item.thumbnail.indexOf('http') ===
+	  // 		-1) {
+	  // 		item.thumbnail = stsUrl + '/' + item.thumbnail
+	  // 	}
+	  // 	if (item.goodsVideo !== '' && item.goodsVideo !== null && item.goodsVideo.indexOf(
+	  // 			'http') === -1) {
+	  // 		item.goodsVideo = stsUrl + '/' + item.goodsVideo
+	  // 	}
+	  // })
       /**鍟嗗搧淇℃伅浠ュ強瑙勬牸淇℃伅瀛樺偍 */
+	  console.log('--------------------------1>',response.data.result.data.goodsGalleryList)
+	  response.data.result.data.goodsGalleryList.forEach((item,index)=>{
+		  	if (item !== '' && item !== null && item.indexOf('http') ===
+		  		-1) {
+		  		response.data.result.data.goodsGalleryList[index] =  stsUrl + '/' + item
+				console.log('鏄惁鎵ц-------------銆�',item)
+		  	}
+	  })
+	   console.log('--------------------------2>',response.data.result.data.goodsGalleryList)
       this.goodsDetail = response.data.result.data;
+	  if (this.goodsDetail.goodsVideo !== '' && this.goodsDetail.goodsVideo !== null && this.goodsDetail.goodsVideo.indexOf(
+	  		'http') === -1) {
+	  	this.goodsDetail.goodsVideo = stsUrl + '/' + this.goodsDetail.goodsVideo
+	  }
+	  console.log('--------------------------2>',this.goodsDetail.goodsGalleryList)
       this.wholesaleList = response.data.result.wholesaleList;
       this.goodsSpec = response.data.result.specs;
       this.PromotionList = response.data.result.promotionMap;
@@ -703,13 +732,14 @@
      * 鏌ョ湅璐墿杞�
      */
     reluchToCart () {
+		console.log('鐐瑰嚮浜嗚喘鐗╄溅-----------------------銆�')
       let obj = {
         from: "product",
         id: this.productId,
       };
       storage.setCartBackbtn(obj);
-      uni.switchTab({
-        url: "/pages/tabbar/cart/cartList",
+      uni.redirectTo({
+        url: "/pages/cusbar/cart/cartList",
       });
     },
 

--
Gitblit v1.8.0