接口数据统一
This commit is contained in:
parent
bf39b928e1
commit
f18f9d7cf9
@ -25,7 +25,7 @@ const getData = (data) => {
|
|||||||
title: v.query,
|
title: v.query,
|
||||||
desc: v.desc,
|
desc: v.desc,
|
||||||
pic: v.img,
|
pic: v.img,
|
||||||
hot: v.hotScore,
|
hot: Number(v.hotScore),
|
||||||
url: `https://www.baidu.com/s?wd=${encodeURIComponent(v.query)}`,
|
url: `https://www.baidu.com/s?wd=${encodeURIComponent(v.query)}`,
|
||||||
mobileUrl: v.url,
|
mobileUrl: v.url,
|
||||||
});
|
});
|
||||||
|
@ -23,6 +23,7 @@ const getData = (data) => {
|
|||||||
pic: v.pic.replace(/http:/, "https:"),
|
pic: v.pic.replace(/http:/, "https:"),
|
||||||
owner: v.owner,
|
owner: v.owner,
|
||||||
data: v.stat,
|
data: v.stat,
|
||||||
|
hot: v.stat.view,
|
||||||
url: v.short_link,
|
url: v.short_link,
|
||||||
mobileUrl: `https://m.bilibili.com/video/${v.bvid}`,
|
mobileUrl: `https://m.bilibili.com/video/${v.bvid}`,
|
||||||
};
|
};
|
||||||
|
@ -20,6 +20,7 @@ const getData = (data) => {
|
|||||||
id: v.contId,
|
id: v.contId,
|
||||||
title: v.name,
|
title: v.name,
|
||||||
pic: v.pic,
|
pic: v.pic,
|
||||||
|
hot: v.praiseTimes,
|
||||||
time: v.pubTime,
|
time: v.pubTime,
|
||||||
url: `https://www.thepaper.cn/newsDetail_forward_${v.contId}`,
|
url: `https://www.thepaper.cn/newsDetail_forward_${v.contId}`,
|
||||||
mobileUrl: `https://m.thepaper.cn/newsDetail_forward_${v.contId}`,
|
mobileUrl: `https://m.thepaper.cn/newsDetail_forward_${v.contId}`,
|
||||||
|
@ -30,7 +30,7 @@ const getData = (data) => {
|
|||||||
title: v.target.titleArea.text,
|
title: v.target.titleArea.text,
|
||||||
desc: v.target.excerptArea.text,
|
desc: v.target.excerptArea.text,
|
||||||
pic: v.target.imageArea.url,
|
pic: v.target.imageArea.url,
|
||||||
hot: v.target.metricsArea.text,
|
hot: parseInt(v.target.metricsArea.text.replace(/[^\d]/g, "")) * 10000,
|
||||||
url: v.target.link.url,
|
url: v.target.link.url,
|
||||||
mobileUrl: v.target.link.url,
|
mobileUrl: v.target.link.url,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user