rambo 3 hónapja
szülő
commit
a10f7ce7fb

+ 9 - 4
python/custom_plugins/plugins/detail_template/clothing/detail_clothing1.py

@@ -150,12 +150,17 @@ class DetailPicGet(DetailBase):
         # 尺码表
         pp_1 = PictureProcessing(r"{}\4.jpg".format(self.root))
         color_pic_list_1 = []
-        for goods_art_no_dict in self.goods_no_value["货号资料"]:
+        for idx,goods_art_no_dict in enumerate(self.goods_no_value["货号资料"]):
             # color_name = goods_art_no_dict["颜色名称"]
             # goods_art_no = goods_art_no_dict["货号"]
-            pp_jpg = self.getSpecialImage(
-                category="模特图", instead_category="正面", resize=pp_1.width
-            )
+            if len(self.goods_no_value["货号资料"]) > 1:
+                pp_jpg = self.getSpecialImage(
+                    category="模特图", instead_category="正面", resize=pp_1.width/2.2
+                )
+            else:
+                pp_jpg = self.getSpecialImage(
+                    category="模特图", instead_category="正面", resize=pp_1.width
+                )
             color_pic_list_1.append(pp_jpg)
 
         # 颜色列表进行等分展示

+ 1 - 1
python/detail_template_test.py

@@ -4,7 +4,7 @@ import settings
 settings.is_test_plugins = True
 
 
-from custom_plugins.plugins.detail_template.clothing.detail_clothing2 import (
+from custom_plugins.plugins.detail_template.clothing.detail_clothing1 import (
     DetailPicGet,
 )