From 7dbe13ff4c1b5784aa285faf6b5248d2de25e9ce Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期五, 10 十月 2025 16:22:45 +0800
Subject: [PATCH] 获取定制模板信息

---
 pages/product/goods.vue |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/pages/product/goods.vue b/pages/product/goods.vue
index 7105891..ae818f0 100644
--- a/pages/product/goods.vue
+++ b/pages/product/goods.vue
@@ -272,7 +272,7 @@
 
         <!-- 鍟嗗搧瑙勬牸  鍟嗗搧璇︽儏锛屼互鍙婇粯璁ゅ弬涓庢椿鍔ㄧ殑id-->
         <popupGoods :addr="delivery" ref="popupGoods" @changed="changedGoods" @closeBuy="closePopupBuy"
-          @queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :isGroup="isGroup" :id="productId"
+          @queryCart="cartCount()" :goodsDetail="goodsDetail" :consumizetemplateInfo="consumizetemplateInfo" :goodsSpec="goodsSpec" :isGroup="isGroup" :id="productId"
           v-if="goodsDetail.id" :pointDetail="pointDetail" :wholesaleList="wholesaleList" @handleClickSku="selectSku"
           :buyMask="buyMask" />
 
@@ -289,7 +289,7 @@
 
 
 /************鎺ュ彛API***************/
-import { getGoods, getGoodsList, getMpScene, getGoodsDistribution } from "@/api/goods.js";
+import { getGoods, getGoodsList, getMpScene, getGoodsDistribution,getTemplate } from "@/api/goods.js";
 import * as API_trade from "@/api/trade.js";
 import * as API_Members from "@/api/members.js";
 import * as API_store from "@/api/store.js";
@@ -374,6 +374,7 @@
           ___type: "other",
         },
       ],
+	  consumizetemplateInfo:{},
       popupsSwitch: false, //瀵艰埅鏍忓垪琛ㄦ爮寮�鍏�
       enableShare: false,
       selectedGoods: "", //閫夋嫨鐨勫晢鍝佽鏍兼樀绉�
@@ -757,6 +758,16 @@
       this.PromotionList = response.data.result.promotionMap;
       this.goodsParams = response.data.result.goodsParamsDTOList || [];
 	console.log('浼樻儬鍗锋椿鍔�--------------------銆�',response.data.result.promotionMap)
+	
+	if(this.goodsDetail.goodsType == 'PHYSICAL_GOODS'&& this.goodsDetail.customizeFlag ==='CUSTOMIZE'){
+			  //鑾峰彇妯℃澘淇℃伅
+			  this.consumizetemplateInfo = null;
+			  console.log('鏄ā鏉胯幏鍙栭渶瑕佽幏鍙栦俊鎭�-------------銆�',this.goodsDetail.id)
+			  const template = await getTemplate(this.goodsDetail.id)
+			  this.consumizetemplateInfo = template.data.data
+			  console.log('鑾峰彇鍒扮殑妯℃澘淇℃伅----------------->',template.data.data)
+			  
+	}
       // 鍒ゆ柇鏄惁鎷煎洟娲诲姩鎴栬�呯Н鍒嗗晢鍝� 濡傛灉鏈夊垯鏄剧ず鎷煎洟娲诲姩淇℃伅
       this.PromotionList &&
         Object.keys(this.PromotionList).forEach((item) => {
@@ -772,7 +783,6 @@
         });
       // 杞挱鍥�
       this.imgList = this.goodsDetail.goodsGalleryList.filter(i => i.indexOf("\"url\":") === -1 && i.indexOf("\"status\":") === -1);
-
       // 鑾峰彇搴楅摵鍩烘湰淇℃伅
       this.getStoreBaseInfoFun(this.goodsDetail.storeId);
 
@@ -789,6 +799,7 @@
       if (this.$options.filters.isLogin("auth")) {
         this.getGoodsCollectionFun(this.goodsDetail.id);
       }
+
       // 鑾峰彇IM 闇�瑕佺殑璇濅娇鐢�
       // this.getIMDetailMethods();
     },

--
Gitblit v1.8.0