mirror of
https://github.com/imsyy/DailyHotApi.git
synced 2026-01-12 13:14:55 +08:00
新增错误标题
This commit is contained in:
@@ -36,6 +36,7 @@ const getData = (data) => {
|
||||
.load(newListHtml)(".placeholder")
|
||||
.get()
|
||||
.map((v) => {
|
||||
console.log($(v));
|
||||
dataList.push({
|
||||
title: $(v).find(".plc-title").text(),
|
||||
img: $(v).find("img").attr("data-original"),
|
||||
@@ -98,6 +99,8 @@ itHomeRouter.get("/ithome", async (ctx) => {
|
||||
console.error(error);
|
||||
ctx.body = {
|
||||
code: 500,
|
||||
title: "IT之家",
|
||||
subtitle: "热榜",
|
||||
message: "获取失败",
|
||||
};
|
||||
}
|
||||
@@ -146,6 +149,8 @@ itHomeRouter.get("/ithome/new", async (ctx) => {
|
||||
// 如果缓存中也没有数据,则返回错误信息
|
||||
ctx.body = {
|
||||
code: 500,
|
||||
title: "IT之家",
|
||||
subtitle: "热榜",
|
||||
message: "获取失败",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user