Commit 1b33cbef5556db5ca3778c766ad9d68e00deea25
Merge remote-tracking branch 'origin/master'
Showing
6 changed files
with
178 additions
and
99 deletions
components/MobileProductDetail.vue
components/ProductDetail.vue
... | ... | @@ -58,7 +58,7 @@ |
58 | 58 | > |
59 | 59 | <v-carousel-item |
60 | 60 | cover |
61 | - v-for="(slide, i) in info.productimageliststore" | |
61 | + v-for="(slide, i) in info?.productimageliststore" | |
62 | 62 | :src="slide.url" |
63 | 63 | :key="i" |
64 | 64 | :alt="info.name" |
... | ... | @@ -255,7 +255,9 @@ |
255 | 255 | style="width: 100%" |
256 | 256 | > |
257 | 257 | <v-tab :value="1">Product Details</v-tab> |
258 | - <v-tab :value="2">Specification</v-tab> | |
258 | + <v-tab :value="2" v-if="info.productAttributeList" | |
259 | + >Specification</v-tab | |
260 | + > | |
259 | 261 | <!-- <v-tab :value="3">商品百科</v-tab> --> |
260 | 262 | </v-tabs> |
261 | 263 | <v-window |
... | ... | @@ -272,32 +274,32 @@ |
272 | 274 | <v-window-item key="1" :value="1"> |
273 | 275 | <!-- 修改位置 1: 使用 clearSpanStyle 方法清理 info.advantage --> |
274 | 276 | <div v-if="info.advantage" class="tw-mb-[24px]"> |
275 | - <div class="text-h6">Advantage</div> | |
276 | - <v-divider class="tw-mb-[12px]"></v-divider> | |
277 | + <!-- <div class="text-h6">Advantage</div> | |
278 | + <v-divider class="tw-mb-[12px]"></v-divider> --> | |
277 | 279 | <div v-html="clearSpanStyle(info.advantage)"></div> |
278 | 280 | </div> |
279 | 281 | <!-- 修改位置 2: 使用 clearSpanStyle 方法清理 info.physicalproperty --> |
280 | 282 | <div v-if="info.physicalproperty" class="tw-mb-[24px]"> |
281 | - <div class="text-h6">Physical Property</div> | |
282 | - <v-divider class="tw-mb-[12px] html-content"></v-divider> | |
283 | + <!-- <div class="text-h6">Physical Property</div> | |
284 | + <v-divider class="tw-mb-[12px] html-content"></v-divider> --> | |
283 | 285 | <div v-html="clearSpanStyle(info.physicalproperty)"></div> |
284 | 286 | </div> |
285 | 287 | <!-- 修改位置 3: 使用 clearSpanStyle 方法清理 info.storage --> |
286 | 288 | <div v-if="info.storage" class="tw-mb-[24px]"> |
287 | - <div class="text-h6">Storage</div> | |
288 | - <v-divider class="tw-mb-[12px]"></v-divider> | |
289 | + <!-- <div class="text-h6">Storage</div> | |
290 | + <v-divider class="tw-mb-[12px]"></v-divider> --> | |
289 | 291 | <div v-html="clearSpanStyle(info.storage)"></div> |
290 | 292 | </div> |
291 | 293 | <!-- 修改位置 4: 使用 clearSpanStyle 方法清理 info.introduction --> |
292 | 294 | <div v-if="info.introduction" class="tw-mb-[24px]"> |
293 | - <div class="text-h6">Introduction</div> | |
294 | - <v-divider class="tw-mb-[12px]"></v-divider> | |
295 | + <!-- <div class="text-h6">Introduction</div> | |
296 | + <v-divider class="tw-mb-[12px]"></v-divider> --> | |
295 | 297 | <div v-html="clearSpanStyle(info.introduction)"></div> |
296 | 298 | </div> |
297 | 299 | <!-- 修改位置 5: 使用 clearSpanStyle 方法清理 info.description --> |
298 | 300 | <div v-if="info.description" class="tw-mb-[24px]"> |
299 | - <div class="text-h6">Description</div> | |
300 | - <v-divider class="tw-mb-[12px]"></v-divider> | |
301 | + <!-- <div class="text-h6">Description</div> | |
302 | + <v-divider class="tw-mb-[12px]"></v-divider> --> | |
301 | 303 | <div v-html="clearSpanStyle(info.description)"></div> |
302 | 304 | </div> |
303 | 305 | </v-window-item> |
... | ... | @@ -631,13 +633,34 @@ const clearSpanStyle = (htmlContent) => { |
631 | 633 | span.removeAttribute("style"); // 清空 style 属性 |
632 | 634 | }); |
633 | 635 | |
634 | - // 修改 img 的 style 属性,追加 width: 100% | |
636 | + // const imgs = doc.querySelectorAll("img"); | |
637 | + // imgs.forEach((img) => { | |
638 | + // const style = img.getAttribute("style") || ""; // 获取现有 style | |
639 | + // if (!style.includes("width: 100%")) { | |
640 | + // img.setAttribute("style", `${style} width: 100%; height: auto;`.trim()); // 添加 width: 100% 和 height: auto | |
641 | + // } | |
642 | + // }); | |
635 | 643 | const imgs = doc.querySelectorAll("img"); |
644 | + | |
636 | 645 | imgs.forEach((img) => { |
637 | - const style = img.getAttribute("style") || ""; // 获取现有 style | |
638 | - if (!style.includes("width: 100%")) { | |
639 | - img.setAttribute("style", `${style} width: 100%;`.trim()); // 添加 width: 100% | |
646 | + // 去除 img 标签内的 width 和 height 属性,如果存在的话 | |
647 | + if (img.hasAttribute("width")) { | |
648 | + img.removeAttribute("width"); | |
640 | 649 | } |
650 | + if (img.hasAttribute("height")) { | |
651 | + img.removeAttribute("height"); | |
652 | + } | |
653 | + | |
654 | + // 获取现有的 style 属性,如果存在的话 | |
655 | + let style = img.getAttribute("style") || ""; | |
656 | + | |
657 | + // 如果 style 中有 width 和 height,移除它们 | |
658 | + style = style | |
659 | + .replace(/width\s*:\s*[^;]+;?/gi, "") | |
660 | + .replace(/height\s*:\s*[^;]+;?/gi, ""); | |
661 | + | |
662 | + // 添加 width: 100% 和 height: auto 样式 | |
663 | + img.setAttribute("style", `${style} width: 100%; height: auto;`.trim()); | |
641 | 664 | }); |
642 | 665 | |
643 | 666 | // 返回处理后的 HTML | ... | ... |
deploy/prod2.sh
pages/contact.vue
... | ... | @@ -3,12 +3,12 @@ |
3 | 3 | Contact Us |
4 | 4 | </div> |
5 | 5 | <v-card class="pa-10 tw-max-w-[800px] tw-m-auto"> |
6 | - <h3 class="text-h5 tw-mb-5">Official Web</h3> | |
6 | + <!-- <h3 class="text-h5 tw-mb-5">Official Web</h3> | |
7 | 7 | <div class="tw-mb-10"> |
8 | 8 | <label class="text-subtitle-1 tw-mr-4 tw-w-20 tw-inline-block">URL</label> |
9 | 9 | <span>http://www.canrud.com</span> |
10 | 10 | </div> |
11 | - <h3 class="text-h5 tw-mb-5">Technical Center</h3> | |
11 | + <h3 class="text-h5 tw-mb-5">Technical Center</h3> --> | |
12 | 12 | <!-- <div> |
13 | 13 | <label class="text-subtitle-1 tw-mr-4 tw-w-20 tw-inline-block">QQ</label> |
14 | 14 | <span>3632191327</span> |
... | ... | @@ -34,34 +34,136 @@ |
34 | 34 | <div class="tw-w-[300px]"> |
35 | 35 | <v-img src="/wechat.jpg" alt="canrud-wechat"></v-img> |
36 | 36 | </div> |
37 | - <h3 class="text-h5 tw-mb-5 tw-mt-5">Other Platforms</h3> | |
38 | - <div class="tw-mb-5"> | |
39 | - <label class="text-subtitle-1 tw-mr-4 tw-w-20 tw-inline-block" | |
40 | - >LinkedIn:</label | |
41 | - > | |
42 | - <span>https://www.linkedin.com/company/canrd?originalSubdomain=cn</span> | |
43 | - </div> | |
44 | - <div class="tw-mb-5"> | |
45 | - <label class="text-subtitle-1 tw-mr-4 tw-w-20 tw-inline-block" | |
46 | - >Amazon:</label | |
47 | - > | |
48 | - <span | |
49 | - >https://www.amazon.com/s?me=A3A2SQ086XUS66&marketplaceID=ATVPDKIKX0DER</span | |
50 | - > | |
51 | - </div> | |
52 | - <div class="tw-mb-5"> | |
53 | - <label class="text-subtitle-1 tw-mr-4 tw-w-20 tw-inline-block" | |
54 | - >Alibaba:</label | |
55 | - > | |
56 | - <span | |
57 | - >https://canrd.en.alibaba.com/company_profile.html?spm=a2700.galleryofferlist.normal_offer.d_companyName.262213a0fqshG2</span | |
58 | - > | |
59 | - </div> | |
60 | - <div class="tw-mb-5"> | |
61 | - <label class="text-subtitle-1 tw-mr-4 tw-w-20 tw-inline-block" | |
62 | - >Youtube:</label | |
63 | - > | |
64 | - <span>https://www.youtube.com/@Canrd_Tech</span> | |
37 | + <div style="display: flex; gap: 16px; align-items: center"> | |
38 | + <span class="text-h5 tw-mb-5 tw-mt-5">Other Platforms</span> | |
39 | + <span class="tw-mt-2"> | |
40 | + <a | |
41 | + href="https://www.linkedin.com/company/canrd?originalSubdomain=cn" | |
42 | + rel="noopener noreferrer" | |
43 | + style="display: flex; align-items: center; gap: 8px" | |
44 | + > | |
45 | + <span | |
46 | + ><svg | |
47 | + t="1733206392822" | |
48 | + class="icon" | |
49 | + viewBox="0 0 1024 1024" | |
50 | + version="1.1" | |
51 | + xmlns="http://www.w3.org/2000/svg" | |
52 | + p-id="5464" | |
53 | + width="20" | |
54 | + height="20" | |
55 | + > | |
56 | + <path | |
57 | + d="M948.245333 0H75.52C33.877333 0 0.021333 33.066667 0.021333 73.813333v876.288C0 990.890667 33.877333 1024 75.52 1024h872.704c41.749333 0 75.733333-33.109333 75.733333-73.898667V73.834667C1024 33.045333 989.994667 0 948.266667 0z" | |
58 | + fill="#007BB5" | |
59 | + p-id="5465" | |
60 | + ></path> | |
61 | + <path | |
62 | + d="M151.744 383.893333h152.021333V872.533333H151.744V383.893333z m76.053333-242.922666a88.106667 88.106667 0 1 1-0.128 176.170666 88.106667 88.106667 0 0 1 0.128-176.170666M399.04 383.893333h145.578667v66.794667h2.090666c20.266667-38.4 69.802667-78.933333 143.701334-78.933333 153.770667 0 182.186667 101.184 182.186666 232.810666V872.533333h-151.850666v-237.653333c0-56.661333-0.981333-129.557333-78.933334-129.557333-79.018667 0-91.093333 61.76-91.093333 125.525333v241.706667h-151.68V383.872z" | |
63 | + fill="#FFFFFF" | |
64 | + p-id="5466" | |
65 | + ></path></svg></span | |
66 | + >LinkedIn</a | |
67 | + > | |
68 | + </span> | |
69 | + <span class="tw-mt-2"> | |
70 | + <a | |
71 | + href="https://www.amazon.com/s?me=A3A2SQ086XUS66&marketplaceID=ATVPDKIKX0DER" | |
72 | + rel="noopener noreferrer" | |
73 | + style="display: flex; align-items: center; gap: 8px" | |
74 | + ><svg | |
75 | + t="1733207196625" | |
76 | + class="icon" | |
77 | + viewBox="0 0 1126 1024" | |
78 | + version="1.1" | |
79 | + xmlns="http://www.w3.org/2000/svg" | |
80 | + p-id="7890" | |
81 | + width="20" | |
82 | + height="20" | |
83 | + > | |
84 | + <path | |
85 | + d="M2.008553 794.830142c3.382073-5.461063 8.7738-5.813248 16.349072-1.021335q256.233047 148.673652 557.663492 148.72648 200.998387 0 396.851576-74.949297l14.798359-6.589155c6.483499-2.818578 10.993664-4.686257 13.777024-6.096097 10.606261-4.122762 18.322407-2.149427 24.665032 6.096097 5.637156 8.173986 4.228417 15.785577-5.637156 22.550824-12.015 8.914674-28.187979 19.273305-47.249974 30.724809q-87.681873 52.376462-196.611486 81.07621c-71.879788 19.061995-143.054106 28.645819-212.149434 28.645819q-159.614488 0-302.316409-55.777245A840.520599 840.520599 0 0 1 7.046995 810.829231c-4.686257-3.488829-7.043693-7.043693-7.043693-10.323413a9.795136 9.795136 0 0 1 2.075688-5.745012z m308.411405-292.13277q0-70.822133 34.918008-121.063475c23.255193-33.367295 54.96612-58.736697 95.839351-75.860575 37.384401-15.750358 82.484948-27.02577 136.817135-33.825135 18.322407-2.149427 48.518939-4.827131 90.201094-8.173986v-17.37591c0-43.692909-4.932786-73.188374-14.09399-88.087986-14.197444-20.190086-36.649216-30.548717-67.651371-30.548718h-8.562489c-22.550824 2.149427-42.105877 9.196422-58.525386 21.598825-16.454727 12.684151-27.02577 29.597819-31.710926 51.478391-2.818578 14.09399-9.685078 21.845354-20.436616 23.959562l-118.389073-14.798359c-11.666117-2.818578-17.476063-8.456834-17.476063-18.322406a28.0372 28.0372 0 0 1 1.021336-7.043693q17.389117-90.907664 85.514836-135.302742C463.72704 20.401397 516.544833 3.522947 577.149209 0h25.369401c77.516943 0 138.931344 20.401397 182.658371 60.604376 6.342626 7.043693 12.684151 14.09399 19.026776 22.550824 5.637156 7.751364 10.535824 14.763141 13.283965 21.140984a90.185686 90.185686 0 0 1 9.161204 26.77814c2.818578 11.944563 4.932786 19.731145 6.342625 23.959563 1.409839 4.897568 2.924233 14.09399 3.559266 28.892349 0.45784 14.692704 0.950899 23.149538 0.950899 25.973618v248.049156a153.121084 153.121084 0 0 0 7.751364 48.659813c4.932786 14.692704 9.865573 25.369402 14.798359 31.675708l23.959562 31.675709c4.228417 6.377844 6.377844 12.015 6.377844 16.912567 0 5.637156-2.818578 10.606261-8.456834 14.763141-56.375959 49.328964-87.385818 76.107104-92.209647 80.335521q-11.627597 9.513388-29.597818 2.114208a284.646645 284.646645 0 0 1-24.700251-23.290411l-14.549629-16.312753c-2.818578-3.487729-7.786583-9.865573-14.904014-19.731146l-14.096191-20.436615c-38.053552 41.612818-75.297079 67.651371-112.751918 78.221313-23.222176 7.043693-51.337517 10.675597-85.973777 10.675597-52.150844 0.001101-95.843752-16.102543-129.664485-48.587175-33.825135-32.416396-50.736602-78.221313-50.736602-138.12242z m176.312444-20.58079c0 26.602048 6.589155 47.919125 19.978775 64.092104 13.38962 15.958367 31.710927 24.065218 54.258449 24.065218a65.995002 65.995002 0 0 0 9.161203-0.950899 54.539096 54.539096 0 0 1 7.786583-1.091772c28.85713-7.504835 50.736602-25.973618 66.915084-55.359026a147.597288 147.597288 0 0 0 16.912568-42.739809 183.627979 183.627979 0 0 0 6.342625-37.595712c0.704369-9.161203 0.704369-25.369402 0.70437-47.214755v-25.361698c-39.463391 0-69.730361 2.818578-90.201094 8.456834-59.898906 16.912568-90.201094 54.96612-90.201094 114.161757z m430.435684 330.116985a34.135498 34.135498 0 0 1 6.201752-7.997893c17.018223-11.416286 33.543387-19.273305 49.328964-23.501722 25.827242-6.23697 51.196643-10.429068 75.719701-11.275412a62.565604 62.565604 0 0 1 19.273305 1.409839c30.548717 2.818578 49.328964 7.892238 55.071775 15.503829 2.959452 4.228417 4.228417 10.711916 4.228417 18.322407v7.043693c0 23.959562-6.589155 52.147542-19.480213 84.563938-13.072654 32.416396-31.18265 58.631041-54.296969 78.926783-3.417292 2.818578-6.589155 4.228417-9.266859 4.228417a10.956245 10.956245 0 0 1-4.228417-0.563496c-4.228417-2.07899-5.038442-5.637156-2.99467-11.275412 25.362798-59.190134 37.875259-100.659878 37.875258-124.022927 0-7.043693-1.409839-12.684151-4.087543-16.17298-6.80817-7.788784-25.830543-12.081034-57.507352-12.081034q-17.123878 0-40.87213 2.149427c-17.058944 2.114209-32.874237 4.228417-46.968226 6.342625-4.228417 0-6.941339-0.669151-8.456834-2.07899-1.409839-1.409839-1.691587-2.219864-0.950899-3.631904a7.546657 7.546657 0 0 1 0.950899-2.959452z" | |
86 | + fill="#FF9900" | |
87 | + p-id="7891" | |
88 | + ></path></svg | |
89 | + >Amazon</a | |
90 | + > | |
91 | + </span> | |
92 | + <span class="tw-mt-2"> | |
93 | + <a | |
94 | + href="https://canrd.en.alibaba.com/company_profile.html?spm=a2700.galleryofferlist.normal_offer.d_companyName.262213a0fqshG2" | |
95 | + rel="noopener noreferrer" | |
96 | + style="display: flex; align-items: center; gap: 8px" | |
97 | + ><svg | |
98 | + t="1733207242907" | |
99 | + class="icon" | |
100 | + viewBox="0 0 1651 1024" | |
101 | + version="1.1" | |
102 | + xmlns="http://www.w3.org/2000/svg" | |
103 | + p-id="9032" | |
104 | + width="20" | |
105 | + height="20" | |
106 | + > | |
107 | + <path | |
108 | + d="M972.403613 749.997419c-59.986581 4.195097-54.172903-27.912258-18.531097-74.520774 81.259355-108.378839 231.787355-255.636645 238.558968-363.22271 9.348129-139.660387-131.138065-182.899613-275.819355-182.899612-100.64929 2.576516-204.833032 30.488774-275.819355 55.824516-244.504774 86.280258-397.708387 221.745548-494.988387 374.189419-100.64929 150.627097-69.367742 295.473548 148.050581 299.668645 164.203355-6.771613 275.026581-52.422194 386.64258-109.997419 0.792774 0-310.503226 88.856774-425.653677 23.717161-12.750452-6.804645-25.335742-16.152774-28.738065-42.28129 0-53.380129 88.097032-109.171613 139.726452-126.942968v-91.43329c104.018581 36.434581 226.733419 26.293677 331.742968-51.62942 3.402323 9.381161 6.771613 21.140645 5.945806 33.891097h17.771355c4.195097-36.467613-20.314839-71.944258-60.977548-74.520774 11.792516 9.348129 20.314839 16.945548 24.509935 23.717161l-1.585548 1.618581-0.825807 0.792774c-135.300129 94.835613-266.603355 50.803613-279.188645 48.227097l75.313549-73.728-21.140646-53.380129c149.867355-52.422194 273.408-90.640516 478.901678-126.909936l-45.980903-37.128258 23.717161-14.336c121.756903 33.858065 203.875097 59.193806 199.68 123.540645-1.618581 10.96671-5.945806 23.717161-12.750452 37.260388-36.302452 71.944258-142.897548 187.920516-186.136774 237.898322-27.879226 33.06529-55.824516 63.554065-75.313548 94.042839-21.933419 31.281548-33.032258 60.151742-33.858065 86.280258 4.195097 212.595613 631.279484-99.823484 754.820129-182.106839-180.157935 77.09729-375.642839 150.82529-588.07329 164.368516z m137.083871-488.547096c4.558452 8.390194 6.639484 18.696258 6.639484 30.819096a75.379613 75.379613 0 0 0-6.606452-30.819096z" | |
109 | + fill="#FF6600" | |
110 | + p-id="9033" | |
111 | + ></path></svg | |
112 | + >Alibaba</a | |
113 | + > | |
114 | + </span> | |
115 | + <span class="tw-mt-2"> | |
116 | + <a | |
117 | + href="https://www.youtube.com/@Canrd_Tech" | |
118 | + rel="noopener noreferrer" | |
119 | + style="display: flex; align-items: center; gap: 8px" | |
120 | + > | |
121 | + <svg | |
122 | + t="1733207323150" | |
123 | + class="icon" | |
124 | + viewBox="0 0 1024 1024" | |
125 | + version="1.1" | |
126 | + xmlns="http://www.w3.org/2000/svg" | |
127 | + p-id="14163" | |
128 | + width="20" | |
129 | + height="20" | |
130 | + > | |
131 | + <path | |
132 | + d="M1013.76 307.264s-9.984-70.570667-40.704-101.632c-38.933333-40.789333-82.56-41.002667-102.592-43.392C727.168 151.893333 512.213333 151.893333 512.213333 151.893333h-0.426666s-214.954667 0-358.250667 10.346667c-20.010667 2.389333-63.658667 2.602667-102.613333 43.392C20.245333 236.693333 10.24 307.264 10.24 307.264S0 390.122667 0 473.002667v77.674666c0 82.858667 10.24 165.738667 10.24 165.738667s9.984 70.570667 40.704 101.632c38.933333 40.789333 90.112 39.509333 112.896 43.776 81.92 7.850667 348.16 10.282667 348.16 10.282667s215.168-0.32 358.464-10.666667c20.010667-2.410667 63.658667-2.602667 102.613333-43.392 30.698667-31.061333 40.704-101.632 40.704-101.632S1024 633.536 1024 550.677333v-77.674666c0-82.88-10.24-165.738667-10.24-165.738667z" | |
133 | + fill="#DC2217" | |
134 | + p-id="14164" | |
135 | + ></path> | |
136 | + <path | |
137 | + d="M406.293333 644.821333l-0.064-287.722666 276.693334 144.362666-276.629334 143.36z" | |
138 | + fill="#FFFFFF" | |
139 | + p-id="14165" | |
140 | + ></path></svg | |
141 | + >Youtube</a | |
142 | + > | |
143 | + </span> | |
144 | + <span class="tw-mt-2"> | |
145 | + <a | |
146 | + href="https://x.com/canrdenerge?s=11" | |
147 | + rel="noopener noreferrer" | |
148 | + style="display: flex; align-items: center; gap: 8px" | |
149 | + ><svg | |
150 | + t="1733207912677" | |
151 | + class="icon" | |
152 | + viewBox="0 0 1024 1024" | |
153 | + version="1.1" | |
154 | + xmlns="http://www.w3.org/2000/svg" | |
155 | + p-id="22952" | |
156 | + width="20" | |
157 | + height="20" | |
158 | + > | |
159 | + <path | |
160 | + d="M1024 186.368a410.325333 410.325333 0 0 1-120.618667 33.877333 214.954667 214.954667 0 0 0 92.373334-119.125333 413.781333 413.781333 0 0 1-133.504 52.181333A207.189333 207.189333 0 0 0 708.949333 85.333333c-115.968 0-210.005333 96.426667-210.005333 215.424 0 16.896 1.792 33.28 5.376 49.066667-174.592-9.002667-329.386667-94.72-433.066667-225.152a219.306667 219.306667 0 0 0-28.416 108.373333c0 74.709333 37.12 140.672 93.44 179.328a206.250667 206.250667 0 0 1-95.146666-26.88v2.645334c0 104.405333 72.405333 191.488 168.533333 211.2a200.32 200.32 0 0 1-55.296 7.594666c-13.525333 0-26.752-1.28-39.552-3.84 26.709333 85.589333 104.277333 147.882667 196.224 149.546667A414.805333 414.805333 0 0 1 0 841.941333 584.96 584.96 0 0 0 322.048 938.666667c386.474667 0 597.76-328.192 597.76-612.906667 0-9.386667-0.213333-18.730667-0.554667-27.904 41.045333-30.378667 76.672-68.266667 104.746667-111.488" | |
161 | + fill="#55ACEE" | |
162 | + p-id="22953" | |
163 | + ></path></svg | |
164 | + >Twitter</a | |
165 | + > | |
166 | + </span> | |
65 | 167 | </div> |
66 | 168 | <div style="margin-bottom: 10px"> |
67 | 169 | <v-tabs |
... | ... | @@ -577,4 +679,7 @@ button .recommendButton { |
577 | 679 | line-height: 1.5em; /* 设置每行的高度 */ |
578 | 680 | min-height: calc(3 * 1.5em); /* 确保最小高度为3行 */ |
579 | 681 | } |
682 | +span a { | |
683 | + color: black; | |
684 | +} | |
580 | 685 | </style> | ... | ... |
pages/products/index.vue
... | ... | @@ -2,55 +2,6 @@ |
2 | 2 | <div class="tw-m-auto tw-pb-[64px]" style="padding-bottom: 0px"> |
3 | 3 | <CategoryList v-if="categoryStore.categoryVisible && !isMobile()" /> |
4 | 4 | <MobileCategoryList v-if="categoryStore.categoryVisible && isMobile()" /> |
5 | - <!-- <v-tabs | |
6 | - class="tabs" | |
7 | - v-model="tabRecom" | |
8 | - style="margin-top: 25px" | |
9 | - color="white" | |
10 | - bg-color="#eeeeee" | |
11 | - slider-color="blue-lighten-1" | |
12 | - selected-class="active" | |
13 | - v-if="recommendImages[0] !== null && !isMobile()" | |
14 | - > | |
15 | - <v-tab :value="1">Best Sellers</v-tab> | |
16 | - </v-tabs> | |
17 | - <div id="image-container" v-if="recommendImages[0] !== null && !isMobile()"> | |
18 | - <div class="recommend-left-box"> | |
19 | - <v-img | |
20 | - src="https://m-canrd.oss-cn-shenzhen.aliyuncs.com/crmebimage/public/maintain/2024/09/14/76c987e13a334be481a346c19c2284f3qy4tjnxps7.png" | |
21 | - alt="往左移" | |
22 | - class="recommend-img-left" | |
23 | - @click="toggleRowLeft" | |
24 | - /> | |
25 | - </div> | |
26 | - <div class="image-row" id="row1"> | |
27 | - <div | |
28 | - v-for="(imageObj, index) in recommendImages" | |
29 | - :key="'row1-' + index" | |
30 | - class="imageTotal" | |
31 | - > | |
32 | - <a v-if="imageObj" :href="imageObj[0]?.productUrl" target="_blank"> | |
33 | - <img | |
34 | - :src="imageObj[0]?.url" | |
35 | - :alt="'Image ' + (index + 1)" | |
36 | - class="item-imgHot" | |
37 | - /> | |
38 | - <span class="image-name"> | |
39 | - {{ imageObj[0]?.name }} | |
40 | - </span> | |
41 | - </a> | |
42 | - <div v-else style="width: 200px; height: 200px"></div> | |
43 | - </div> | |
44 | - </div> | |
45 | - <div class="recommend-right-box"> | |
46 | - <v-img | |
47 | - src="https://m-canrd.oss-cn-shenzhen.aliyuncs.com/crmebimage/public/maintain/2024/09/14/b5daa0a8f2f140f5b406e984c730a453iznzlekysg.png" | |
48 | - alt="往右移" | |
49 | - class="recommend-img-right" | |
50 | - @click="toggleRowRight" | |
51 | - /> | |
52 | - </div> | |
53 | - </div> --> | |
54 | 5 | <v-container class=""> |
55 | 6 | <div class="tw-text-center tw-mt-[32px]" v-if="loading"> |
56 | 7 | <v-progress-circular | ... | ... |
stores/product_list.ts
... | ... | @@ -29,7 +29,7 @@ export const useProductListStore = defineStore("productList", () => { |
29 | 29 | (data.value?.data?.records || []).map((record: Product) => ({ |
30 | 30 | ...record, |
31 | 31 | // http://112.74.45.244:8100/api/show/image?fileKey=ac82abea34243b7f7a56e5c3ca03f3a9 |
32 | - imgList: record.productimageliststore ? JSON.parse( | |
32 | + imgList: record?.productimageliststore ? JSON.parse( | |
33 | 33 | record.productimageliststore as unknown as string |
34 | 34 | ).map((item: ProductImage) => ({ |
35 | 35 | url: `/api/show/image?fileKey=${item.fileKey}&psize=p256`, | ... | ... |