Commit 9fbe700a9013de85c5c1f394dd67d98a3527b3e9

Authored by boyang
1 parent 8434aee7

fix: prod2-56/57

components/ProductDetail.vue
... ... @@ -630,7 +630,7 @@ const clearSpanStyle = (htmlContent) => {
630 630 // 清理 span 的 style 属性
631 631 const spans = doc.querySelectorAll("span");
632 632 spans.forEach((span) => {
633   - span.removeAttribute("style"); // 清空 style 属性
  633 + span?.removeAttribute("style"); // 清空 style 属性
634 634 });
635 635  
636 636 // const imgs = doc.querySelectorAll("img");
... ...
deploy/prod2.sh
1 1 #!/bin/bash
2 2 # 变量定义
3   -LAST_TAG="1.0.54"
4   -TAG="1.0.55"
  3 +LAST_TAG="1.0.56"
  4 +TAG="1.0.57"
5 5 TARGET_PATH="/root/web/canrud-outside-nuxt-front"
6 6 DOCKERFILE_PATH="/root/web/canrud-outside-nuxt-front/canrud-nuxt-front"
7 7 IMAGE_NAME="canrud-outside-front"
... ...
pages/products/detail/[id]/index.vue
... ... @@ -67,13 +67,6 @@ newData.productimageliststore = newData?.productimageliststore?.map(
67 67 url: `/api/show/image?fileKey=${item.fileKey}&psize=p512`,
68 68 })
69 69 );
70   -function removeTags(input: string): string {
71   - // 使用正则表达式去除 <div>, <span>, <p> 标签
72   - // 这个正则表达式会匹配这些标签并移除它们,但保留标签内部的文本
73   - return input.replace(/<\/?(div|span|p|br)[^>]*>/g, "");
74   -}
75 70  
76 71 info.value = { ...newData };
77   -const introduction = removeTags(info.value.introduction);
78   -info.value.introduction = introduction;
79 72 </script>
... ...