diff --git a/README.md b/README.md index 6bddffe..1cbf848 100644 --- a/README.md +++ b/README.md @@ -34,22 +34,11 @@ * 每天听本书可下载音频,文稿生成 Markdown 文档 * 电子书可下载 pdf,html, epub 等格式 -注: +### 注: 1. 下载均在后台执行,下载完毕弹框会关闭,等待弹窗关闭或者点击确定下载后关闭,均会在后台执行下载程序。 2. 如果遇到 `496 NoCertificate` 消息提示,请登录网页版进行图形验证码验证。 - -### 功能截图如下: - -![](image/Snipaste_2023-04-16_21-11-23.png) -![](image/Snipaste_2023-04-17_00-01-03.png) -![](image/Snipaste_2023-04-16_21-09-18.png) -![](image/Snipaste_2023-02-21_19-13-26.png) -![](image/Snipaste_2023-02-21_19-14-14.png) -![](image/Snipaste_2023-02-21_19-14-27.png) -![](image/Snipaste_2023-02-21_19-15-12.png) -![](image/Snipaste_2023-02-21_19-15-44.png) -![](image/Snipaste_2023-02-21_19-25-03.png) +3. 本应用上登录后再登录官方网页版会导致保存的 cookie 失效,使用 `rm -rf ~/.config/dedao/config.json` 删除配置信息后重新登陆本应用即可。 ## 安装 @@ -77,6 +66,17 @@ wails 构建需要安装以下依赖: * ffmpeg > 音频需要借助 [ffmpeg](https://ffmpeg.org/) 合成 +### 功能截图如下: + +![](image/Snipaste_2023-04-16_21-11-23.png) +![](image/Snipaste_2023-04-17_00-01-03.png) +![](image/Snipaste_2023-04-16_21-09-18.png) +![](image/Snipaste_2023-02-21_19-13-26.png) +![](image/Snipaste_2023-02-21_19-14-14.png) +![](image/Snipaste_2023-02-21_19-14-27.png) +![](image/Snipaste_2023-02-21_19-15-12.png) +![](image/Snipaste_2023-02-21_19-15-44.png) +![](image/Snipaste_2023-02-21_19-25-03.png) ## Stargazers over time @@ -86,5 +86,4 @@ wails 构建需要安装以下依赖: [MIT](./LICENSE) © yann0917 - --- diff --git a/backend/app/download.go b/backend/app/download.go index f5410a7..e3f868a 100644 --- a/backend/app/download.go +++ b/backend/app/download.go @@ -1,6 +1,7 @@ package app import ( + "errors" "os" "path/filepath" "sort" @@ -8,7 +9,6 @@ import ( "strings" jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" "github.com/yann0917/dedao-gui/backend/downloader" "github.com/yann0917/dedao-gui/backend/services" "github.com/yann0917/dedao-gui/backend/utils" diff --git a/backend/app/login.go b/backend/app/login.go index 90c2439..51fd1d1 100644 --- a/backend/app/login.go +++ b/backend/app/login.go @@ -1,10 +1,10 @@ package app import ( + "errors" "fmt" "strings" - "github.com/pkg/errors" "github.com/yann0917/dedao-gui/backend/config" "github.com/yann0917/dedao-gui/backend/services" ) diff --git a/backend/config/config.go b/backend/config/config.go index 1b124cb..121c66e 100644 --- a/backend/config/config.go +++ b/backend/config/config.go @@ -1,6 +1,7 @@ package config import ( + "errors" "io" "log" "os" @@ -8,7 +9,6 @@ import ( "sync" jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" "github.com/yann0917/dedao-gui/backend/services" ) diff --git a/backend/services/course.go b/backend/services/course.go index 73ed0bf..6a3088c 100644 --- a/backend/services/course.go +++ b/backend/services/course.go @@ -1,9 +1,8 @@ package services import ( + "errors" "math" - - "github.com/pkg/errors" ) // Course metadata diff --git a/backend/services/login.go b/backend/services/login.go index 206dd59..715dc0e 100644 --- a/backend/services/login.go +++ b/backend/services/login.go @@ -1,9 +1,5 @@ package services -import ( - "github.com/pkg/errors" -) - type QrCodeResp struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` @@ -25,29 +21,23 @@ type CheckLoginResp struct { func (s *Service) LoginAccessToken() (token string, err error) { token, err = s.reqGetLoginAccessToken(CsrfToken) if err != nil { - err = errors.Wrap(err, "request login err") return } - return } func (s *Service) GetQrcode(token string) (resp *QrCodeResp, err error) { resp, err = s.reqGetQrcode(token) if err != nil { - err = errors.Wrap(err, "request login err") return } - return } func (s *Service) CheckLogin(token, qrcode string) (check *CheckLoginResp, cookie string, err error) { check, cookie, err = s.reqCheckLogin(token, qrcode) if err != nil { - err = errors.Wrap(err, "request login err") return } - return } diff --git a/backend/services/user.go b/backend/services/user.go index 632f4c4..e8bcaba 100644 --- a/backend/services/user.go +++ b/backend/services/user.go @@ -1,9 +1,5 @@ package services -import ( - "github.com/pkg/errors" -) - // User user info type User struct { Nickname string `json:"nickname"` @@ -97,7 +93,6 @@ type OdobUser struct { func (s *Service) User() (user *User, err error) { body, err := s.reqUser() if err != nil { - err = errors.Wrap(err, "request user err") return } defer body.Close() @@ -142,7 +137,6 @@ type Token struct { func (s *Service) Token() (t *Token, err error) { body, err := s.reqToken() if err != nil { - err = errors.Wrap(err, "request token err") return } defer body.Close() diff --git a/frontend/components.d.ts b/frontend/components.d.ts index b1fc989..3546ef3 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -37,6 +37,7 @@ declare module '@vue/runtime-core' { ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopover: typeof import('element-plus/es')['ElPopover'] + ElProgress: typeof import('element-plus/es')['ElProgress'] ElRate: typeof import('element-plus/es')['ElRate'] ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] diff --git a/frontend/src/components/DownloadDialog.vue b/frontend/src/components/DownloadDialog.vue index 3379e79..179bc2b 100644 --- a/frontend/src/components/DownloadDialog.vue +++ b/frontend/src/components/DownloadDialog.vue @@ -6,6 +6,12 @@ + {{content}}