├── .gitignore ├── BaiduPCS-Go-v3.7.1 ├── BaiduPCS-Go-v3.7.1-darwin-osx-amd64.zip ├── BaiduPCS-Go-v3.7.1-freebsd-386.zip ├── BaiduPCS-Go-v3.7.1-freebsd-amd64.zip ├── BaiduPCS-Go-v3.7.1-freebsd-arm.zip ├── BaiduPCS-Go-v3.7.1-linux-386.zip ├── BaiduPCS-Go-v3.7.1-linux-amd64.zip ├── BaiduPCS-Go-v3.7.1-linux-arm64.zip ├── BaiduPCS-Go-v3.7.1-linux-armv5.zip ├── BaiduPCS-Go-v3.7.1-linux-armv7.zip ├── BaiduPCS-Go-v3.7.1-linux-mips.zip ├── BaiduPCS-Go-v3.7.1-linux-mips64.zip ├── BaiduPCS-Go-v3.7.1-linux-mips64le.zip ├── BaiduPCS-Go-v3.7.1-linux-mipsle.zip ├── BaiduPCS-Go-v3.7.1-windows-x64.zip ├── BaiduPCS-Go-v3.7.1-windows-x86.zip ├── LICENSE └── README.md ├── KinhDown ├── KinhDown稳定版 版本1.1.65.7z ├── KinhDown稳定版.exe └── 发布版_KinhDown公测版.apk ├── LICENSE ├── PanDownload.md ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── img │ └── logo.png ├── index.html ├── manifest.json └── robots.txt ├── src ├── App.vue ├── assets │ ├── login-bg.jpg │ └── logo.png ├── components │ ├── Finished.vue │ └── Nav.vue ├── config.js ├── less │ ├── Pages │ │ ├── download.less │ │ ├── downloadItems.less │ │ ├── fileManager.less │ │ ├── finished.less │ │ └── recycle.less │ └── common.less ├── libs │ └── util.js ├── main.js ├── registerServiceWorker.js ├── router.js ├── store.js └── views │ ├── Download.vue │ ├── DownloadProcessItem.vue │ ├── FileManager.vue │ ├── FileSelect.vue │ ├── Home.vue │ ├── Lock.vue │ ├── Login.vue │ ├── Recycle.vue │ └── Share.vue └── vue.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-darwin-osx-amd64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-darwin-osx-amd64.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-freebsd-386.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-freebsd-386.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-freebsd-amd64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-freebsd-amd64.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-freebsd-arm.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-freebsd-arm.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-386.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-386.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-amd64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-amd64.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-arm64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-arm64.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-armv5.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-armv5.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-armv7.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-armv7.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-mips.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-mips.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-mips64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-mips64.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-mips64le.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-mips64le.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-mipsle.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-linux-mipsle.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-windows-x64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-windows-x64.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-windows-x86.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/BaiduPCS-Go-v3.7.1/BaiduPCS-Go-v3.7.1-windows-x86.zip -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2020, coolsnowwolf 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /BaiduPCS-Go-v3.7.1/README.md: -------------------------------------------------------------------------------- 1 | # baidupcs-web -------------------------------------------------------------------------------- /KinhDown/KinhDown稳定版 版本1.1.65.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/KinhDown/KinhDown稳定版 版本1.1.65.7z -------------------------------------------------------------------------------- /KinhDown/KinhDown稳定版.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/KinhDown/KinhDown稳定版.exe -------------------------------------------------------------------------------- /KinhDown/发布版_KinhDown公测版.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/KinhDown/发布版_KinhDown公测版.apk -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 iView 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PanDownload.md: -------------------------------------------------------------------------------- 1 | ## PanDownload的个人维护版本 2 | 3 | 原github: https://github.com/PanDownloadServer/Server 4 | 5 | 备份1:https://github.com/Linux-Doc/Server 6 | 7 | 网站:https://kurukurumi.tk/ 8 | 9 | ## baidupcs-web 各平台最新编译版 10 | 11 | 原github:https://github.com/coolsnowwolf/baidupcs-web 12 | 13 | ## kinhdown 14 | 15 | 网站:https://kurukurumi.tk/ 16 | 17 | 蓝凑云:https://www.lanzoux.com/s/KinhDown 18 | 19 | * 下载地址:[CDN](https://cdn.jsdelivr.net/gh/Linux-Doc/baidupcs-web@master/KinhDown/KinhDown稳定版.exe) 20 | 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 注意: 本人不对本程序承担任何责任,也不接受任何形式的赞助或赞赏,更不会以此牟利或分享用户数据。目前已经基本去除程序中和第三方服务器交互的部分,因此无法在线更新和推送消息,如有更新需要请watch 2 | 3 | # 更新介绍 4 | 5 | 1. 修复无法获取验证码导致无法登录的问题 6 | 2. 修复BDUSS登录时无法处理异常信息 7 | 3. 下载在无下载参数情况下(分享下载/locate下载/默认下载),默认使用locate方式下载,以获取更高的速度,非SVIP会员注意可能触发限速。 8 | 4. 修复刷新后无法获取原来的下载数据,目前会自动恢复下载列表 9 | 5. 初步增加aria2下载功能,暂时只支持RPC-Secret验证 10 | 6. 版本更新到3.7.1,关闭消息通知和在线更新功能 11 | 12 | # 下载地址 13 | 1. https://github.com/Erope/baidupcs-web/releases 14 | 2. https://lanzous.com/b08x4n89g 密码:aaij 15 | 3. https://www.shinenet.cn/archives/131.html 16 | 17 | ## Aria2下载功能 18 | ### 配置 19 | ```shell 20 | --aria2, -a 启用aria2下载,停用自带下载 21 | --aria2url value, --au value aria2的url (default: "http://localhost:6800/jsonrpc") 22 | --aria2secret value, --as value aria2-RPC的secret,默认为空 23 | ``` 24 | -a参数控制aria2是否开启,-au控制aria2-RPC的URL,-as控制aria2-RPC的令牌 25 | 注意,这个url是基于Baidu-PCS运行的主机而言的,并非基于客户端 26 | 开启后默认的下载列表会失效,请自行使用其他软件来控制下载 27 | 最高线程上限设置为了16线程,因为默认的Aria2的源码中写的就是16线程,超过会报错,建议仅使用4线程下载以防拉黑 28 | 如果不会配置Aria2,建议暂时还是不要尝试 29 | 30 | 例子: 31 | ./BaiduPCS-Go -a -au "http://10.0.0.1:6800/jsonrpc" -as "xxxxxxxxxxxxxxxxxxxxx" 32 | 33 | # 欢迎讨论: 34 | 1. QQ群: 343564194 35 | 2. 博客: https://www.shinenet.cn/archives/131.html 36 | 3. TG: https://t.me/ShineNet_Q 37 | 4. 点个Star再走? 38 | 39 | ~~怎么一直没人加呢...~~ 40 | 41 | # 开发者看这里 42 | 1. 这个仓库是前端仓库,后端仓库在 https://github.com/Erope/BaiduPCS-Go 43 | 2. 不准备跟进iikira作者的更新,因为内核基本没变化,主要更新点都是下载引擎的,但我预备对接上Aria2然后放弃原下载引擎 44 | 3. 前端仓库编译好后放在后端仓库的 /internal/pcsweb/dist ,再使用build.sh进行编译,需要的环境可以在 https://github.com/iikira/BaiduPCS-Go/wiki/编译-交叉编译帮助 获取 45 | 4. 欢迎各位PR和提ISSUE 46 | 5. 目前所有开发都在master分支(毕竟目前就我一个,人多了会考虑新分支) 47 | 48 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "baidu-pcs-web", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "register-service-worker": "^1.6.2", 12 | "vue": "^2.6.10", 13 | "vue-router": "^3.1.3", 14 | "vuex": "^3.1.2" 15 | }, 16 | "devDependencies": { 17 | "@vue/cli-plugin-babel": "^3.12.1", 18 | "@vue/cli-plugin-eslint": "^3.12.1", 19 | "@vue/cli-plugin-pwa": "^3.12.1", 20 | "@vue/cli-service": "^3.12.1", 21 | "axios": "^0.18.1", 22 | "iview": "^3.5.3", 23 | "less": "^3.10.3", 24 | "less-loader": "^4.1.0", 25 | "v-contextmenu": "^2.8.1", 26 | "vue-template-compiler": "^2.6.10" 27 | }, 28 | "eslintConfig": { 29 | "root": true, 30 | "env": { 31 | "node": true 32 | }, 33 | "extends": [ 34 | "plugin:vue/essential", 35 | "eslint:recommended" 36 | ], 37 | "rules": { 38 | "no-console": "off", 39 | "no-undef": "off", 40 | "vue/no-parsing-error": [ 41 | 2, 42 | { 43 | "x-invalid-end-tag": false 44 | } 45 | ] 46 | }, 47 | "parserOptions": { 48 | "parser": "babel-eslint" 49 | } 50 | }, 51 | "postcss": { 52 | "plugins": { 53 | "autoprefixer": {} 54 | } 55 | }, 56 | "browserslist": [ 57 | "> 1%", 58 | "last 2 versions", 59 | "not ie <= 8" 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/public/img/logo.png -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | baidu-pcs-web 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "baidu-pcs-web", 3 | "short_name": "baidu-pcs-web", 4 | "icons": [ 5 | { 6 | "src": "/img/icons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/img/icons/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": "/index.html", 17 | "display": "standalone", 18 | "background_color": "#000000", 19 | "theme_color": "#4DBA87" 20 | } 21 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/login-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/src/assets/login-bg.jpg -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-doc/baidupcs-web/46bbdf6e4d90233d9a4a2ec9a7aa017b4d59d379/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/Finished.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 45 | -------------------------------------------------------------------------------- /src/components/Nav.vue: -------------------------------------------------------------------------------- 1 | 85 | 86 | 244 | 245 | 288 | -------------------------------------------------------------------------------- /src/config.js: -------------------------------------------------------------------------------- 1 | const wsProtocol = location.protocol === 'http:' ? 'ws:' : 'wss:' 2 | let base_url = location.origin, ws_url = `${wsProtocol}//${location.host}/ws` 3 | 4 | if (process.env.NODE_ENV === 'development') { 5 | base_url = 'http://localhost:8080' 6 | ws_url = 'ws://127.0.0.1:5299/ws' 7 | } 8 | 9 | export default { 10 | base_url, 11 | ws_url 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/less/Pages/download.less: -------------------------------------------------------------------------------- 1 | .page-download { 2 | display: flex; 3 | height: calc(100vh - 60px); 4 | 5 | .ivu-layout-sider { 6 | padding: 0; 7 | background: #fff; 8 | } 9 | 10 | .ivu-menu-vertical.ivu-menu-light:after { 11 | display: none; 12 | } 13 | 14 | .p-main { 15 | padding: 16px; 16 | flex: auto; 17 | background-color: #f5f7f9; 18 | } 19 | } -------------------------------------------------------------------------------- /src/less/Pages/downloadItems.less: -------------------------------------------------------------------------------- 1 | .child-download-items { 2 | max-height: calc(100vh - 108px); 3 | overflow-y: auto; 4 | 5 | .items-list { 6 | .item { 7 | background-color: #fff; 8 | margin-bottom: 8px; 9 | 10 | .i-title { 11 | display: flex; 12 | align-items: center; 13 | padding: 8px; 14 | border-bottom: 1px solid #f2f6fd; 15 | 16 | > span:first-child { 17 | margin-right: 16px; 18 | padding-right: 16px; 19 | border-right: 1px solid #f2f6fd; 20 | } 21 | } 22 | 23 | .i-body { 24 | padding: 16px 8px; 25 | display: flex; 26 | align-items: center; 27 | 28 | .b-progress { 29 | width: 50%; 30 | } 31 | 32 | .b-actions { 33 | width: 10%; 34 | 35 | .ivu-btn { 36 | margin: 0 4px; 37 | } 38 | } 39 | 40 | .b-info { 41 | width: 40%; 42 | 43 | > span { 44 | margin-right: 16px; 45 | } 46 | } 47 | } 48 | } 49 | } 50 | } 51 | 52 | .v-progress { 53 | font-size: 12px; 54 | display: flex; 55 | align-items: center; 56 | 57 | .p-bar { 58 | position: relative; 59 | flex: 1; 60 | background-color: #f3f3f3; 61 | border-radius: 10px; 62 | margin-right: 8px; 63 | 64 | .b-fg { 65 | height: 10px; 66 | background-color: #2d8cf0; 67 | border-radius: 10px; 68 | transition: width .2s linear; 69 | } 70 | } 71 | 72 | .p-text { 73 | width: 48px; 74 | } 75 | 76 | &.success { 77 | .p-bar { 78 | .b-fg { 79 | background-color: #19be6b; 80 | } 81 | } 82 | 83 | .p-text { 84 | color: #19be6b; 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /src/less/Pages/fileManager.less: -------------------------------------------------------------------------------- 1 | .page-file-manager { 2 | display: flex; 3 | height: calc(100vh - 60px); 4 | 5 | .ivu-layout-sider { 6 | background-color: #f5f7f9; 7 | } 8 | 9 | .p-main { 10 | flex: auto; 11 | } 12 | 13 | .ivu-breadcrumb { 14 | margin: 8px 0 0; 15 | padding-left: 24px; 16 | } 17 | 18 | .p-content { 19 | position: relative; 20 | padding: 24px; 21 | 22 | .row-tools { 23 | display: flex; 24 | align-items: center; 25 | justify-content: space-between; 26 | margin-bottom: 8px; 27 | 28 | .t-l { 29 | display: flex; 30 | align-items: center; 31 | 32 | .v-checkbox { 33 | margin-left: 2px; 34 | margin-right: 16px; 35 | } 36 | } 37 | } 38 | } 39 | 40 | .table-wrap { 41 | max-height: calc(100vh - 178px); 42 | overflow-y: auto; 43 | } 44 | 45 | .files-table { 46 | width: 100%; 47 | border-spacing: 0; 48 | 49 | thead { 50 | tr { 51 | height: 36px; 52 | 53 | th { 54 | text-align: left; 55 | border-bottom: 1px solid #f2f6fd; 56 | } 57 | } 58 | } 59 | 60 | tbody { 61 | tr { 62 | height: 42px; 63 | 64 | &:hover { 65 | background-color: #f6faff; 66 | } 67 | } 68 | } 69 | 70 | .item-title { 71 | display: flex; 72 | align-items: center; 73 | overflow-x: hidden; 74 | white-space: nowrap; 75 | text-overflow: ellipsis; 76 | 77 | .t-content { 78 | display: flex; 79 | align-items: center; 80 | 81 | > span { 82 | margin-left: 8px; 83 | } 84 | } 85 | 86 | .t-buttons { 87 | display: none; 88 | } 89 | 90 | &.is-dir { 91 | .t-content { 92 | cursor: pointer; 93 | } 94 | 95 | &:hover { 96 | .t-content { 97 | > span { 98 | color: #2d8cf0; 99 | } 100 | } 101 | } 102 | } 103 | 104 | &:hover { 105 | .t-buttons { 106 | display: block; 107 | } 108 | } 109 | } 110 | } 111 | } -------------------------------------------------------------------------------- /src/less/Pages/finished.less: -------------------------------------------------------------------------------- 1 | .child-finished { 2 | max-height: calc(100vh - 84px); 3 | overflow-y: auto; 4 | 5 | .items-list { 6 | .item { 7 | background-color: #fff; 8 | margin-bottom: 8px; 9 | 10 | .i-title { 11 | display: flex; 12 | align-items: center; 13 | padding: 8px; 14 | border-bottom: 1px solid #f2f6fd; 15 | 16 | > span:first-child { 17 | margin-right: 16px; 18 | padding-right: 16px; 19 | border-right: 1px solid #f2f6fd; 20 | } 21 | } 22 | 23 | .i-body { 24 | padding: 16px 8px; 25 | display: flex; 26 | align-items: center; 27 | 28 | > span { 29 | margin: 0 8px; 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/less/Pages/recycle.less: -------------------------------------------------------------------------------- 1 | .page-recycle { 2 | height: 60vh; 3 | overflow: auto; 4 | margin-top: 30px; 5 | 6 | .table { 7 | thead { 8 | tr { 9 | text-align: left; 10 | height: 30px; 11 | } 12 | } 13 | 14 | tbody { 15 | tr { 16 | height: 36px; 17 | 18 | .col-long { 19 | width: 222px; 20 | overflow-x: hidden; 21 | white-space: nowrap; 22 | text-overflow: ellipsis; 23 | } 24 | } 25 | } 26 | 27 | .ivu-btn { 28 | padding: 0 3px; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/less/common.less: -------------------------------------------------------------------------------- 1 | html, body, #app { 2 | height: 100%; 3 | font-size: 14px; 4 | } 5 | 6 | .ivu-tree ul { 7 | font-size: 14px !important; 8 | } 9 | 10 | .ivu-layout-content { 11 | flex: 1 !important; 12 | } 13 | 14 | .ivu-layout-has-sider { 15 | height: calc(100% - 60px); 16 | } 17 | 18 | .icons { 19 | height: calc(100% - 90px); 20 | zoom: 1; 21 | } 22 | 23 | .ivu-col { 24 | padding-left: 8px; 25 | padding-right: 8px; 26 | } 27 | 28 | .ivu-layout-sider { 29 | padding: 10px; 30 | overflow-y: auto; 31 | overflow-x: hidden; 32 | background: white; 33 | } 34 | 35 | .ivu-card { 36 | margin-top: 16px; 37 | } 38 | 39 | .route-download { 40 | height: 100%; 41 | } 42 | 43 | .ivu-menu-item { 44 | .ivu-icon { 45 | margin-right: 8px; 46 | } 47 | } 48 | 49 | .c-btn-group { 50 | .ivu-btn { 51 | > span { 52 | display: flex; 53 | align-items: center; 54 | 55 | .ivu-icon { 56 | margin-right: 4px; 57 | } 58 | } 59 | } 60 | } 61 | 62 | .c-action-group { 63 | .ivu-btn { 64 | margin: 0 4px; 65 | } 66 | } 67 | 68 | .ivu-modal-body { 69 | padding: 48px 16px 16px; 70 | 71 | .ivu-row:not(:last-child) { 72 | margin-bottom: 16px; 73 | } 74 | } 75 | 76 | a.router-link-exact-active { 77 | color: #7facdc !important; 78 | } 79 | 80 | .v-checkbox { 81 | display: flex; 82 | align-items: center; 83 | justify-content: space-between; 84 | user-select: none; 85 | position: relative; 86 | font-size: 14px; 87 | height: 16px; 88 | line-height:16px; 89 | cursor: pointer; 90 | 91 | input { 92 | -webkit-appearance: none; 93 | -moz-appearance: none; 94 | width: 16px; 95 | height: 16px; 96 | box-shadow: none; 97 | border: 1px solid #919191; 98 | border-radius: 2px; 99 | margin: 0; 100 | cursor: pointer; 101 | 102 | &:checked { 103 | border: none; 104 | background-color: #2d8cf0; 105 | 106 | & + span:after { 107 | transform: scale(1) rotateZ(37deg); 108 | } 109 | } 110 | } 111 | 112 | span:after { 113 | content: ''; 114 | position: absolute; 115 | left: 0; 116 | top: 2px; 117 | width: 7px; 118 | height: 12px; 119 | border: 2px solid #fff; 120 | border-top-color: transparent; 121 | border-left-color: transparent; 122 | transform-origin: 120% 90%; 123 | transform: scale(0) rotateZ(37deg); 124 | transition: transform .2s cubic-bezier(0.250, 0.460, 0.450, 0.940); 125 | } 126 | 127 | &.reverse { 128 | flex-direction: row-reverse; 129 | 130 | input { 131 | margin-right: 0; 132 | margin-left: 8px; 133 | } 134 | 135 | span:after { 136 | left: inherit; 137 | right: 9px; 138 | } 139 | } 140 | 141 | &.disabled { 142 | cursor: not-allowed; 143 | color: #d9d9d9; 144 | 145 | input { 146 | border-color: #d9d9d9; 147 | 148 | &:checked { 149 | background-color: #d9d9d9; 150 | } 151 | } 152 | } 153 | } 154 | 155 | @import "Pages/fileManager"; 156 | @import "Pages/download"; 157 | @import "Pages/downloadItems"; 158 | @import "Pages/finished"; 159 | @import "Pages/recycle"; -------------------------------------------------------------------------------- /src/libs/util.js: -------------------------------------------------------------------------------- 1 | export default { 2 | title(title) { 3 | title = title ? title + ' - Home' : 'baidupcs-web'; 4 | window.document.title = title; 5 | }, 6 | formatDateTime(inputTime) { 7 | var date = new Date(inputTime); 8 | var y = date.getFullYear(); 9 | var m = date.getMonth() + 1; 10 | m = m < 10 ? ('0' + m) : m; 11 | var d = date.getDate(); 12 | d = d < 10 ? ('0' + d) : d; 13 | var h = date.getHours(); 14 | h = h < 10 ? ('0' + h) : h; 15 | var minute = date.getMinutes(); 16 | var second = date.getSeconds(); 17 | minute = minute < 10 ? ('0' + minute) : minute; 18 | second = second < 10 ? ('0' + second) : second; 19 | return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second; 20 | }, 21 | bytesToSize(bytes) { 22 | if (bytes === 0) return '0 B'; 23 | var k = 1024, 24 | sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], 25 | i = Math.floor(Math.log(bytes) / Math.log(k)); 26 | 27 | return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i]; 28 | }, 29 | sleep(delay = 1000) { 30 | return new Promise(resolve => { 31 | setTimeout(() => resolve(), delay) 32 | }) 33 | } 34 | } -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import iView from 'iview' 3 | import 'iview/dist/styles/iview.css'; 4 | import './less/common.less' 5 | import App from './App.vue' 6 | import router from './router' 7 | import store from './store' 8 | import axios from 'axios' 9 | import config from './config' 10 | // import './registerServiceWorker' 11 | 12 | 13 | if (/Mobi/i.test(navigator.userAgent)) { 14 | location.href = `${location.origin}/dist_mobile` 15 | } 16 | 17 | Vue.use(iView) 18 | Vue.config.productionTip = false 19 | 20 | Vue.prototype.error = function(msg) { 21 | this.$Message.error({ 22 | content: msg 23 | }) 24 | } 25 | 26 | window.$axios = axios.create({ 27 | baseURL: `${config.base_url}/api/v1/` 28 | }) 29 | 30 | store 31 | .dispatch('init') 32 | .then(() => { 33 | new Vue({ 34 | router, 35 | store, 36 | render: h => h(App) 37 | }).$mount('#app') 38 | }) 39 | 40 | 41 | // import XParticles from 'x-particles' 42 | // Vue.use(XParticles); 43 | -------------------------------------------------------------------------------- /src/registerServiceWorker.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | import { register } from 'register-service-worker' 4 | 5 | if (process.env.NODE_ENV === 'production') { 6 | register(`${process.env.BASE_URL}service-worker.js`, { 7 | ready () { 8 | console.log( 9 | 'App is being served from cache by a service worker.\n' + 10 | 'For more details, visit https://goo.gl/AFskqB' 11 | ) 12 | }, 13 | cached () { 14 | console.log('Content has been cached for offline use.') 15 | }, 16 | updated () { 17 | console.log('New content is available; please refresh.') 18 | }, 19 | offline () { 20 | console.log('No internet connection found. App is running in offline mode.') 21 | }, 22 | error (error) { 23 | console.error('Error during service worker registration:', error) 24 | } 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /src/router.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import Home from './views/Home.vue' 4 | import Login from './views/Login' 5 | import Nav from './components/Nav' 6 | // import Lock from './views/Lock.vue' 7 | import store from './store' 8 | 9 | Vue.use(Router) 10 | 11 | const router = new Router({ 12 | // mode: 'history', 13 | routes: [ 14 | { 15 | path: '/', 16 | name: 'home', 17 | components: { 18 | default: Home, 19 | nav: Nav 20 | }, 21 | meta: { auth: true } 22 | }, 23 | { path: '/login', component: Login }, 24 | // { path: '/lock', component: Lock }, 25 | { 26 | path: '/download', 27 | components: { 28 | default: () => import(/* webpackChunkName: "download" */ './views/Download'), 29 | nav: Nav 30 | }, 31 | meta: { auth: true } 32 | } 33 | ] 34 | }) 35 | 36 | router.beforeEach((to, from, next) => { 37 | if (to.matched.some(record => record.meta.auth)) { 38 | if (!store.state.login) { 39 | next('/login') 40 | return 41 | } 42 | /*if (store.state.isLock) { 43 | next('/lock') 44 | return 45 | }*/ 46 | } 47 | next() 48 | }) 49 | 50 | /*router.afterEach((to, from, next) => { 51 | iView.LoadingBar.finish() 52 | window.scrollTo(0, 0) 53 | })*/ 54 | 55 | export default router 56 | -------------------------------------------------------------------------------- /src/store.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import config from './config' 4 | 5 | Vue.use(Vuex) 6 | 7 | function receiveData(e, state) { 8 | const redata = JSON.parse(e.data) 9 | if (redata.code !== 0) { 10 | Vue.prototype.$Message.error({ 11 | content: redata.msg, 12 | duration: 10, 13 | closable: true 14 | }) 15 | } 16 | 17 | let pos = 0 18 | let ditem = {} 19 | const data = JSON.parse(redata.data.replace(/\\/g, '/')) 20 | 21 | //下载任务 22 | if (redata.type === 2) { 23 | switch (redata.status) { 24 | //添加到下载任务列表 25 | case 1: { 26 | let fd_names = data.path.split('/') 27 | state.globals.downloading.push({ 28 | LastID: data.LastID, 29 | path: data.path, 30 | name: fd_names.pop(), 31 | speed: '0KB', 32 | avg_speed: '0KB', 33 | time_used: '0s', 34 | download_size: '0KB', 35 | total_size: '--KB', 36 | time_left: '--s', 37 | percent: 0, 38 | is_pause: false, 39 | status: redata.status 40 | }) 41 | break 42 | } 43 | case 2: 44 | for (let i = 0; i < state.globals.downloading.length; i++) { 45 | if (data.path === state.globals.downloading[i].path) { 46 | state.globals.downloading.splice(i, 1) 47 | break 48 | } 49 | } 50 | break 51 | case 5: //正在下载 52 | ditem = state.globals.downloading.find(item => item.LastID === data.LastID) 53 | if (!ditem.is_pause) { 54 | ditem.speed = data.speed 55 | ditem.avg_speed = data.avg_speed 56 | ditem.time_used = data.time_used 57 | ditem.download_size = data.download_size 58 | ditem.total_size = data.total_size 59 | ditem.time_left = data.time_left 60 | ditem.percent = data.percent 61 | ditem.status = redata.status 62 | } 63 | break 64 | case 6: //任务暂停 65 | ditem = state.globals.downloading.find(item => item.LastID === data.LastID) 66 | ditem.is_pause = true 67 | ditem.speed = '0KB' 68 | ditem.avg_speed = '0KB' 69 | ditem.time_left = '--s' 70 | ditem.status = redata.status 71 | break 72 | case 7: //任务恢复 73 | ditem = state.globals.downloading.find(item => item.LastID === data.LastID) 74 | ditem.is_pause = false 75 | ditem.status = redata.status 76 | break 77 | case 8: //任务删除 78 | pos = state.globals.downloading.findIndex(item => item.LastID === data.LastID) 79 | state.globals.downloading.splice(pos, 1) 80 | break 81 | case 9: //任务完成 82 | pos = state.globals.downloading.findIndex(item => item.LastID === data.LastID) 83 | if (pos >= 0) { 84 | ditem = state.globals.downloading[pos] 85 | state.globals.downloaded.push({ 86 | LastID: ditem.LastID, 87 | path: ditem.path, 88 | name: ditem.name, 89 | speed: ditem.speed, 90 | avg_speed: ditem.avg_speed, 91 | time_used: ditem.time_used, 92 | download_size: ditem.download_size, 93 | total_size: ditem.total_size, 94 | time_left: '0s', 95 | percent: 100, 96 | status: redata.status, 97 | save_path: data.savePath 98 | }) 99 | state.globals.downloading.splice(pos, 1) 100 | } 101 | break 102 | } 103 | } 104 | 105 | //上传任务 106 | if (redata.type === 3) { 107 | switch (redata.status) { 108 | //添加到上传任务中 109 | case 1: { 110 | let fd_names = data.path.split('/') 111 | state.globals.uploading.push({ 112 | LastID: data.LastID, 113 | path: data.path, 114 | name: fd_names.pop(), 115 | speed: '0KB', 116 | avg_speed: '0KB', 117 | time_used: '0s', 118 | uploaded_size: '0KB', 119 | total_size: '--KB', 120 | time_left: '--s', 121 | percent: 0, 122 | is_pause: false, 123 | status: redata.status, 124 | }) 125 | break 126 | } 127 | case 2: 128 | break 129 | case 3: //秒传成功 130 | pos = state.globals.uploading.findIndex(item => item.LastID === data.LastID) 131 | ditem = state.globals.uploading[pos] 132 | ditem.percent = 100 133 | ditem.status = redata.status 134 | ditem.save_path = data.savePath 135 | state.globals.uploaded.push(ditem) 136 | state.globals.uploading.splice(pos, 1) 137 | break 138 | case 4: //正在上传 139 | ditem = state.globals.uploading.find(item => item.LastID === data.LastID) 140 | ditem.speed = data.speed 141 | ditem.avg_speed = data.avg_speed 142 | ditem.time_used = data.time_used 143 | ditem.uploaded_size = data.uploaded_size 144 | ditem.total_size = data.total_size 145 | ditem.time_left = data.time_left 146 | ditem.percent = data.percent 147 | ditem.status = redata.status 148 | break 149 | case 5: //上传完成 150 | pos = state.globals.uploading.findIndex(item => item.LastID === data.LastID) 151 | ditem = state.globals.uploading[pos] 152 | state.globals.uploaded.push({ 153 | LastID: ditem.LastID, 154 | path: ditem.path, 155 | name: ditem.name, 156 | speed: ditem.speed, 157 | avg_speed: ditem.avg_speed, 158 | time_used: ditem.time_used, 159 | uploaded_size: ditem.uploaded_size, 160 | total_size: ditem.total_size, 161 | time_left: '0s', 162 | percent: 100, 163 | status: redata.status, 164 | save_path: data.savePath 165 | }) 166 | state.globals.uploading.splice(pos, 1) 167 | break 168 | } 169 | } 170 | } 171 | 172 | export default new Vuex.Store({ 173 | state: { 174 | login: false, 175 | isLock: false, 176 | user: {}, 177 | globals: { 178 | pending_download_data: [], 179 | send_download_signal: false, 180 | pending_upload_data: [], 181 | send_upload_signal: 0, 182 | press_back_key: false, 183 | share_refresh: false, 184 | pending_download: [], 185 | downloading: [], 186 | downloaded: [], 187 | pending_upload: [], 188 | uploading: [], 189 | uploaded: [] 190 | }, 191 | websocket: null 192 | }, 193 | mutations: { 194 | setUserInfo(state, payload) { 195 | state.login = payload.login 196 | state.user = payload.user 197 | }, 198 | setIsLock(state, isLock) { 199 | state.isLock = isLock 200 | }, 201 | initWS(state) { 202 | const websocket = new WebSocket(config.ws_url) 203 | websocket.onopen = () => console.log("WebSocket连接成功") 204 | websocket.onerror = () => console.log("WebSocket连接发生错误") 205 | websocket.onclose = (e) => console.log(`connection closed (${e})`) 206 | websocket.onmessage = (e) => receiveData(e, state) 207 | state.websocket = websocket 208 | } 209 | }, 210 | actions: { 211 | async init({ commit }) { 212 | let user, login = false 213 | const body = await $axios.get('user?method=get') 214 | if (body.status === 200 && body.data && body.data.code === 0) { 215 | user = body.data.data 216 | login = true 217 | 218 | /*const hasLockPwd = await $axios.get('password?method=exist') 219 | if (hasLockPwd.status === 200 && hasLockPwd.data && hasLockPwd.data.code === 0) { 220 | if (hasLockPwd.data.data) { 221 | if (localStorage.lastUnlockTime === undefined || (new Date().getTime() - Number(localStorage.lastUnlockTime) > 86400 * 1000)) { 222 | commit('setIsLock', true) 223 | } 224 | } 225 | }*/ 226 | } else { 227 | user = {} 228 | } 229 | commit('setUserInfo', { user, login }) 230 | return true 231 | } 232 | } 233 | }) 234 | -------------------------------------------------------------------------------- /src/views/Download.vue: -------------------------------------------------------------------------------- 1 | 97 | 98 | -------------------------------------------------------------------------------- /src/views/DownloadProcessItem.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 145 | -------------------------------------------------------------------------------- /src/views/FileManager.vue: -------------------------------------------------------------------------------- 1 | 102 | 103 | 563 | -------------------------------------------------------------------------------- /src/views/FileSelect.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | -------------------------------------------------------------------------------- /src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/views/Lock.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /src/views/Login.vue: -------------------------------------------------------------------------------- 1 | 55 | 56 | 242 | 243 | 293 | -------------------------------------------------------------------------------- /src/views/Recycle.vue: -------------------------------------------------------------------------------- 1 | 40 | 41 | -------------------------------------------------------------------------------- /src/views/Share.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 104 | 105 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | lintOnSave: false, 3 | baseUrl: '/dist/', 4 | devServer: { 5 | proxy: { 6 | '/api': { 7 | target: 'http://localhost:5299', 8 | changeOrigin: true 9 | } 10 | } 11 | }, 12 | } 13 | --------------------------------------------------------------------------------