首页修改
This commit is contained in:
parent
79cc524799
commit
d6d49555ca
@ -80,7 +80,7 @@
|
|||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="friendship">
|
<div class="friendship">
|
||||||
<a>友情链接:</a>
|
<a>友情链接:</a>
|
||||||
{dreamer-cms:list typeid="2jk6313y" pagenum="1" pagesize="10" addfields="link_url"}
|
{dreamer-cms:list typeid="2jk6313y" formkey="80AZ783M" pagenum="1" pagesize="10" addfields="link_url"}
|
||||||
<a href="[field:link_url /]">[field:title /]</a>
|
<a href="[field:link_url /]">[field:title /]</a>
|
||||||
{/dreamer-cms:list}
|
{/dreamer-cms:list}
|
||||||
</div>
|
</div>
|
||||||
|
@ -378,7 +378,7 @@
|
|||||||
<td class="px-6 py-4 font-medium text-gray-800 text-lg max-w-[30ch] truncate break-words">
|
<td class="px-6 py-4 font-medium text-gray-800 text-lg max-w-[30ch] truncate break-words">
|
||||||
[field:title/]
|
[field:title/]
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 text-gray-600 text-lg max-w-[30ch] truncate">
|
<td id="thetime"class="px-6 py-4 text-gray-600 text-lg max-w-[30ch] truncate">
|
||||||
[field:showtime function="format('yyyy-MM-dd')" /]
|
[field:showtime function="format('yyyy-MM-dd')" /]
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -1036,7 +1036,23 @@
|
|||||||
// 初始化新闻列表 - 从API获取数据
|
// 初始化新闻列表 - 从API获取数据
|
||||||
fetchNewsDataAndDisplay();
|
fetchNewsDataAndDisplay();
|
||||||
});
|
});
|
||||||
|
window.onload = function () {
|
||||||
|
console.log("页面加载完成,自动运行方法");
|
||||||
|
// 在这里调用你的方法
|
||||||
|
removeLast9();
|
||||||
|
};
|
||||||
|
function removeLast9() {
|
||||||
|
var elements = document.querySelectorAll('#thetime');
|
||||||
|
elements.forEach(function (element) {
|
||||||
|
var text = element.textContent;
|
||||||
|
if (text.length > 9) {
|
||||||
|
element.textContent = text.slice(0, -15);
|
||||||
|
} else {
|
||||||
|
// 处理长度不足的情况,比如清空或者保留原样
|
||||||
|
element.textContent = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user