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();
+ }
+ });
+ }
})