从最早的图库,到图床,在到现在的相册.我对图片的执着已经可以说是跨越了好几个世纪了. 图库的图片是存在七牛云的,后来流量被刷就关闭了. 图床,现在转为为博客提供图片上传服务了. 相册,就是手机中相册的概念,它既可以存图片也可以放视频. 逐渐是越来越完善了
这两天就把平常保存的视频图片什么的上传到了服务器,写了个界面和接口,顺带开源出来.(我要做一个坚定的开源爱好者)
克隆仓库到本地:
git clone https://github.com/iAJue/PhotoGallery.git
进入项目目录:
cd PhotoGallery
安装依赖:
npm install
打包项目
npm run build
仅供参考 https://github.com/iAJue/wasteCode/tree/main/photo
照片接口
[
{
"date": "\u6628\u5929",
"items": [
{
"src": "https:\/\/moejuevideo.pages.dev\/file\/1730957555106_ocgRCdDEA07fAILEKEFOA8ADAyETABBMffIBE6~tplv-dy-aweme-images_q75.webp",
"alt": "ocgRCdDEA07fAILEKEFOA8ADAyETABBMffIBE6~tplv-dy-aweme-images_q75.webp",
"isVideo": false,
"duration": null
}
]
}
]
相册接口
[
{
"folder_id": "3",
"folder_name": "images",
"created_at": "2024-11-07 15:09:06",
"photo_count": "61",
"latest_image": "https:\/\/moejuevideo.pages.dev\/file\/1730963758087_GZIaBGlbAAALz_E.jpeg",
"attribute": "2",
"ispassword": true
}
]
随机接口
[
{
"id": 1,
"folder_id": 1,
"name": "\u300c\u4e0d\u706d\u300d #2024\u539f\u795e\u751f\u65e5\u4f1a #\u539f\u795e #\u949f\u79bb_7415149072572501275.mp4",
"size": 50437932,
"duration": "19.0",
"type": 1,
"data": "https:\/\/moejuevideo.pages.dev\/file\/1730944134269_\u300c\u4e0d\u706d\u300d %232024\u539f\u795e\u751f\u65e5\u4f1a %23\u539f\u795e %23\u949f\u79bb_7415149072572501275.mp4_part_1.mp4",
"created_at": "2024-11-07 09:49:48"
}
]