增加说明和登录优化
This commit is contained in:
@@ -0,0 +1,103 @@
|
|||||||
|
# Pixiv 下载浏览管理器
|
||||||
|
|
||||||
|
一个简单易用的 Pixiv 作品下载和浏览管理工具,最近闲着没事逛逛p站,发现p站下载一个个手点累的很,看看现成的项目都比较久远或者是操作麻烦,干脆自己搞一个玩玩。
|
||||||
|
|
||||||
|
## 📋 项目介绍
|
||||||
|
|
||||||
|
Pixiv 下载浏览管理器是一个基于 Web 的应用程序,提供以下功能:
|
||||||
|
|
||||||
|
- 🔐 OAuth 2.0 登录认证
|
||||||
|
- 🔍 作品搜索和浏览
|
||||||
|
- 📥 作品下载管理
|
||||||
|
- 👤 作者搜索
|
||||||
|
- 🆔 作品ID搜索
|
||||||
|
|
||||||
|
## 🚀 快速开始
|
||||||
|
|
||||||
|
### 环境要求
|
||||||
|
|
||||||
|
- **Node.js** (版本 >= 16.0.0)
|
||||||
|
- **npm** 或 **pnpm** (推荐使用 pnpm)
|
||||||
|
|
||||||
|
### 安装步骤
|
||||||
|
|
||||||
|
1. **安装 Node.js**
|
||||||
|
- 访问 [Node.js 官网](https://nodejs.org/) 下载并安装
|
||||||
|
|
||||||
|
2. **解压前端文件**
|
||||||
|
- 进入 `ui` 目录
|
||||||
|
- 解压 `dist.zip` 文件到 `ui/dist` 目录
|
||||||
|
|
||||||
|
3. **安装依赖**
|
||||||
|
```bash
|
||||||
|
# 在项目根目录执行
|
||||||
|
npm install
|
||||||
|
# 或者使用 pnpm (推荐)
|
||||||
|
pnpm install
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **启动应用**
|
||||||
|
- 双击 `start.bat` 文件
|
||||||
|
- 或者手动运行:`node backend/start.js`
|
||||||
|
|
||||||
|
5. **访问应用**
|
||||||
|
- 打开浏览器访问:http://localhost:3000
|
||||||
|
|
||||||
|
## 🔐 登录认证
|
||||||
|
|
||||||
|
### 获取授权码
|
||||||
|
|
||||||
|
1. **访问 Pixiv 开发者页面(ui登录页面点击自动跳转)**
|
||||||
|

|
||||||
|
|
||||||
|
2. **创建应用并获取授权码**
|
||||||
|

|
||||||
|
|
||||||
|
3. **在应用中输入授权码完成登录**
|
||||||
|
|
||||||
|
## 📱 功能展示
|
||||||
|
|
||||||
|
### 主界面
|
||||||
|

|
||||||
|
|
||||||
|
### 搜索功能
|
||||||
|
- **作品搜索**
|
||||||
|

|
||||||
|
|
||||||
|
- **作者搜索**
|
||||||
|

|
||||||
|
|
||||||
|
- **作品ID搜索**
|
||||||
|

|
||||||
|
|
||||||
|
### 下载管理
|
||||||
|

|
||||||
|
|
||||||
|
## 🛠️ 开发说明
|
||||||
|
|
||||||
|
本项目刚刚建立,很多功能还不够完善,欢迎大家一起参与开发!
|
||||||
|
|
||||||
|
### 技术栈
|
||||||
|
- **后端**: Node.js + Express
|
||||||
|
- **前端**: Vue3 + Vite
|
||||||
|
- **包管理**: pnpm (推荐)
|
||||||
|
|
||||||
|
### 项目结构
|
||||||
|
```
|
||||||
|
你的项目文件/
|
||||||
|
├── backend/ # 后端服务
|
||||||
|
├── ui/ # 前端应用
|
||||||
|
│ ├── dist/ # 打包后的前端文件
|
||||||
|
│ └── src/ # 前端源码
|
||||||
|
├── downloads/ # 下载目录
|
||||||
|
├── data/ # 数据存储
|
||||||
|
└── start.bat # 启动脚本
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🤝 贡献
|
||||||
|
|
||||||
|
欢迎提交 Issue 和 Pull Request 来帮助改进这个项目!
|
||||||
|
|
||||||
|
## 许可证
|
||||||
|
|
||||||
|
MIT License
|
||||||
+1
-1
@@ -199,7 +199,7 @@ class PixivAuth {
|
|||||||
|
|
||||||
this.accessToken = tokenData.access_token;
|
this.accessToken = tokenData.access_token;
|
||||||
this.refreshToken = tokenData.refresh_token;
|
this.refreshToken = tokenData.refresh_token;
|
||||||
|
|
||||||
// 如果响应中包含用户信息,则保存
|
// 如果响应中包含用户信息,则保存
|
||||||
if (tokenData.user) {
|
if (tokenData.user) {
|
||||||
this.user = tokenData.user;
|
this.user = tokenData.user;
|
||||||
|
|||||||
+3
-3
@@ -108,9 +108,9 @@ class PixivServer {
|
|||||||
// 如果是API请求,返回JSON格式的404
|
// 如果是API请求,返回JSON格式的404
|
||||||
if (req.path.startsWith('/api/')) {
|
if (req.path.startsWith('/api/')) {
|
||||||
return res.status(404).json({
|
return res.status(404).json({
|
||||||
error: 'Not Found',
|
error: 'Not Found',
|
||||||
message: `Route ${req.originalUrl} not found`
|
message: `Route ${req.originalUrl} not found`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 否则返回前端页面(SPA路由支持)
|
// 否则返回前端页面(SPA路由支持)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 586 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 844 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 680 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
BIN
Binary file not shown.
@@ -46,9 +46,11 @@
|
|||||||
<h4>获取授权码步骤:</h4>
|
<h4>获取授权码步骤:</h4>
|
||||||
<ol>
|
<ol>
|
||||||
<li>点击"获取登录链接"按钮</li>
|
<li>点击"获取登录链接"按钮</li>
|
||||||
|
<li>浏览器F12打开开发者工具,切换到“网络/network”,过滤选择“文档/doc”</li>
|
||||||
<li>在新窗口中完成 Pixiv 登录</li>
|
<li>在新窗口中完成 Pixiv 登录</li>
|
||||||
<li>登录成功后,在地址栏找到 <code>code=</code> 后面的内容</li>
|
<li>登录成功后,在最下面地址栏找到 <code>code=</code> 后面的内容</li>
|
||||||
<li>复制该授权码并粘贴到下方输入框</li>
|
<li>复制该授权码并粘贴到下方输入框</li>
|
||||||
|
<li>操作快点,因为会超时,如果超时请刷新该页面重试</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user