From 3a0f29f9f271fcf00a9015a58679454239bc2e89 Mon Sep 17 00:00:00 2001 From: zhaol <15900249928@163.com> Date: Tue, 17 Dec 2024 20:56:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=98=85=E8=A7=88=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=A0=87=E9=A2=98=E9=80=BB=E8=BE=91=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/page/index_web.html | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/com.awspaas.user.apps.yili.integration/template/page/index_web.html b/com.awspaas.user.apps.yili.integration/template/page/index_web.html index 6558fa29..6fb32c04 100644 --- a/com.awspaas.user.apps.yili.integration/template/page/index_web.html +++ b/com.awspaas.user.apps.yili.integration/template/page/index_web.html @@ -90,8 +90,34 @@ $('span').css({ 'font-family': 'Microsoft YaHei', }); - $("#RELEASE_INSTRUCTIONS_htmlRead p").slice(0, 3).remove(); + //$("#RELEASE_INSTRUCTIONS_htmlRead p").slice(0, 3).remove(); + // 遍历#RELEASE_INSTRUCTIONS_htmlRead下的所有
标签 + if($("#RELEASE_INSTRUCTIONS_htmlRead p").length>0){ + $('#RELEASE_INSTRUCTIONS_htmlRead p').each(function() { + // 检查当前
标签内的标签是否为空
+ var hasNonEmptySpan = $(this).find('span').filter(function() {
+ return $.trim($(this).text()) !== '';
+ }).length > 0;
+
+ // 如果没有非空的标签,则删除当前 标签
+ if (!hasNonEmptySpan) {
+ $(this).remove();
+ }
+ });
+ }else{
+ $('#edithtml p').each(function() {
+ // 检查当前 标签内的标签是否为空
+ var hasNonEmptySpan = $(this).find('span').filter(function() {
+ return $.trim($(this).text()) !== '';
+ }).length > 0;
+
+ // 如果没有非空的标签,则删除当前 标签
+ if (!hasNonEmptySpan) {
+ $(this).remove();
+ }
+ });
+ }
})