mirror of
https://github.com/Ad-closeNN/blog-fuwari.git
synced 2026-05-31 02:20:05 -04:00
docs: PCL Intelligence 主页说明书
1. 删除了 Background 背景图 2. 使用内置 Banner 功能 3. 优化文档内容描述 4. 修改一言的地址,并加上内置的一条一言,用于 429
This commit is contained in:
@@ -53,16 +53,21 @@ const config = profileConfig;
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 傻逼脑子 Merge 的时候怎么把这个删了
|
||||
// 调用一言 API
|
||||
fetch("https://api.xinac.net/words")
|
||||
//fetch("https://international.v1.hitokoto.cn")
|
||||
// 试试国内,不过容易崩
|
||||
fetch("https://v1.hitokoto.cn")
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
// API 返回的字段是 data.text
|
||||
document.getElementById("hitokoto").innerText = data.text;
|
||||
document.getElementById("hitokoto").innerText = data.hitokoto;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("获取一言失败:", error);
|
||||
document.getElementById("hitokoto").innerText = "获取失败,请稍后再试。";
|
||||
//document.getElementById("hitokoto").innerText = "获取失败,请稍后再试。";
|
||||
//失败后用内置的,成功了用别人的。不过,这真的可能用失败吗?
|
||||
document.getElementById("hitokoto").innerText = "再热情的心也经不起冷漠,再爱你的人也经不起冷落。";
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user