first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1 @@
0ccce6ae-053c-4396-8558-b79f58a7f952

View File

@@ -0,0 +1,205 @@
const obj = (id) => {
if (id === 1) {
return {
id: 1,
video: "https://www.runoob.com/try/demo_source/movie.ogg"
}
}
return {
id: 2,
video: "https://www.runoob.com/try/demo_source/movie.ogg"
}
}
const comment = [
{
id: 1,
headUrl: "https://upload.jianshu.io/users/upload_avatars/301940/189d69dd-af7c-4290-9e2c-89e98acf3603.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96/format/webp",
name: "白勺啊达",
creatTime: 1653891944578,
like: 30,
content: "歌名:判你[doge][歪嘴]"
},
{
id: 2,
headUrl: "https://upload.jianshu.io/users/upload_avatars/301940/189d69dd-af7c-4290-9e2c-89e98acf3603.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96/format/webp",
name: "汽水不自闭",
creatTime: 1653891944578,
like: 30,
content: "爱你"
},
{
id: 3,
headUrl: "https://upload.jianshu.io/users/upload_avatars/301940/189d69dd-af7c-4290-9e2c-89e98acf3603.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96/format/webp",
name: "三木刃",
creatTime: 1653891944578,
like: 130,
content: "爱你"
},
{
id: 4,
headUrl: "https://upload.jianshu.io/users/upload_avatars/301940/189d69dd-af7c-4290-9e2c-89e98acf3603.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96/format/webp",
name: "爱狂三的星总",
creatTime: 1653891944578,
like: 500,
content: "久违的,本来以为你会做听我说谢谢你,结果没做"
}
]
const post = {
lunbo: [
"https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/89fbb601177fec95fd14af5a9cc257e0.jpg?thumb=1&w=720&h=360",
"https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/e25dd7488f695942cfbfd9468ac2c3e7.jpg?thumb=1&w=720&h=360",
"https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/259e5a92a441adb6bd8e2f484987ace6.jpg?thumb=1&w=720&h=360"
],
id: 1,
headUrl: "http://i1.hdslb.com/bfs/face/3c54240c8c92fd43fa0ee87f8bb42b39b2877055.jpg@96w_96h_1c_1s.webp",
name: "白勺啊达",
creatTime: 1653891944578,
like: 30,
content: "歌名:判你[doge][歪嘴]",
comment: comment,
}
const news = (id) => {
if (id == 1) {
return {
title: "台达伺服电机ASDA-B3",
head: "https://i2.hdslb.com/bfs/face/7622fe500d64cac1ba2b7311a25ef904d2311551.jpg@160w_160h_1c_1s.webp",
creatTime: 1653048900000,
browse: 131000,
content: `台达伺服电机ASDA-B3系列已经发布几年了相对于前代升级了很多方面下面就让台达代理商—吉创来为我们科普台达伺服电机ASDA-B3系列。 作者:吉创达减速机厂家 https://www.bilibili.com/read/cv16671272?from=search&spm_id_from=333.337.0.0 出处bilibili`,
comment: comment,
relevantRecommendations: [
{
content: "台达伺服电机ASDA-B3",
creatTime: 1653048900000,
image: "https://i0.hdslb.com/bfs/article/14cddf36b3efde98e3bc8733c8cde181bcb5e621.png@810w_1311h_progressive.webp"
},
{
content: "【韩网新闻】金钟国x尹恩惠在刘在石不知情的情况下“恋爱”…“视网膜”重新点燃",
creatTime: 1653048900000,
image: "https://i0.hdslb.com/bfs/article/2d3eacf786742f88d1235d305faf8c9497863fd7.png@810w_455h_progressive.webp"
},
]
}
}
return {
title: "金钟国x尹恩惠",
head: "https://i0.hdslb.com/bfs/face/11f217565887b25bb3a9ab515134043feab9eeeb.jpg@160w_160h_1c_1s.webp",
creatTime: 1653048900000,
browse: 131000,
content: `如果经常发生的事情重迭,就会这样,但如果特别的回忆重迭,就很难看作是偶然。随着接二连三的记忆重迭,他们再次戴上了对金钟国和尹恩惠的望鹏隐形眼镜。
金钟国和尹恩惠的“恋爱”再次被曝光是因为尹恩惠在17日上传后急忙删除的youtube。尹恩惠在视频中回想着和前男友的回忆说“大部分男人在恋爱初期都会发很多短信过了一段时间联系不是会减少吗?我把男友发过的短信都写在小本子上送给了前男友。”
尹恩惠说:“对方也是好人。看到自己的短信变成简答型,偶尔联系,感到很抱歉。”
“把短信写在笔记本上作为礼物”的插曲虽然不是常见的事情但不知不觉间已经很熟悉了。这与金钟国在2018年SBS《我家的熊孩子》中整理阁楼时发现情书的情况一模一样。 作者:懵钟一起有点甜 https://www.bilibili.com/read/cv16710140?from=search&spm_id_from=333.337.0.0 出处bilibili`,
comment: comment,
relevantRecommendations: [
{
content: "台达伺服电机ASDA-B3",
creatTime: 1653048900000,
image: "https://i0.hdslb.com/bfs/article/14cddf36b3efde98e3bc8733c8cde181bcb5e621.png@810w_1311h_progressive.webp"
},
{
content: "【韩网新闻】金钟国x尹恩惠在刘在石不知情的情况下“恋爱”…“视网膜”重新点燃",
creatTime: 1653048900000,
image: "https://i0.hdslb.com/bfs/article/2d3eacf786742f88d1235d305faf8c9497863fd7.png@810w_455h_progressive.webp"
},
]
}
}
var express = require('express');
var router = express.Router();
router.get('/detail', function (req, res, next) {
const { id } = req.query
if (!!id) {
res.json({
status: 200,
message: '请求成功',
data: obj(id)
});
return
}
res.json({
status: 500,
message: '请求失败',
data: null
});
});
// // 评论接口
// router.get('/comment', function (req, res, next) {
// const { id } = req.query
// res.json({
// status: 200,
// message: '请求成功',
// data: comment
// });
// });
/**
* @api {get} /post /post
* @apiDescription 帖子 页面
* @apiName post
* @apiGroup 接口
* @apiParam {number} id 帖子详情id
* @apiSuccessExample {json} 请求成功的返回:
* {
* "status" : 200,
* "message" : "请求成功"
* "result" : "asjXzXxmnSp8TZGWiTSlJF8Gb...5LhYoHs86SEI2LBXrTZ9e/a4frZOWHZ"
* }
* @apiErrorExample {json} 请求失败的返回
* {
* "status": 404,
* "message" : "请求失败"
* "result": null
* }
* @apiSampleRequest http://127.0.0.1:3000/api/json/post?id=14
* @apiVersion 1.0.0
*/
router.get('/post', function (req, res, next) {
const { id } = req.query
res.json({
status: 200,
message: '请求成功',
data: post
});
});
/**
* @api {get} /news /news
* @apiDescription 新闻 页面
* @apiName news
* @apiGroup 接口
* @apiParam {number} id 新闻详情id
* @apiSuccessExample {json} 请求成功的返回:
* {
* "status" : 200,
* "message" : "请求成功"
* "result" : "asjXzXxmnSp8TZGWiTSlJF8Gb...5LhYoHs86SEI2LBXrTZ9e/a4frZOWHZ"
* }
* @apiErrorExample {json} 请求失败的返回
* {
* "status": 404,
* "message" : "请求失败"
* "result": null
* }
* @apiSampleRequest http://127.0.0.1:3000/api/json/news?id=1
* @apiVersion 1.0.0
*/
//
router.get('/news', function (req, res, next) {
const { id } = req.query
res.json({
status: 200,
message: '请求成功',
data: news(id)
});
});
module.exports = router;

View File

@@ -0,0 +1,399 @@
var express = require('express');
var router = express.Router();
const comment = [
{
id: 1,
headUrl: "https://upload.jianshu.io/users/upload_avatars/301940/189d69dd-af7c-4290-9e2c-89e98acf3603.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96/format/webp",
name: "白勺啊达",
creatTime: 1653891944578,
like: 30,
content: "歌名:判你[doge][歪嘴]"
},
{
id: 2,
headUrl: "https://upload.jianshu.io/users/upload_avatars/301940/189d69dd-af7c-4290-9e2c-89e98acf3603.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96/format/webp",
name: "汽水不自闭",
creatTime: 1653891944578,
like: 30,
content: "爱你"
},
{
id: 3,
headUrl: "https://upload.jianshu.io/users/upload_avatars/301940/189d69dd-af7c-4290-9e2c-89e98acf3603.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96/format/webp",
name: "三木刃",
creatTime: 1653891944578,
like: 130,
content: "爱你哈哈哈"
},
{
id: 4,
headUrl: "https://upload.jianshu.io/users/upload_avatars/301940/189d69dd-af7c-4290-9e2c-89e98acf3603.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96/format/webp",
name: "爱狂三的星总",
creatTime: 1653891944578,
like: 500,
content: "久违的,本来以为你会做听我说谢谢你,结果没做"
}
]
const list = [
{
id: 1,
title: '安徽新闻综合广播',
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
comment_list: []
},
{
id: 2,
title: '安徽音乐广播',
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
comment_list: [
{
id: 1,
headUrl: "https://i2.hdslb.com/bfs/face/69d3154db7ed2c07d72af53a477db047c8b9eb89.jpg@160w_160h_1c_1s.webp",
name: "紅吱鴸",
createTime: 1653891944578,
like: 12,
content: "死亡如果能带走我的秘密,我何必如此小心翼翼。"
},
{
id: 2,
headUrl: "https://i2.hdslb.com/bfs/face/f735dc6d12d849253d7a90eec3dfaf68bffbacff.jpg@160w_160h_1c_1s.webp",
name: "烽火狼烟流氓兔",
createTime: 1653891944578,
like: 34,
content: "粉身碎骨浑不怕,要留清白在人间"
},
{
id: 3,
headUrl: "https://i1.hdslb.com/bfs/face/47ae263d4bf2ead854c2431c1880e1144d6a0c1b.jpg@160w_160h_1c_1s.webp",
name: "还有一天满十八",
createTime: 1653891944578,
like: 11,
content: "上一个出车祸不删手机的,已经被二三十个女朋友堵在医院了"
}
]
},
{
id: 3,
title: '宿州文艺广播',
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
comment_list: [
{
id: 1,
headUrl: "https://i2.hdslb.com/bfs/face/51caec58b7dd62cbbf3ae6dcbc544f4483a18672.jpg@160w_160h_1c_1s.webp",
name: "独行长路_",
createTime: 1653891944578,
like: 1,
content: "粉骨碎身浑不怕,要把手机格式化"
},
{
id: 2,
headUrl: "https://i2.hdslb.com/bfs/face/f735dc6d12d849253d7a90eec3dfaf68bffbacff.jpg@160w_160h_1c_1s.webp",
name: "流氓兔",
createTime: 1653891944578,
like: 22,
content: "当初先生还未退出文坛时,无论多么优秀的后生,都不敢轻易发表见解,余发觉此将断送文坛的未来,便策划了这一切,使先生被迫退出文坛。如今人才济济,已然形成一个良性循环,还望先生重出江湖,著书一卷以流传后世"
},
{
id: 3,
headUrl: "https://i1.hdslb.com/bfs/face/47ae263d4bf2ead854c2431c1880e1144d6a0c1b.jpg@160w_160h_1c_1s.webp",
name: "满十八",
createTime: 1653891944578,
like: 67,
content: "独老师当时退出文坛时我是第一个不同意的"
}
]
},
{
id: 4,
title: '安徽城市之声',
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
comment_list: [
{
id: 1,
headUrl: "https://i2.hdslb.com/bfs/face/115451abd5cc3e45b7fc7dcc8c049bb2044f5efb.jpg@160w_160h_1c_1s.webp",
name: "中国霸天下",
createTime: 1653891944578,
like: 34,
content: "他里面的内容应该不是普通题材的H片因为普通大家都看没啥社死的。估计是一些奇奇怪怪的题材才让他这么拼。"
}
]
},
{
id: 5,
title: '安徽农村广播',
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
comment_list: [
{
id: 1,
headUrl: "https://i2.hdslb.com/bfs/face/a06488ccf44948a119e4ea379a7f55454c0b9f87.jpg@160w_160h_1c_1s.webp",
name: "时崎御坂",
createTime: 1653891944578,
like: 87,
content: "希望以后有人发明一个检测器,一但自己生命体征消失自动格式化家里的电脑"
}
]
},
{
id: 6,
title: '芜湖交通经济广播',
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
comment_list: [
{
id: 1,
headUrl: "https://i0.hdslb.com/bfs/face/5cd9ee79a853eb782aad4552aa74ea2be67cff5c.jpg@160w_160h_1c_1s.webp",
name: "寻你-无寂夜",
createTime: 1653891944578,
like: 56,
content: "属实泪目了,害怕敌特分子发现绝密级文件吧"
}
]
},
{
id: 7,
title: '安徽故事广播',
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
comment_list: [
{
id: 1,
headUrl: "https://i0.hdslb.com/bfs/face/586f2a6d9a21a877b23a30598c19126edb1273d2.jpg@160w_160h_1c_1s.webp",
name: "超级大冰冰冰冰",
createTime: 1653891944578,
like: 32,
content: "我居然把标题看成“男子把车撞出3米”"
}
]
},
{
id: 8,
title: '黄山新闻综合广播',
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
comment_list: []
},
{
id: 9,
title: '宿州交通广播',
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
comment_list: [
{
id: 1,
headUrl: "https://i2.hdslb.com/bfs/face/716697f4ce8a04b24dd140793a3f32422a411533.jpg@160w_160h_1c_1s.webp",
name: "I鬼谷千寻l",
createTime: 1653891944578,
like: 90,
content: "死去元知万事空,但悲未格手机式"
}
]
},
{
id: 10,
title: '经典983电台',
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
comment_list: []
}
];
/**
* @api {get} /radio /radio
* @apiDescription 获取包河Radio数据不需要参数传空对象 {} 即可
* @apiName radio
* @apiGroup 接口
* @apiSuccessExample {json} 请求成功的返回:
* {
* "status" : 200,
* "message" : "请求成功"
* "result" : "asjXzXxmnSp8TZGWiTSlJF8Gb...5LhYoHs86SEI2LBXrTZ9e/a4frZOWHZ"
* }
* @apiErrorExample {json} 请求失败的返回
* {
* "status": 404,
* "message" : "请求失败"
* "result": null
* }
* @apiSampleRequest http://127.0.0.1:3000/api/json/radio
* @apiVersion 1.0.0
*/
router.get('/radio', function (req, res, next) {
res.json({
status: 200,
message: '请求成功',
data: {
play_title: '包河之声',
play_img: 'https://pic.qtfm.cn/2020/0311/20200311053004.png',
play_url: 'https://dh5.cntv.myhwcdn.cn/asp/h5e/hls/1200/0303000a/3/default/884a902046de40f780bee8abd855fb95/1200.m3u8'
}
});
});
/**
* @api {get} /tv /tv
* @apiDescription 获取包河tv数据不需要参数传空对象 {} 即可
* @apiName tv
* @apiGroup 接口
* @apiSuccessExample {json} 请求成功的返回:
* {
* "status" : 200,
* "message" : "请求成功"
* "result" : "asjXzXxmnSp8TZGWiTSlJF8Gb...5LhYoHs86SEI2LBXrTZ9e/a4frZOWHZ"
* }
* @apiErrorExample {json} 请求失败的返回
* {
* "status": 404,
* "message" : "请求失败"
* "result": null
* }
* @apiSampleRequest http://127.0.0.1:3000/api/json/tv
* @apiVersion 1.0.0
*/
router.get('/tv', function (req, res, next) {
res.json({
status: 200,
message: '请求成功',
data: list
});
});
/**
* @api {get} /videoPlay /videoPlay
* @apiDescription 视频点播 页面
* @apiName videoPlay
* @apiGroup 接口
* @apiParam {number} id 视频的id
* @apiSuccessExample {json} 请求成功的返回:
* {
* "status" : 200,
* "message" : "请求成功"
* "result" : "asjXzXxmnSp8TZGWiTSlJF8Gb...5LhYoHs86SEI2LBXrTZ9e/a4frZOWHZ"
* }
* @apiErrorExample {json} 请求失败的返回
* {
* "status": 404,
* "message" : "请求失败"
* "result": null
* }
* @apiSampleRequest http://127.0.0.1:3000/api/json/videoPlay?id=14
* @apiVersion 1.0.0
*/
router.get('/videoPlay', function (req, res, next) {
const { id } = req.query;
res.json({
status: 200,
message: '请求成功',
data: {
id,
play_url: 'https://vse2-as-all66.secdn.net/logos-chorigin/live/biblescreen-ad-free/chunklist_sess944471208.m3u8',
play_title: '加强雪糕产品抽检力度上半年全国市场监管部门抽检3137批次雪糕产品',
play_time: '2022-07-12 10:45',
play_fabulous: 102,
play_desc: '据初步统计2022年上半年全国各级市场监管部门共组织监督抽检3137批次雪糕产品其中检出不合格样品15批次不合格项目为菌落总数、大肠菌群、单增李斯特菌和蛋白质。',
relevantRecommendations: [
{
content: "台达伺服电机ASDA-B3",
creatTime: 1653048900000,
image: "https://i0.hdslb.com/bfs/article/14cddf36b3efde98e3bc8733c8cde181bcb5e621.png@810w_1311h_progressive.webp"
},
{
content: "【韩网新闻】金钟国x尹恩惠在刘在石不知情的情况下“恋爱”…“视网膜”重新点燃",
creatTime: 1653048900000,
image: "https://i0.hdslb.com/bfs/article/2d3eacf786742f88d1235d305faf8c9497863fd7.png@810w_455h_progressive.webp"
},
],
comment: comment,
}
});
});
/**
* 溶媒直播
*/
router.get('/live', function (req, res, next) {
res.json({
status: 200,
message: '请求成功',
data: [
{
id: 1,
paly_title: '时政新闻眼丨从四个关键词,看习近平总书记新疆之行',
paly_img: 'https://p2.img.cctvpic.com/photoworkspace/2022/07/16/2022071616363178983.jpg',
paly_type: 1,
paly_text: '正在直播',
play_count: 2341,
play_time: null
},
{
id: 2,
paly_title: '新疆和若铁路开通运营“满月” 日均送客3100多人',
paly_img: 'https://p2.img.cctvpic.com/photoworkspace/2022/07/16/2022071616352941281.jpg',
paly_type: 1,
paly_text: '正在直播',
play_count: 461,
play_time: null
},
{
id: 3,
paly_title: '加拿大一富商遭枪杀 曾被控策划1985年印航恐袭',
paly_img: 'https://p3.img.cctvpic.com/photoworkspace/2022/07/16/2022071616321582632.jpg',
paly_type: 2,
paly_text: '直播预告',
play_count: 59872,
play_time: 1653891944578
},
{
id: 4,
paly_title: '俄美同意两国宇航员“交叉飞行”前往国际空间站',
paly_img: 'https://p5.img.cctvpic.com/photoworkspace/2022/07/16/2022071616272840854.jpg',
paly_type: 3,
paly_text: '回放',
play_count: 49179,
play_time: null
}
]
});
});
/**
* @api {get} /tvInfo /tvInfo
* @apiDescription 看电视(tv)详情 页面
* @apiName tvInfo
* @apiGroup 接口
* @apiParam {number} id tv的详情id
* @apiSuccessExample {json} 请求成功的返回:
* {
* "status" : 200,
* "message" : "请求成功"
* "result" : "asjXzXxmnSp8TZGWiTSlJF8Gb...5LhYoHs86SEI2LBXrTZ9e/a4frZOWHZ"
* }
* @apiErrorExample {json} 请求失败的返回
* {
* "status": 404,
* "message" : "请求失败"
* "result": null
* }
* @apiSampleRequest http://127.0.0.1:3000/api/json/tvInfo?id=2
* @apiVersion 1.0.0
*/
router.get('/tvInfo', function (req, res, next) {
const { id } = req.query
let arr = {
current: {},
list
}
list.forEach(v => {
if (v.id == id) {
arr.current = v;
}
});
res.json({
status: 200,
message: '请求成功',
data: arr
});
});
module.exports = router;

View File

@@ -0,0 +1,9 @@
var express = require('express');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
res.send('respond with a resource');
});
module.exports = router;