diff --git a/src/api/book.js b/src/api/book.js index 4d98b58..fd360be 100644 --- a/src/api/book.js +++ b/src/api/book.js @@ -8,6 +8,10 @@ export function getLastChapterAbout(params) { return request.get('/book/lastChapterAbout', { params }); } +export function listRecBooks(params) { + return request.get('/book/recList', { params }); +} + export function getBookContent(chapterId) { return request.get(`/book/content/${chapterId}`); } diff --git a/src/components/book/LastChapterAbout.vue b/src/components/book/LastChapterAbout.vue deleted file mode 100644 index f928f6f..0000000 --- a/src/components/book/LastChapterAbout.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 05cbdc9..3d7f04d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -35,4 +35,9 @@ const router = createRouter({ ] }) +// 解决 vue 中路由跳转时,总是从新页面中间开始显示 +router.afterEach((to,from,next) => { + window.scrollTo(0,0) +}) + export default router \ No newline at end of file diff --git a/src/views/Book.vue b/src/views/Book.vue index c7dcd94..23b6a42 100644 --- a/src/views/Book.vue +++ b/src/views/Book.vue @@ -4,34 +4,45 @@
-
-

{{book.bookName}}

- {{book.authorName}} +

{{ book.bookName }}

+ {{ + book.authorName + }}
  • - 类别:{{book.categoryName}} - 状态:{{book.bookStatus == 0 ? '连载中' : '已完结'}} - 总点击:{{book.visitCount}} - 总字数:{{book.wordCount}} + 类别:{{ book.categoryName }} + 状态:{{ + book.bookStatus == 0 ? "连载中" : "已完结" + }} + 总点击:{{ book.visitCount }} + 总字数:{{ book.wordCount }}
-

- -

+

收起 @@ -40,9 +51,9 @@ >
- - 点击阅读 @@ -63,8 +74,52 @@
- - + +
+
+
+
+

最新章节

+ ({{ chapterAbout.chapterTotal }}章) +
+ 全部目录 +
+ +
+
+
@@ -74,7 +129,7 @@

作品评论区

(0条)
- 发表评论 +
@@ -93,16 +148,19 @@ >
+ +
+