From 59e6b233b61cb44634c11fa27792e6098caa86c6 Mon Sep 17 00:00:00 2001 From: lipnggao Date: Tue, 26 Sep 2023 08:52:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/bookRecommendList/bookRecommendList.vue | 35 ++++++++++- pages/booksSearchList/booksSearchList.vue | 5 +- pages/novelReading/novelReading.vue | 28 ++++----- .../yingbing-ReadPage/yingbing-ReadPage.vue | 10 +-- .../yingbing-flip/components/modules/flip.wxs | 1 - .../yingbing-flip/yingbing-flip.vue | 7 --- .../dist/build/app-plus/app-config-service.js | 4 +- unpackage/dist/build/app-plus/app-service.js | 8 +-- unpackage/dist/build/app-plus/app-view.js | 2 +- unpackage/dist/dev/app-plus/app-service.js | 61 +++++++++---------- unpackage/dist/dev/app-plus/app-view.js | 58 ++++++++---------- 11 files changed, 113 insertions(+), 106 deletions(-) diff --git a/pages/bookRecommendList/bookRecommendList.vue b/pages/bookRecommendList/bookRecommendList.vue index 2024273..e3bd75f 100644 --- a/pages/bookRecommendList/bookRecommendList.vue +++ b/pages/bookRecommendList/bookRecommendList.vue @@ -47,7 +47,8 @@ columnsLabel: '', commFooterFlag: false, barTitle: '', - chapterorder: '' + chapterorder: '', + directoryAll: {} } }, onLoad(options) { @@ -74,7 +75,29 @@ handelChapterShow() { this.chapterShow = true; }, - handelDirectoryItem(row){ + handelDirectoryItem(row) { + const directoryAll = this.directoryAll; + let flag = true; + let chapterFlag = false; + Object.keys(directoryAll).forEach((m) => { + directoryAll[m].forEach((j) => { + if(flag) { + if (j.id != row.id && j.isvip == 1) { + chapterFlag = true; + } + if (j.id == row.id) { + flag = false + } + } + }) + }) + if(chapterFlag) { + uni.showToast({ + icon: 'none', + title: '前面章节未解锁,暂不支持跳章节观看', + }) + return; + } uni.navigateTo({ url: `/pages/novelReading/novelReading?sid=${this.bookSid}&n=${this.barTitle}&id=${row.id}` }) @@ -98,7 +121,9 @@ const data = { sid, page, - startOrder, + } + if (startOrder) { + data.startOrder = startOrder; } uni.$u.http.post('/getDirectory', data).then((res) => { uni.hideLoading(); @@ -122,6 +147,10 @@ } else { this.directory = [...this.directory, ...directory]; } + this.directoryAll = { + ...this.directoryAll, + [columnsLabel]: directory + } this.commFooterFlag = directory.length ? false : true; this.columns = [columns]; this.directoryCount = directoryCount; diff --git a/pages/booksSearchList/booksSearchList.vue b/pages/booksSearchList/booksSearchList.vue index b7d8ffc..92dfa06 100644 --- a/pages/booksSearchList/booksSearchList.vue +++ b/pages/booksSearchList/booksSearchList.vue @@ -3,7 +3,7 @@ - 搜索 @@ -98,7 +98,7 @@ getSearchBooks(keyword) { if (!keyword) { uni.showToast({ - title: '请先输入书名', + title: '请先输入您想看的小说', icon: 'none' }) return; @@ -152,6 +152,7 @@ handelSearchRecord(event) { const title = event.currentTarget.dataset.title; this.bookKeyword = title; + this.getSearchBooks(title); }, addBookshelf() { this.bookcase = 1; diff --git a/pages/novelReading/novelReading.vue b/pages/novelReading/novelReading.vue index f602da9..f40c923 100644 --- a/pages/novelReading/novelReading.vue +++ b/pages/novelReading/novelReading.vue @@ -23,7 +23,7 @@ :line-height="defaultCharactersLineHeight" :color="novelContentColor" :bg-color="bodyReadingBg" :slide="20" :enablePreload="false" @loadmore="loadmoreContent" :clickOption="{width:200,height: 400,left:'auto',top:'auto'}" :topGap="0" :bottomGap="20" - @change="currentChange" :readChapterFlag="readChapterFlag"> + @change="currentChange">