修改阅读页面
@ -15,6 +15,10 @@
|
|||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-ios"
|
"type" : "uni-app:app-ios"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"playground" : "custom",
|
||||||
|
"type" : "uni-app:app-android"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,633 +0,0 @@
|
|||||||
<template>
|
|
||||||
<u-navbar :title="navbarTitle" @rightClick="rightClick" :autoBack="true" :fixed="true" :bgColor="mainBodyBg"
|
|
||||||
:titleStyle="{'color':navigationBarTitleTextColor,}" :leftIconColor="navigationBarTitleTextBackColor"
|
|
||||||
:shadow="true" :safeAreaInsetTop="true" :placeholder="true">
|
|
||||||
</u-navbar>
|
|
||||||
<view class="novelReading_content">
|
|
||||||
<!-- :refresher-complete-scrollable="true" -->
|
|
||||||
<!-- <z-paging ref="paging" @onRefresh="onRefresh"
|
|
||||||
:style="`background:${bodyReadingBg};height:${bodyReadingHeight}px;`"
|
|
||||||
v-model="novelReadingContentText" @scrolltolower="scrolltolower" > -->
|
|
||||||
|
|
||||||
<!-- 页面内容 -->
|
|
||||||
<!-- :style="`height:${bodyReadingHeight}px;`" -->
|
|
||||||
<!-- <view class="novelReading_body" @tap="handelShowStepUp">
|
|
||||||
<view class="novelReading_main">
|
|
||||||
<view class="novelReading_characters_main"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight}`"
|
|
||||||
v-for="m in novelReadingContentText" :key="m.id" :id="`richText_${m.id}`">
|
|
||||||
<rich-text :nodes="m.content" :ref="`richText_${m.id}`"></rich-text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</z-paging> -->
|
|
||||||
<u-popup :show="tabBarPopupShow" mode="bottom" :overlay="false" zIndex="6">
|
|
||||||
<view class="my_tabBar_Reading" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view class="tabBar_Reading_item">
|
|
||||||
<view class="reading_item_icon" @tap="handelDirectoryPopup">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].directory_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">目录</view>
|
|
||||||
</view>
|
|
||||||
<view class="tabBar_Reading_item">
|
|
||||||
<view class="reading_item_icon">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].bookshelf_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">书城</view>
|
|
||||||
</view>
|
|
||||||
<view class="tabBar_Reading_item" @tap="handelSteUpPopup">
|
|
||||||
<view class="reading_item_icon">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].step_up_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">设置</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="readingPopupshow" mode="bottom" :overlay="false" zIndex="4" bgColor="transparent">
|
|
||||||
<view class="reading_schedule_box" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view style="height:140rpx" />
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="stepUpPopupShow" mode="bottom" :overlay="false" bgColor="transparent" zIndex="5">
|
|
||||||
<view class="step_up_box" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view class="step_up_box_body">
|
|
||||||
<view class="step_up_item">
|
|
||||||
<view class="step_up_item_name" :style="`color:${dialogTextColor}`">
|
|
||||||
背景
|
|
||||||
</view>
|
|
||||||
<view :class="[`step_up_item_bg`,novelMainTypeColor == 'F3EFE9' ? 'activeBlack' :'']"
|
|
||||||
style="background:#F3EFE9 ;" @tap="changNovelMainType('F3EFE9')"></view>
|
|
||||||
<view :class="[`step_up_item_bg`,novelMainTypeColor == 'CCD9E2' ? 'activeBlack' :'']"
|
|
||||||
style="background:#CCD9E2 ;" @tap="changNovelMainType('CCD9E2')"></view>
|
|
||||||
<view :class="[`step_up_item_bg`,novelMainTypeColor == '333333' ? 'activeWhite' :'']"
|
|
||||||
@tap="changNovelMainType('333333')">
|
|
||||||
<image class="is_images" :src="setUpModeBlack" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item mt40rpx">
|
|
||||||
<view class="step_up_item_name" :style="`color:${dialogTextColor}`">
|
|
||||||
字号
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`" @tap="reduceCharactersSize">
|
|
||||||
A-</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`" @tap="addCharactersSize">A+
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`" @tap="handelCharactersSize">
|
|
||||||
默认</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view style="height:140rpx" />
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="directoryPopupShow" @close="directoryPopupClose" mode="right" :safeAreaInsetTop="true">
|
|
||||||
<view class="directory_popup_box">
|
|
||||||
<scroll-view scroll-y="true" @scrolltoupper="directoryPopupUpper" @scrolltolower="directoryPopupLower"
|
|
||||||
:style="`height:${directoryPopupHeight}px`" :show-scrollbar="false">
|
|
||||||
<view class="_popup_box_item" v-for="m in myData" :key="m.id">
|
|
||||||
<view :class="['_item_name', readDirectoryActive == m.id? 'active':''] ">
|
|
||||||
{{m.sub}}
|
|
||||||
</view>
|
|
||||||
<view v-if="m.isvip" class="_item_chapter_lock">
|
|
||||||
<image class="is_images" src="/static/images/chapter_lock.png"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
</view>
|
|
||||||
<!--
|
|
||||||
<rich-text id="compute_rich_text" :nodes="computeRichText"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight}`"></rich-text>
|
|
||||||
|
|
||||||
</view> -->
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import setUpReadingColorAll from './setUpReadingColorAll.js';
|
|
||||||
import bookshelf_333 from '/static/images/novelReading/bookshelf_333.png';
|
|
||||||
import directory_333 from '/static/images/novelReading/directory_333.png';
|
|
||||||
import step_up_333 from '/static/images/novelReading/step_up_333.png';
|
|
||||||
import bookshelf_ccd9e2 from '/static/images/novelReading/bookshelf_ccd9e2.png';
|
|
||||||
import step_up_ccd9e2 from '/static/images/novelReading/step_up_ccd9e2.png';
|
|
||||||
import directory_ccd9e2 from '/static/images/novelReading/directory_ccd9e2.png';
|
|
||||||
import bookshelf_f3efe from '/static/images/novelReading/bookshelf_f3efe.png';
|
|
||||||
import directory_f3efe9 from '/static/images/novelReading/directory_f3efe9.png';
|
|
||||||
import step_up_f3efe from '/static/images/novelReading/step_up_f3efe.png';
|
|
||||||
import set_up_mode_black from '/static/images/novelReading/set_up_mode_black.png';
|
|
||||||
import {
|
|
||||||
isGetSystemInfo
|
|
||||||
} from '@/utils/systemInfo.js';
|
|
||||||
import {
|
|
||||||
myGetStorage,
|
|
||||||
mySetStorage
|
|
||||||
} from '@/utils/storage/index.js';
|
|
||||||
import myData from './data.js'
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
novelMainTypeColor: '',
|
|
||||||
navbarTitle: '小说阅读页面',
|
|
||||||
setUpColorAll: {},
|
|
||||||
navigationBarTitleTextColor: '',
|
|
||||||
mainBodyBg: '',
|
|
||||||
navigationBarTitleTextBackColor: '',
|
|
||||||
bodyReadingHeight: 0,
|
|
||||||
scrollReadingHeight: 0,
|
|
||||||
// 内容背景
|
|
||||||
bodyReadingBg: '',
|
|
||||||
// 底部安全区
|
|
||||||
bottomSecureHeight: 0,
|
|
||||||
tabBarPopupShow: false,
|
|
||||||
readingPopupshow: false,
|
|
||||||
stepUpPopupShow: false,
|
|
||||||
directoryPopupShow: false,
|
|
||||||
// bar 的icon
|
|
||||||
barPopupIcon: {},
|
|
||||||
dialogTextColor: '',
|
|
||||||
progressBg: '',
|
|
||||||
progressActiveBg: '',
|
|
||||||
setUpModeBlack: '',
|
|
||||||
dialogATextBg: '',
|
|
||||||
novelContentColor: '',
|
|
||||||
// 目录信息
|
|
||||||
booksDirectorySid: '2387',
|
|
||||||
booksDirectoryPage: 1,
|
|
||||||
newBooksDirectoryPage: [],
|
|
||||||
directoryList: [],
|
|
||||||
directoryPopupHeight: 0,
|
|
||||||
// 小说信息
|
|
||||||
novelReadingContentText: [],
|
|
||||||
defaultCharactersSize: 46,
|
|
||||||
newCharactersSize: 46,
|
|
||||||
defaultCharactersLineHeight: 2,
|
|
||||||
readDirectoryActive: '',
|
|
||||||
myData: [],
|
|
||||||
novelSwiperCurrent: 0,
|
|
||||||
computeRichText: '',
|
|
||||||
isScrollTop: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = this.booksDirectoryPage;
|
|
||||||
const newBooksDirectoryPage = [...this.newBooksDirectoryPage, booksDirectoryPage];
|
|
||||||
this.newBooksDirectoryPage = newBooksDirectoryPage;
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage);
|
|
||||||
this.isGetUserRead()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
isGetUserRead() {
|
|
||||||
this.readDirectoryActive = '1';
|
|
||||||
this.isGetBookInfo()
|
|
||||||
},
|
|
||||||
isGetBookInfo() {
|
|
||||||
const readDirectoryActive = this.readDirectoryActive;
|
|
||||||
const bodyReadingHeight = this.bodyReadingHeight;
|
|
||||||
const novelReadingContentText = this.myData[readDirectoryActive];
|
|
||||||
// this.computeRichText = novelReadingContentText.content
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.paging.complete([novelReadingContentText]);
|
|
||||||
})
|
|
||||||
|
|
||||||
// const query = uni.createSelectorQuery().in(this);
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// query.select(`#compute_rich_text`).boundingClientRect(data => {
|
|
||||||
// console.log(data.height / bodyReadingHeight, "============")
|
|
||||||
// const swiperItemHeightObj = [{
|
|
||||||
// ...novelReadingContentText,
|
|
||||||
// swiperItemHeight: data.height,
|
|
||||||
// swiperItemPage: parseInt(data.height / bodyReadingHeight)
|
|
||||||
// }]
|
|
||||||
// this.novelReadingContentText = [...this.novelReadingContentText, ...
|
|
||||||
// swiperItemHeightObj
|
|
||||||
// ];
|
|
||||||
// console.log(this.novelReadingContentText, "=========")
|
|
||||||
// }).exec()
|
|
||||||
// })
|
|
||||||
//
|
|
||||||
// this.novelReadingContentText = [novelReadingContentText];
|
|
||||||
// this.$nextTick(() => {query.select(`.novelReading_main #richText_${readDirectoryActive}`).boundingClientRect(
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// query.select(`#compute_rich_text`).boundingClientRect(
|
|
||||||
// data => {
|
|
||||||
// // const swiperItemHeightObj = {
|
|
||||||
// // ...this.swiperItemHeightObj,
|
|
||||||
// // id: readDirectoryActive,
|
|
||||||
// // swiperItemHeight: data.height,
|
|
||||||
// // swiperItemPage: data.height / bodyReadingHeight
|
|
||||||
// // }
|
|
||||||
// // this.swiperItemHeightObj = {
|
|
||||||
// // ...swiperItemHeightObj
|
|
||||||
// // };
|
|
||||||
// console.log(data.height, "==========")
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.isScrollTop = parseInt(data.height) - 8632;
|
|
||||||
// // this.isScrollTop = 0;
|
|
||||||
// this.novelReadingContentText = [this.myData[0], ...this
|
|
||||||
// .novelReadingContentText
|
|
||||||
// ];
|
|
||||||
// }, 2000)
|
|
||||||
// }).exec()
|
|
||||||
// })
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.novelReadingContentText = [this.myData[0], ...this.novelReadingContentText];
|
|
||||||
// }, 1000)
|
|
||||||
},
|
|
||||||
onRefresh() {
|
|
||||||
console.log("refresherTouchendrefresherTouchend")
|
|
||||||
this.$refs.paging.complete([this.myData[0]]);
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.novelReadingContentText = [this.myData[0], ...this.novelReadingContentText];
|
|
||||||
// }, 1000)
|
|
||||||
},
|
|
||||||
// scrolltolower() {
|
|
||||||
// console.log("666666666")
|
|
||||||
// this.$refs.paging.complete([this.myData[2]]);
|
|
||||||
// },
|
|
||||||
// charactersUpper() {
|
|
||||||
// console.log("ooooooooooooooo")
|
|
||||||
// },
|
|
||||||
handelShowStepUp() {
|
|
||||||
this.tabBarPopupShow = !this.tabBarPopupShow;
|
|
||||||
this.readingPopupshow = !this.readingPopupshow;
|
|
||||||
this.stepUpPopupShow = false;
|
|
||||||
},
|
|
||||||
handelDirectoryPopup() {
|
|
||||||
this.directoryPopupShow = true;
|
|
||||||
},
|
|
||||||
directoryPopupClose() {
|
|
||||||
this.directoryPopupShow = false;
|
|
||||||
},
|
|
||||||
handelSteUpPopup() {
|
|
||||||
this.stepUpPopupShow = true;
|
|
||||||
},
|
|
||||||
tabBarPopupClose() {
|
|
||||||
this.tabBarPopupShow = false;
|
|
||||||
},
|
|
||||||
changNovelMainType(type) {
|
|
||||||
this.novelMainTypeColor = type;
|
|
||||||
this.initPage(type);
|
|
||||||
mySetStorage('novelMainTypeColor', type);
|
|
||||||
},
|
|
||||||
reduceCharactersSize() {
|
|
||||||
const newCharactersSize = this.newCharactersSize;
|
|
||||||
this.newCharactersSize = newCharactersSize - 2;
|
|
||||||
},
|
|
||||||
addCharactersSize() {
|
|
||||||
const newCharactersSize = this.newCharactersSize;
|
|
||||||
this.newCharactersSize = newCharactersSize + 2;
|
|
||||||
},
|
|
||||||
handelCharactersSize() {
|
|
||||||
const defaultCharactersSize = this.defaultCharactersSize;
|
|
||||||
this.newCharactersSize = defaultCharactersSize;
|
|
||||||
},
|
|
||||||
// 目录划到了最上边
|
|
||||||
directoryPopupUpper() {
|
|
||||||
const isBooksDirectoryPage = this.booksDirectoryPage;
|
|
||||||
const newBooksDirectoryPage = this.newBooksDirectoryPage;
|
|
||||||
if (isBooksDirectoryPage > 1 && newBooksDirectoryPage.indexOf(isBooksDirectoryPage) == -1) {
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = isBooksDirectoryPage - 1;
|
|
||||||
this.booksDirectoryPage = booksDirectoryPage
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage, 'upper')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 目录划到了最下边
|
|
||||||
directoryPopupLower() {
|
|
||||||
const isBooksDirectoryPage = this.booksDirectoryPage
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = isBooksDirectoryPage + 1;
|
|
||||||
const newBooksDirectoryPage = [...this.newBooksDirectoryPage, booksDirectoryPage]
|
|
||||||
this.newBooksDirectoryPage = newBooksDirectoryPage;
|
|
||||||
this.booksDirectoryPage = booksDirectoryPage
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage, 'lower')
|
|
||||||
},
|
|
||||||
isGetDirectory(sid, page, type) {
|
|
||||||
uni.showLoading({
|
|
||||||
title: '加载中...'
|
|
||||||
});
|
|
||||||
const data = {
|
|
||||||
sid,
|
|
||||||
page,
|
|
||||||
// startOrder,
|
|
||||||
}
|
|
||||||
uni.$u.http.post('/getDirectory', data).then((res) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
if (res.status == 1) {
|
|
||||||
const directory = res.data.directory;
|
|
||||||
// const stage = res.data.stage;
|
|
||||||
// const directoryCount = res.data.directory_count;
|
|
||||||
let columnsLabel = ''
|
|
||||||
if (type == 'upper') {
|
|
||||||
this.directoryList = [...directory, ...this.directoryList];
|
|
||||||
} else if (type == 'lower') {
|
|
||||||
this.directoryList = [...this.directoryList, ...directory];
|
|
||||||
} else {
|
|
||||||
this.directoryList = directory;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch((err) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
console.log(err, "========")
|
|
||||||
})
|
|
||||||
},
|
|
||||||
initPage(novelMainTypeColor) {
|
|
||||||
const mainBodyBg = setUpReadingColorAll[novelMainTypeColor].mainBodyBg;
|
|
||||||
this.navigationBarTitleTextColor = setUpReadingColorAll[novelMainTypeColor].navigationBarTitleTextColor;
|
|
||||||
this.mainBodyBg = mainBodyBg;
|
|
||||||
this.bodyReadingBg = mainBodyBg;
|
|
||||||
this.dialogTextColor = setUpReadingColorAll[novelMainTypeColor].dialogTextColor;
|
|
||||||
this.progressBg = setUpReadingColorAll[novelMainTypeColor].progressBg;
|
|
||||||
this.progressActiveBg = setUpReadingColorAll[novelMainTypeColor].progressActiveBg;
|
|
||||||
this.setUpModeBlack = set_up_mode_black;
|
|
||||||
this.dialogATextBg = setUpReadingColorAll[novelMainTypeColor].dialogATextBg;
|
|
||||||
this.tabBarTextColor = setUpReadingColorAll[novelMainTypeColor].tabBarTextColor;
|
|
||||||
this.novelContentColor = setUpReadingColorAll[novelMainTypeColor].novelContentColor;
|
|
||||||
this.navigationBarTitleTextBackColor = setUpReadingColorAll[novelMainTypeColor]
|
|
||||||
.navigationBarTitleTextBackColor;
|
|
||||||
},
|
|
||||||
rightClick() {
|
|
||||||
uni.navigateBack()
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
const novelMainTypeColor = myGetStorage('novelMainTypeColor') || 'F3EFE9';
|
|
||||||
const {
|
|
||||||
screenHeight = 0, statusBarHeight = 0, windowHeight = 0,
|
|
||||||
devicePixelRatio, windowBottom
|
|
||||||
} = isGetSystemInfo();
|
|
||||||
console.log(isGetSystemInfo(), "-----------");
|
|
||||||
console.log(myData, "myDatamyData")
|
|
||||||
this.myData = myData;
|
|
||||||
this.novelMainTypeColor = novelMainTypeColor;
|
|
||||||
this.bodyReadingHeight = screenHeight - statusBarHeight - devicePixelRatio * 22;
|
|
||||||
this.scrollReadingHeight = screenHeight - statusBarHeight - devicePixelRatio * 38;
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
this.directoryPopupHeight = screenHeight - statusBarHeight;
|
|
||||||
// #endif
|
|
||||||
// #ifdef H5 || MP-WEIXIN
|
|
||||||
this.directoryPopupHeight = screenHeight - statusBarHeight - devicePixelRatio * 22;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
this.bottomSecureHeight = screenHeight - windowHeight;
|
|
||||||
this.setUpColorAll = setUpReadingColorAll;
|
|
||||||
this.barPopupIcon = {
|
|
||||||
'F3EFE9': {
|
|
||||||
bookshelf_icon: bookshelf_f3efe,
|
|
||||||
directory_icon: directory_f3efe9,
|
|
||||||
step_up_icon: step_up_f3efe,
|
|
||||||
},
|
|
||||||
'CCD9E2': {
|
|
||||||
bookshelf_icon: bookshelf_ccd9e2,
|
|
||||||
directory_icon: directory_ccd9e2,
|
|
||||||
step_up_icon: step_up_ccd9e2,
|
|
||||||
},
|
|
||||||
'333333': {
|
|
||||||
bookshelf_icon: bookshelf_333,
|
|
||||||
directory_icon: directory_333,
|
|
||||||
step_up_icon: step_up_333
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.initPage(novelMainTypeColor);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
page {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.is_images {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mt40rpx {
|
|
||||||
margin-top: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep.u-navbar__content__title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep.u-navbar--fixed {
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content::v-deep.z-paging-content {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#compute_rich_text {
|
|
||||||
position: fixed;
|
|
||||||
top: 1500px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content {
|
|
||||||
// display: flex;
|
|
||||||
// flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
// overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.novelReading_body {
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
// height: 100%;
|
|
||||||
|
|
||||||
|
|
||||||
.novelReading_main_swiper {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.swiper_item_con {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_main {
|
|
||||||
width: 100%;
|
|
||||||
padding: 32rpx 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.novelReading_characters_scroll {
|
|
||||||
width: 100%;
|
|
||||||
// padding: 32rpx 32rpx;
|
|
||||||
// box-sizing: border-box;
|
|
||||||
|
|
||||||
.novelReading_characters_main {
|
|
||||||
width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.my_tabBar_Reading {
|
|
||||||
width: 100%;
|
|
||||||
height: 140rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 24rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-top: 1rpx solid #d6d2ce;
|
|
||||||
|
|
||||||
.tabBar_Reading_item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
|
|
||||||
.reading_item_icon {
|
|
||||||
width: 34rpx;
|
|
||||||
height: 34rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_item_name {
|
|
||||||
font-size: 30rpx;
|
|
||||||
line-height: 1;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_box {
|
|
||||||
width: 100%;
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
|
|
||||||
.reading_schedule_body {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
padding: 40rpx 24rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: transparent;
|
|
||||||
|
|
||||||
.schedule_body_text {
|
|
||||||
font-size: 34rpx;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_slider {
|
|
||||||
width: 430rpx;
|
|
||||||
// height: 60rpx;
|
|
||||||
|
|
||||||
.slider {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_box {
|
|
||||||
width: 100%;
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
|
|
||||||
.step_up_box_body {
|
|
||||||
width: 100%;
|
|
||||||
padding: 40rpx 24rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: transparent;
|
|
||||||
|
|
||||||
.step_up_item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.step_up_item_name {
|
|
||||||
line-height: 1;
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 188rpx;
|
|
||||||
height: 74rpx;
|
|
||||||
border-radius: 37rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border: 2rpx solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_text_bg {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 188rpx;
|
|
||||||
height: 74rpx;
|
|
||||||
border-radius: 37rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg.activeBlack {
|
|
||||||
border-color: #1A1A1A;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg.activeWhite {
|
|
||||||
border-color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_slider::v-deep.uni-slider-handle-wrapper {
|
|
||||||
height: 60rpx;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
|
|
||||||
.uni-slider-track {
|
|
||||||
border-radius: 30rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.directory_popup_box {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-end;
|
|
||||||
width: 560rpx;
|
|
||||||
height: 100%;
|
|
||||||
padding: 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
._popup_box_item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 120rpx;
|
|
||||||
border-bottom: 1rpx solid #F2F2F2;
|
|
||||||
|
|
||||||
._item_name {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
._item_name.active {
|
|
||||||
color: #FF728F;
|
|
||||||
}
|
|
||||||
|
|
||||||
._item_chapter_lock {
|
|
||||||
width: 32rpx;
|
|
||||||
height: 32rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,752 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="novelReading_content">
|
|
||||||
<u-navbar :title="navbarTitle" @rightClick="rightClick" :autoBack="true" :fixed="true" :bgColor="mainBodyBg"
|
|
||||||
:titleStyle="{'color':navigationBarTitleTextColor,}" :leftIconColor="navigationBarTitleTextBackColor"
|
|
||||||
:shadow="true" :safeAreaInsetTop="true" :placeholder="true" />
|
|
||||||
<view class="novelReading_body" :style="`background:${bodyReadingBg}`" @tap="handelShowStepUp">
|
|
||||||
<!-- :style="`height:${bodyReadingHeight}px;`" -->
|
|
||||||
<!-- :refresher-enabled="true" :refresher-triggered="refresherTriggered" @refresherrefresh="refresherrefresh" :scroll-top="isScrollTop" -->
|
|
||||||
<view class="novelReading_main" :style="`height:${bodyReadingHeight}px;`">
|
|
||||||
<!-- :scroll-top="isScrollTop" :scroll-into-view="`richText_${readDirectoryActive}`" @scrolltoupper="charactersToupper"-->
|
|
||||||
<scroll-view scroll-y="true" :scroll-top="isScrollTop" @scrolltolower="charactersLower"
|
|
||||||
:refresher-enabled="true" @scroll="charactersScroll" :style="`height:${bodyReadingHeight}px;`"
|
|
||||||
@refresherrefresh="refresherrefresh" class="novelReading_characters_scroll" upper-threshold="200"
|
|
||||||
lower-threshold="200" :refresher-triggered="refresherTriggered">
|
|
||||||
<!-- transform:translateY(-${isScrollTop}px) -->
|
|
||||||
<view class="novelReading_characters_main"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight};`"
|
|
||||||
v-for="m in novelReadingContentText" :key="m.id">
|
|
||||||
<rich-text :nodes="m.content" :ref="`richText_${m.id}`"></rich-text>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
<!--<view class="novelReading_main" > <view class="novelReading_characters_main"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight}`"
|
|
||||||
v-for="m in novelReadingContentText" :key="m.id" :id="`richText_${m.id}`">
|
|
||||||
<rich-text :nodes="m.content" :ref="`richText_${m.id}`"></rich-text>
|
|
||||||
</view> </view> -->
|
|
||||||
<!-- <view class="novelReading_main" :style="`height:${bodyReadingHeight}px;`">
|
|
||||||
<swiper class="novelReading_main_swiper" :indicator-dots="false" :duration="300"
|
|
||||||
:current="novelSwiperCurrent">
|
|
||||||
<template v-for="m in novelReadingContentText">
|
|
||||||
<swiper-item v-for="(s,idx) in m.swiperItemPage" :key="idx" :id="`richText_${m.id}`">
|
|
||||||
<view class="swiper_item_con" :id="`richText_${m.id}`"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight};transform:translateY(-${idx*bodyReadingHeight}px)`">
|
|
||||||
<rich-text :nodes="m.content"></rich-text>
|
|
||||||
</view>
|
|
||||||
</swiper-item>
|
|
||||||
</template>
|
|
||||||
</swiper>
|
|
||||||
</view> -->
|
|
||||||
<view id="compute_rich_text">
|
|
||||||
<rich-text :nodes="computeRichText"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight}`"></rich-text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<u-popup :show="tabBarPopupShow" mode="bottom" :overlay="false" zIndex="6">
|
|
||||||
<view class="my_tabBar_Reading" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view class="tabBar_Reading_item">
|
|
||||||
<view class="reading_item_icon" @tap="handelDirectoryPopup">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].directory_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">目录</view>
|
|
||||||
</view>
|
|
||||||
<view class="tabBar_Reading_item">
|
|
||||||
<view class="reading_item_icon">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].bookshelf_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">书城</view>
|
|
||||||
</view>
|
|
||||||
<view class="tabBar_Reading_item" @tap="handelSteUpPopup">
|
|
||||||
<view class="reading_item_icon">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].step_up_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">设置</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="readingPopupshow" mode="bottom" :overlay="false" zIndex="4" bgColor="transparent">
|
|
||||||
<view class="reading_schedule_box" :style="`background:${bodyReadingBg}`">
|
|
||||||
<!-- <view class="reading_schedule_body">
|
|
||||||
<view class="schedule_body_text" :style="`color:${dialogTextColor}`">上一章</view>
|
|
||||||
<view class="reading_schedule_slider">
|
|
||||||
<slider class="slider" :max="100" :min="0" :block-size="30" :activeColor="progressActiveBg"
|
|
||||||
:backgroundColor="progressBg" :value="sliderValue" @change="sliderChange" />
|
|
||||||
</view>
|
|
||||||
<view class="schedule_body_text" :style="`color:${dialogTextColor}`">下一章</view>
|
|
||||||
</view> -->
|
|
||||||
<view style="height:140rpx" />
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="stepUpPopupShow" mode="bottom" :overlay="false" bgColor="transparent" zIndex="5">
|
|
||||||
<view class="step_up_box" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view class="step_up_box_body">
|
|
||||||
<view class="step_up_item">
|
|
||||||
<view class="step_up_item_name" :style="`color:${dialogTextColor}`">
|
|
||||||
背景
|
|
||||||
</view>
|
|
||||||
<view :class="[`step_up_item_bg`,novelMainTypeColor == 'F3EFE9' ? 'activeBlack' :'']"
|
|
||||||
style="background:#F3EFE9 ;" @tap="changNovelMainType('F3EFE9')"></view>
|
|
||||||
<view :class="[`step_up_item_bg`,novelMainTypeColor == 'CCD9E2' ? 'activeBlack' :'']"
|
|
||||||
style="background:#CCD9E2 ;" @tap="changNovelMainType('CCD9E2')"></view>
|
|
||||||
<view :class="[`step_up_item_bg`,novelMainTypeColor == '333333' ? 'activeWhite' :'']"
|
|
||||||
@tap="changNovelMainType('333333')">
|
|
||||||
<image class="is_images" :src="setUpModeBlack" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item mt40rpx">
|
|
||||||
<view class="step_up_item_name" :style="`color:${dialogTextColor}`">
|
|
||||||
字号
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`" @tap="reduceCharactersSize">
|
|
||||||
A-</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`" @tap="addCharactersSize">A+
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`" @tap="handelCharactersSize">
|
|
||||||
默认</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view style="height:140rpx" />
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="directoryPopupShow" @close="directoryPopupClose" mode="right" :safeAreaInsetTop="true">
|
|
||||||
<view class="directory_popup_box">
|
|
||||||
<scroll-view scroll-y="true" @scrolltoupper="directoryPopupUpper" @scrolltolower="directoryPopupLower"
|
|
||||||
:style="`height:${directoryPopupHeight}px`" :show-scrollbar="false">
|
|
||||||
<!-- <view class="_popup_box_item" v-for="m in directoryList" :key="m.id">
|
|
||||||
<view class="_item_name">
|
|
||||||
{{m.chaptername}}
|
|
||||||
</view>
|
|
||||||
<view v-if="m.isvip" class="_item_chapter_lock">
|
|
||||||
<image class="is_images" src="/static/images/chapter_lock.png"></image>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<view class="_popup_box_item" v-for="m in myData" :key="m.id">
|
|
||||||
<view :class="['_item_name', readDirectoryActive == m.id? 'active':''] ">
|
|
||||||
{{m.sub}}
|
|
||||||
</view>
|
|
||||||
<view v-if="m.isvip" class="_item_chapter_lock">
|
|
||||||
<image class="is_images" src="/static/images/chapter_lock.png"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import setUpReadingColorAll from './setUpReadingColorAll.js';
|
|
||||||
import bookshelf_333 from '/static/images/novelReading/bookshelf_333.png';
|
|
||||||
import directory_333 from '/static/images/novelReading/directory_333.png';
|
|
||||||
import step_up_333 from '/static/images/novelReading/step_up_333.png';
|
|
||||||
import bookshelf_ccd9e2 from '/static/images/novelReading/bookshelf_ccd9e2.png';
|
|
||||||
import step_up_ccd9e2 from '/static/images/novelReading/step_up_ccd9e2.png';
|
|
||||||
import directory_ccd9e2 from '/static/images/novelReading/directory_ccd9e2.png';
|
|
||||||
import bookshelf_f3efe from '/static/images/novelReading/bookshelf_f3efe.png';
|
|
||||||
import directory_f3efe9 from '/static/images/novelReading/directory_f3efe9.png';
|
|
||||||
import step_up_f3efe from '/static/images/novelReading/step_up_f3efe.png';
|
|
||||||
import set_up_mode_black from '/static/images/novelReading/set_up_mode_black.png';
|
|
||||||
import {
|
|
||||||
isGetSystemInfo
|
|
||||||
} from '@/utils/systemInfo.js';
|
|
||||||
import {
|
|
||||||
myGetStorage,
|
|
||||||
mySetStorage
|
|
||||||
} from '@/utils/storage/index.js';
|
|
||||||
import myData from './data.js'
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
novelMainTypeColor: '',
|
|
||||||
navbarTitle: '小说阅读页面',
|
|
||||||
setUpColorAll: {},
|
|
||||||
navigationBarTitleTextColor: '',
|
|
||||||
mainBodyBg: '',
|
|
||||||
navigationBarTitleTextBackColor: '',
|
|
||||||
bodyReadingHeight: 0,
|
|
||||||
scrollReadingHeight: 0,
|
|
||||||
// 内容背景
|
|
||||||
bodyReadingBg: '',
|
|
||||||
// 底部安全区
|
|
||||||
bottomSecureHeight: 0,
|
|
||||||
tabBarPopupShow: false,
|
|
||||||
readingPopupshow: false,
|
|
||||||
stepUpPopupShow: false,
|
|
||||||
directoryPopupShow: false,
|
|
||||||
// bar 的icon
|
|
||||||
barPopupIcon: {},
|
|
||||||
dialogTextColor: '',
|
|
||||||
progressBg: '',
|
|
||||||
progressActiveBg: '',
|
|
||||||
setUpModeBlack: '',
|
|
||||||
dialogATextBg: '',
|
|
||||||
novelContentColor: '',
|
|
||||||
// 目录信息
|
|
||||||
booksDirectorySid: '2387',
|
|
||||||
booksDirectoryPage: 1,
|
|
||||||
newBooksDirectoryPage: [],
|
|
||||||
directoryList: [],
|
|
||||||
directoryPopupHeight: 0,
|
|
||||||
// 小说信息
|
|
||||||
novelReadingContentText: [],
|
|
||||||
defaultCharactersSize: 46,
|
|
||||||
newCharactersSize: 46,
|
|
||||||
defaultCharactersLineHeight: 2,
|
|
||||||
readDirectoryActive: '',
|
|
||||||
myData: [],
|
|
||||||
novelSwiperCurrent: 0,
|
|
||||||
computeRichText: '',
|
|
||||||
isScrollTop: 0,
|
|
||||||
refresherTriggered: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = this.booksDirectoryPage;
|
|
||||||
const newBooksDirectoryPage = [...this.newBooksDirectoryPage, booksDirectoryPage];
|
|
||||||
this.newBooksDirectoryPage = newBooksDirectoryPage;
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage);
|
|
||||||
this.isGetUserRead()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
isGetUserRead() {
|
|
||||||
this.readDirectoryActive = '3';
|
|
||||||
this.isGetBookInfo()
|
|
||||||
},
|
|
||||||
isGetBookInfo() {
|
|
||||||
const readDirectoryActive = this.readDirectoryActive;
|
|
||||||
const bodyReadingHeight = this.bodyReadingHeight;
|
|
||||||
const novelReadingContentText = this.myData[readDirectoryActive];
|
|
||||||
// console.log(data.height / bodyReadingHeight, "============")
|
|
||||||
// const swiperItemHeightObj = [{
|
|
||||||
// ...novelReadingContentText,
|
|
||||||
// swiperItemHeight: data.height,
|
|
||||||
// swiperItemPage: parseInt(data.height / bodyReadingHeight)
|
|
||||||
// }]
|
|
||||||
// this.novelReadingContentText = [...this.novelReadingContentText, ...
|
|
||||||
// swiperItemHeightObj
|
|
||||||
// ];
|
|
||||||
// this.novelReadingContentText = [this.myData[0],novelReadingContentText];
|
|
||||||
// console.log(this.novelReadingContentText,",,,,,,,,,,,,,,,,,,,")
|
|
||||||
// // this.novelReadingContentText = [this.myData[0], ...this
|
|
||||||
// // .novelReadingContentText
|
|
||||||
// // ];
|
|
||||||
// // setTimeout(() => {
|
|
||||||
// this.computeRichText = this.myData[2].content;
|
|
||||||
// const query = uni.createSelectorQuery().in(this);
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// query.select(`#compute_rich_text`).boundingClientRect(data => {
|
|
||||||
// console.log(data,"===========")
|
|
||||||
// this.isScrollTop = parseInt(data.height) + bodyReadingHeight;
|
|
||||||
// // this.isScrollTop = 0;
|
|
||||||
// }).exec()
|
|
||||||
// })
|
|
||||||
// }, 2000)
|
|
||||||
// this.isScrollTop = parseInt(data.height) - 8632;
|
|
||||||
console.log(this.novelReadingContentText, "=========")
|
|
||||||
|
|
||||||
//
|
|
||||||
this.novelReadingContentText = [novelReadingContentText];
|
|
||||||
// this.$nextTick(() => {query.select(`.novelReading_main #richText_${readDirectoryActive}`).boundingClientRect(
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// query.select(`#compute_rich_text`).boundingClientRect(
|
|
||||||
// data => {
|
|
||||||
// // const swiperItemHeightObj = {
|
|
||||||
// // ...this.swiperItemHeightObj,
|
|
||||||
// // id: readDirectoryActive,
|
|
||||||
// // swiperItemHeight: data.height,
|
|
||||||
// // swiperItemPage: data.height / bodyReadingHeight
|
|
||||||
// // }
|
|
||||||
// // this.swiperItemHeightObj = {
|
|
||||||
// // ...swiperItemHeightObj
|
|
||||||
// // };
|
|
||||||
// console.log(data.height, "==========")
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.isScrollTop = parseInt(data.height) - 8632;
|
|
||||||
// // this.isScrollTop = 0;
|
|
||||||
// this.novelReadingContentText = [this.myData[0], ...this
|
|
||||||
// .novelReadingContentText
|
|
||||||
// ];
|
|
||||||
// }, 2000)
|
|
||||||
// }).exec()
|
|
||||||
// })
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.novelReadingContentText = [this.myData[0], ...this.novelReadingContentText];
|
|
||||||
// }, 1000)
|
|
||||||
},
|
|
||||||
charactersToupper() {
|
|
||||||
console.log("ooooooooooooooo")
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.novelReadingContentText = [this.myData[0], ...this.novelReadingContentText];
|
|
||||||
// this.refresherTriggered= false
|
|
||||||
// }, 1000)
|
|
||||||
// const bodyReadingHeight = this.bodyReadingHeight;
|
|
||||||
// const readDirectoryActive = parseInt(this.readDirectoryActive) - 1;
|
|
||||||
// const isScrollTop = this.isScrollTop;
|
|
||||||
// console.log(readDirectoryActive, this.myData, "6666666666666")
|
|
||||||
// const novelReadingContentText = this.myData[readDirectoryActive];
|
|
||||||
// this.readDirectoryActive = readDirectoryActive;
|
|
||||||
// this.novelReadingContentText = [...this.novelReadingContentText, novelReadingContentText];
|
|
||||||
// this.computeRichText = this.myData[readDirectoryActive].content;
|
|
||||||
// const query = uni.createSelectorQuery().in(this);
|
|
||||||
// // this.$nextTick(() => {
|
|
||||||
// query.select(`#compute_rich_text`).boundingClientRect(data => {
|
|
||||||
// console.log(data, "===========")
|
|
||||||
// this.isScrollTop = parseInt(data.height) + bodyReadingHeight + isScrollTop;
|
|
||||||
// // this.isScrollTop = 0;
|
|
||||||
// }).exec()
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
refresherrefresh() {
|
|
||||||
// console.log("ooooooooooooooo")
|
|
||||||
const readDirectoryActive = parseInt(this.readDirectoryActive) - 1;
|
|
||||||
const bodyReadingHeight = this.bodyReadingHeight;
|
|
||||||
const novelReadingContentText = this.myData[readDirectoryActive];
|
|
||||||
|
|
||||||
this.novelReadingContentText = [novelReadingContentText, ...this.novelReadingContentText];
|
|
||||||
console.log(this.novelReadingContentText, ",,,,,,,,,,,,,,,,,,,")
|
|
||||||
this.refresherTriggered = true;
|
|
||||||
// this.novelReadingContentText = [this.myData[0], ...this
|
|
||||||
// .novelReadingContentText
|
|
||||||
// ];
|
|
||||||
// setTimeout(() => {
|
|
||||||
this.computeRichText = this.myData[readDirectoryActive].content;
|
|
||||||
this.readDirectoryActive = readDirectoryActive;
|
|
||||||
const query = uni.createSelectorQuery().in(this);
|
|
||||||
this.$nextTick(() => {
|
|
||||||
query.select(`#compute_rich_text`).boundingClientRect(data => {
|
|
||||||
console.log(data, "===========")
|
|
||||||
this.isScrollTop = parseInt(data.height) + bodyReadingHeight;
|
|
||||||
// this.isScrollTop = 0;
|
|
||||||
}).exec()
|
|
||||||
})
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
this.refresherTriggered = false;
|
|
||||||
}, 3000)
|
|
||||||
},
|
|
||||||
charactersLower() {
|
|
||||||
console.log("6666666666666")
|
|
||||||
const readDirectoryActive = parseInt(this.readDirectoryActive) + 1;
|
|
||||||
console.log(readDirectoryActive, this.myData, "6666666666666")
|
|
||||||
const novelReadingContentText = this.myData[readDirectoryActive];
|
|
||||||
this.readDirectoryActive = readDirectoryActive;
|
|
||||||
this.novelReadingContentText = [...this.novelReadingContentText, novelReadingContentText];
|
|
||||||
},
|
|
||||||
charactersScroll(e) {
|
|
||||||
console.log(e, "ee")
|
|
||||||
this.scrollTop = e.detail.scrollTop
|
|
||||||
// const readDirectoryActive = this.readDirectoryActive;
|
|
||||||
},
|
|
||||||
handelShowStepUp() {
|
|
||||||
this.tabBarPopupShow = !this.tabBarPopupShow;
|
|
||||||
this.readingPopupshow = !this.readingPopupshow;
|
|
||||||
this.stepUpPopupShow = false;
|
|
||||||
},
|
|
||||||
handelDirectoryPopup() {
|
|
||||||
this.directoryPopupShow = true;
|
|
||||||
},
|
|
||||||
directoryPopupClose() {
|
|
||||||
this.directoryPopupShow = false;
|
|
||||||
},
|
|
||||||
handelSteUpPopup() {
|
|
||||||
this.stepUpPopupShow = true;
|
|
||||||
},
|
|
||||||
tabBarPopupClose() {
|
|
||||||
this.tabBarPopupShow = false;
|
|
||||||
},
|
|
||||||
changNovelMainType(type) {
|
|
||||||
this.novelMainTypeColor = type;
|
|
||||||
this.initPage(type);
|
|
||||||
mySetStorage('novelMainTypeColor', type);
|
|
||||||
},
|
|
||||||
reduceCharactersSize() {
|
|
||||||
const newCharactersSize = this.newCharactersSize;
|
|
||||||
this.newCharactersSize = newCharactersSize - 2;
|
|
||||||
},
|
|
||||||
addCharactersSize() {
|
|
||||||
const newCharactersSize = this.newCharactersSize;
|
|
||||||
this.newCharactersSize = newCharactersSize + 2;
|
|
||||||
},
|
|
||||||
handelCharactersSize() {
|
|
||||||
const defaultCharactersSize = this.defaultCharactersSize;
|
|
||||||
this.newCharactersSize = defaultCharactersSize;
|
|
||||||
},
|
|
||||||
// 目录划到了最上边
|
|
||||||
directoryPopupUpper() {
|
|
||||||
const isBooksDirectoryPage = this.booksDirectoryPage;
|
|
||||||
const newBooksDirectoryPage = this.newBooksDirectoryPage;
|
|
||||||
if (isBooksDirectoryPage > 1 && newBooksDirectoryPage.indexOf(isBooksDirectoryPage) == -1) {
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = isBooksDirectoryPage - 1;
|
|
||||||
this.booksDirectoryPage = booksDirectoryPage
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage, 'upper')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 目录划到了最下边
|
|
||||||
directoryPopupLower() {
|
|
||||||
const isBooksDirectoryPage = this.booksDirectoryPage
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = isBooksDirectoryPage + 1;
|
|
||||||
const newBooksDirectoryPage = [...this.newBooksDirectoryPage, booksDirectoryPage]
|
|
||||||
this.newBooksDirectoryPage = newBooksDirectoryPage;
|
|
||||||
this.booksDirectoryPage = booksDirectoryPage
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage, 'lower')
|
|
||||||
},
|
|
||||||
isGetDirectory(sid, page, type) {
|
|
||||||
uni.showLoading({
|
|
||||||
title: '加载中...'
|
|
||||||
});
|
|
||||||
const data = {
|
|
||||||
sid,
|
|
||||||
page,
|
|
||||||
// startOrder,
|
|
||||||
}
|
|
||||||
uni.$u.http.post('/getDirectory', data).then((res) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
if (res.status == 1) {
|
|
||||||
const directory = res.data.directory;
|
|
||||||
// const stage = res.data.stage;
|
|
||||||
// const directoryCount = res.data.directory_count;
|
|
||||||
let columnsLabel = ''
|
|
||||||
if (type == 'upper') {
|
|
||||||
this.directoryList = [...directory, ...this.directoryList];
|
|
||||||
} else if (type == 'lower') {
|
|
||||||
this.directoryList = [...this.directoryList, ...directory];
|
|
||||||
} else {
|
|
||||||
this.directoryList = directory;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch((err) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
console.log(err, "========")
|
|
||||||
})
|
|
||||||
},
|
|
||||||
initPage(novelMainTypeColor) {
|
|
||||||
const mainBodyBg = setUpReadingColorAll[novelMainTypeColor].mainBodyBg;
|
|
||||||
this.navigationBarTitleTextColor = setUpReadingColorAll[novelMainTypeColor].navigationBarTitleTextColor;
|
|
||||||
this.mainBodyBg = mainBodyBg;
|
|
||||||
this.bodyReadingBg = mainBodyBg;
|
|
||||||
this.dialogTextColor = setUpReadingColorAll[novelMainTypeColor].dialogTextColor;
|
|
||||||
this.progressBg = setUpReadingColorAll[novelMainTypeColor].progressBg;
|
|
||||||
this.progressActiveBg = setUpReadingColorAll[novelMainTypeColor].progressActiveBg;
|
|
||||||
this.setUpModeBlack = set_up_mode_black;
|
|
||||||
this.dialogATextBg = setUpReadingColorAll[novelMainTypeColor].dialogATextBg;
|
|
||||||
this.tabBarTextColor = setUpReadingColorAll[novelMainTypeColor].tabBarTextColor;
|
|
||||||
this.novelContentColor = setUpReadingColorAll[novelMainTypeColor].novelContentColor;
|
|
||||||
this.navigationBarTitleTextBackColor = setUpReadingColorAll[novelMainTypeColor]
|
|
||||||
.navigationBarTitleTextBackColor;
|
|
||||||
},
|
|
||||||
rightClick() {
|
|
||||||
uni.navigateBack()
|
|
||||||
},
|
|
||||||
},
|
|
||||||
onPullDownRefresh() {
|
|
||||||
// const readDirectoryActive = this.readDirectoryActive - 1;
|
|
||||||
// const bodyReadingHeight = this.bodyReadingHeight;
|
|
||||||
// const novelReadingContentText = this.myData[readDirectoryActive];
|
|
||||||
// this.novelReadingContentText = [novelReadingContentText, ...this.novelReadingContentText];
|
|
||||||
// uni.stopPullDownRefresh();
|
|
||||||
// console.log(this.novelReadingContentText, ",,,,,,,,,,,,,,,,,,,")
|
|
||||||
// // this.novelReadingContentText = [this.myData[0], ...this
|
|
||||||
// // .novelReadingContentText
|
|
||||||
// // ];
|
|
||||||
// // setTimeout(() => {
|
|
||||||
// this.computeRichText = this.myData[readDirectoryActive].content;
|
|
||||||
// const query = uni.createSelectorQuery().in(this);
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// query.select(`#compute_rich_text`).boundingClientRect(data => {
|
|
||||||
// console.log(data, "===========")
|
|
||||||
// this.isScrollTop = parseInt(data.height) + bodyReadingHeight;
|
|
||||||
// // this.isScrollTop = 0;
|
|
||||||
// }).exec()
|
|
||||||
// })
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.novelReadingContentText = [this.myData[0], ...this.novelReadingContentText];
|
|
||||||
// this.refresherTriggered = false
|
|
||||||
// }, 1000)
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
const novelMainTypeColor = myGetStorage('novelMainTypeColor') || 'F3EFE9';
|
|
||||||
const {
|
|
||||||
screenHeight = 0, statusBarHeight = 0, windowHeight = 0,
|
|
||||||
devicePixelRatio, windowBottom
|
|
||||||
} = isGetSystemInfo();
|
|
||||||
console.log(isGetSystemInfo(), "-----------");
|
|
||||||
console.log(myData, "myDatamyData")
|
|
||||||
this.myData = myData;
|
|
||||||
this.novelMainTypeColor = novelMainTypeColor;
|
|
||||||
this.bodyReadingHeight = screenHeight - statusBarHeight - devicePixelRatio * 22;
|
|
||||||
this.scrollReadingHeight = screenHeight - statusBarHeight - devicePixelRatio * 38;
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
this.directoryPopupHeight = screenHeight - statusBarHeight;
|
|
||||||
// #endif
|
|
||||||
// #ifdef H5 || MP-WEIXIN
|
|
||||||
this.directoryPopupHeight = screenHeight - statusBarHeight - devicePixelRatio * 22;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
this.bottomSecureHeight = screenHeight - windowHeight;
|
|
||||||
this.setUpColorAll = setUpReadingColorAll;
|
|
||||||
this.barPopupIcon = {
|
|
||||||
'F3EFE9': {
|
|
||||||
bookshelf_icon: bookshelf_f3efe,
|
|
||||||
directory_icon: directory_f3efe9,
|
|
||||||
step_up_icon: step_up_f3efe,
|
|
||||||
},
|
|
||||||
'CCD9E2': {
|
|
||||||
bookshelf_icon: bookshelf_ccd9e2,
|
|
||||||
directory_icon: directory_ccd9e2,
|
|
||||||
step_up_icon: step_up_ccd9e2,
|
|
||||||
},
|
|
||||||
'333333': {
|
|
||||||
bookshelf_icon: bookshelf_333,
|
|
||||||
directory_icon: directory_333,
|
|
||||||
step_up_icon: step_up_333
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.initPage(novelMainTypeColor);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
page {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.is_images {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mt40rpx {
|
|
||||||
margin-top: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content::v-deep.u-navbar__content__title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content::v-deep.u-navbar--fixed {
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content::v-deep.z-paging-content {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#compute_rich_text {
|
|
||||||
position: fixed;
|
|
||||||
top: 1500px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content {
|
|
||||||
// display: flex;
|
|
||||||
// flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
// overflow: hidden;
|
|
||||||
|
|
||||||
.novelReading_body {
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
// height: 100%;
|
|
||||||
|
|
||||||
|
|
||||||
.novelReading_main_swiper {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.swiper_item_con {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_main {
|
|
||||||
width: 100%;
|
|
||||||
padding: 32rpx 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.novelReading_characters_scroll {
|
|
||||||
width: 100%;
|
|
||||||
// padding: 32rpx 32rpx;
|
|
||||||
// box-sizing: border-box;
|
|
||||||
|
|
||||||
.novelReading_characters_main {
|
|
||||||
width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.my_tabBar_Reading {
|
|
||||||
width: 100%;
|
|
||||||
height: 140rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 24rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-top: 1rpx solid #d6d2ce;
|
|
||||||
|
|
||||||
.tabBar_Reading_item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
|
|
||||||
.reading_item_icon {
|
|
||||||
width: 34rpx;
|
|
||||||
height: 34rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_item_name {
|
|
||||||
font-size: 30rpx;
|
|
||||||
line-height: 1;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_box {
|
|
||||||
width: 100%;
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
|
|
||||||
.reading_schedule_body {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
padding: 40rpx 24rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: transparent;
|
|
||||||
|
|
||||||
.schedule_body_text {
|
|
||||||
font-size: 34rpx;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_slider {
|
|
||||||
width: 430rpx;
|
|
||||||
// height: 60rpx;
|
|
||||||
|
|
||||||
.slider {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_box {
|
|
||||||
width: 100%;
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
|
|
||||||
.step_up_box_body {
|
|
||||||
width: 100%;
|
|
||||||
padding: 40rpx 24rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: transparent;
|
|
||||||
|
|
||||||
.step_up_item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.step_up_item_name {
|
|
||||||
line-height: 1;
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 188rpx;
|
|
||||||
height: 74rpx;
|
|
||||||
border-radius: 37rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border: 2rpx solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_text_bg {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 188rpx;
|
|
||||||
height: 74rpx;
|
|
||||||
border-radius: 37rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg.activeBlack {
|
|
||||||
border-color: #1A1A1A;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg.activeWhite {
|
|
||||||
border-color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_slider::v-deep.uni-slider-handle-wrapper {
|
|
||||||
height: 60rpx;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
|
|
||||||
.uni-slider-track {
|
|
||||||
border-radius: 30rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.directory_popup_box {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-end;
|
|
||||||
width: 560rpx;
|
|
||||||
height: 100%;
|
|
||||||
padding: 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
._popup_box_item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 120rpx;
|
|
||||||
border-bottom: 1rpx solid #F2F2F2;
|
|
||||||
|
|
||||||
._item_name {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
._item_name.active {
|
|
||||||
color: #FF728F;
|
|
||||||
}
|
|
||||||
|
|
||||||
._item_chapter_lock {
|
|
||||||
width: 32rpx;
|
|
||||||
height: 32rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,980 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="novelReading_content">
|
|
||||||
<u-navbar :title="navbarTitle" @rightClick="rightClick" :autoBack="true" :fixed="true" :bgColor="mainBodyBg"
|
|
||||||
:titleStyle="{ color: navigationBarTitleTextColor }" :leftIconColor="navigationBarTitleTextBackColor"
|
|
||||||
:shadow="true" :safeAreaInsetTop="true" :placeholder="true" />
|
|
||||||
<view class="novelReading_body" :style="`background:${bodyReadingBg}`" @tap="handelShowStepUp">
|
|
||||||
<view class="novelReading_main_con">
|
|
||||||
<!-- :style="`height:${bodyReadingHeight}px;`" -->
|
|
||||||
<!-- :refresher-enabled="true" upper-threshold="200" @refresherrefresh="refresherrefresh" :scroll-top="isScrollTop" -->
|
|
||||||
<view class="novelReading_main">
|
|
||||||
<!-- @refresherpulling="refresherpulling" -->
|
|
||||||
<!-- :scroll-top="isScrollTop" :scroll-into-view="`richText_${readDirectoryActive}`" @scrolltoupper="charactersToupper"-->
|
|
||||||
<scroll-view scroll-y="true" :scroll-top="isScrollTop" @scrolltolower="charactersLower"
|
|
||||||
:refresher-enabled="true" @scroll="charactersScroll" @refresherrefresh="refresherrefresh"
|
|
||||||
class="novelReading_characters_scroll" lower-threshold="10"
|
|
||||||
:refresher-triggered="refresherTriggered">
|
|
||||||
<view class="novelReading_characters_main"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight};`"
|
|
||||||
v-for="m in novelReadingContentText" :key="m.id" :data-chapterorder="m.chapterorder"
|
|
||||||
:data-lastid="m.lastid" :data-nextid="m.nextid">
|
|
||||||
<!-- <rich-text :nodes="m.content" :ref="`richText_${m.id}`"></rich-text> -->
|
|
||||||
<!-- <rich-text :nodes="`<h3>${m.chaptername}</h3></br>${m.novel_content}`"
|
|
||||||
:ref="`richText_${m.id}`"></rich-text> -->
|
|
||||||
<rich-text :nodes="`${m.richTextNodes}`" :ref="`richText_${m.id}`"></rich-text>
|
|
||||||
<!-- recharge_empty -->
|
|
||||||
</view>
|
|
||||||
<!-- <view v-if="readChapterInfoObj.chackpay == 2" class="read_chapter">
|
|
||||||
<view class=""
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight};`">
|
|
||||||
<h3>{{readChapterInfoObj.chaptername}}</h3>
|
|
||||||
</view>
|
|
||||||
<u-empty icon="/static/images/recharge_empty.png" text="余额不足,请充值..." />
|
|
||||||
</view> -->
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
<!-- <view class="reading_schedule_box" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view class="reading_schedule_body">
|
|
||||||
<view class="_previous_chapter"
|
|
||||||
:style="`color:${previousChapterBbuttonTextColor};background:${previousChapterBbuttonBg}`"
|
|
||||||
@tap="previousChapter">
|
|
||||||
上一章
|
|
||||||
</view>
|
|
||||||
<view class="_next_chapter"
|
|
||||||
:style="`color:${nextChapterBbuttonTextColor};background:${nextChapterBbuttonBg}`"
|
|
||||||
@tap="nextChapter">下一章
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
|
||||||
<view id="compute_rich_text"
|
|
||||||
:style="`width:${computeRichTextWidth}px;color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight}`">
|
|
||||||
<rich-text :nodes="computeRichText"></rich-text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="u_popup_all">
|
|
||||||
<u-popup :show="tabBarPopupShow" mode="bottom" :overlay="false" zIndex="6" :bgColor="bodyReadingBg">
|
|
||||||
<view class="my_tabBar_Reading" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view class="tabBar_Reading_item">
|
|
||||||
<view class="reading_item_icon" @tap="handelDirectoryPopup">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].directory_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">目录</view>
|
|
||||||
</view>
|
|
||||||
<view class="tabBar_Reading_item">
|
|
||||||
<view class="reading_item_icon" @tap="toBookshelf">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].bookshelf_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">书城</view>
|
|
||||||
</view>
|
|
||||||
<view class="tabBar_Reading_item" @tap="handelSteUpPopup">
|
|
||||||
<view class="reading_item_icon">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].step_up_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">设置</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="readingPopupshow" mode="bottom" :overlay="false" zIndex="4" bgColor="transparent">
|
|
||||||
<view class="reading_schedule_box" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view class="reading_schedule_body">
|
|
||||||
<view class="_previous_chapter"
|
|
||||||
:style="`color:${previousChapterBbuttonTextColor};background:${previousChapterBbuttonBg}`"
|
|
||||||
@tap="previousChapter">
|
|
||||||
上一章
|
|
||||||
</view>
|
|
||||||
<view class="_next_chapter"
|
|
||||||
:style="`color:${nextChapterBbuttonTextColor};background:${nextChapterBbuttonBg}`"
|
|
||||||
@tap="nextChapter">下一章
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view style="height: 140rpx" />
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="stepUpPopupShow" mode="bottom" :overlay="false" bgColor="transparent" zIndex="5">
|
|
||||||
<view class="step_up_box" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view class="step_up_box_body">
|
|
||||||
<view class="step_up_item">
|
|
||||||
<view class="step_up_item_name" :style="`color:${dialogTextColor}`">背景</view>
|
|
||||||
<view :class="[`step_up_item_bg`, novelMainTypeColor == 'F3EFE9' ? 'activeBlack' : '']"
|
|
||||||
style="background: #f3efe9" @tap="changNovelMainType('F3EFE9')"></view>
|
|
||||||
<view :class="[`step_up_item_bg`, novelMainTypeColor == 'CCD9E2' ? 'activeBlack' : '']"
|
|
||||||
style="background: #ccd9e2" @tap="changNovelMainType('CCD9E2')"></view>
|
|
||||||
<view :class="[`step_up_item_bg`, novelMainTypeColor == '333333' ? 'activeWhite' : '']"
|
|
||||||
@tap="changNovelMainType('333333')">
|
|
||||||
<image class="is_images" :src="setUpModeBlack" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item mt40rpx">
|
|
||||||
<view class="step_up_item_name" :style="`color:${dialogTextColor}`">字号</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`"
|
|
||||||
@tap="reduceCharactersSize">
|
|
||||||
A-</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`"
|
|
||||||
@tap="addCharactersSize">A+
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`"
|
|
||||||
@tap="handelCharactersSize">
|
|
||||||
默认</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view style="height: 140rpx" />
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="directoryPopupShow" @close="directoryPopupClose" mode="right" :safeAreaInsetTop="true">
|
|
||||||
<view class="directory_popup_box">
|
|
||||||
<scroll-view scroll-y="true" @scrolltoupper="directoryPopupUpper"
|
|
||||||
@scrolltolower="directoryPopupLower" :show-scrollbar="false" class="directory_scroll_y">
|
|
||||||
<view class="_popup_box_item" v-for="m in directoryList" :key="m.id" @tap="handelDirectoryItem">
|
|
||||||
<view :class="['_item_name', readDirectoryActive == m.chapterorder ? 'active' : '']">
|
|
||||||
{{ m.chaptername }}
|
|
||||||
</view>
|
|
||||||
<view v-if="m.isvip" class="_item_chapter_lock">
|
|
||||||
<image class="is_images" src="/static/images/chapter_lock.png"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="purchaseFullShow" @close="purchaseFullClose" mode="bottom" overlayStyle="top:44px">
|
|
||||||
<view class="purchaseFull_popup_box" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view>
|
|
||||||
<CommBookLeftRigth :bookTips="bookInfo.category_name" :bookName="bookInfo.title"
|
|
||||||
:bookImage="bookInfo.cover" :bookIntroduction="`${readChapterInfoObj.allprice}书币`" />
|
|
||||||
</view>
|
|
||||||
<view class="purchaseFull_popup_btn_box">
|
|
||||||
<view class="purchaseFull_popup_btn" @tap="handelPurchaseFull">需要全本购买</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-modal :show="balanceShow" :title="balanceTitle" content='余额不足,请充值...'
|
|
||||||
:showCancelButton="!readChapterFlag" @confirm="balanceConfirm" @cancel="balanceCancel" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import setUpReadingColorAll from './setUpReadingColorAll.js';
|
|
||||||
import bookshelf_333 from '@/static/images/novelReading/bookshelf_333.png';
|
|
||||||
import directory_333 from '@/static/images/novelReading/directory_333.png';
|
|
||||||
import step_up_333 from '@/static/images/novelReading/step_up_333.png';
|
|
||||||
import bookshelf_ccd9e2 from '@/static/images/novelReading/bookshelf_ccd9e2.png';
|
|
||||||
import step_up_ccd9e2 from '@/static/images/novelReading/step_up_ccd9e2.png';
|
|
||||||
import directory_ccd9e2 from '@/static/images/novelReading/directory_ccd9e2.png';
|
|
||||||
import bookshelf_f3efe from '@/static/images/novelReading/bookshelf_f3efe.png';
|
|
||||||
import directory_f3efe9 from '@/static/images/novelReading/directory_f3efe9.png';
|
|
||||||
import step_up_f3efe from '@/static/images/novelReading/step_up_f3efe.png';
|
|
||||||
import set_up_mode_black from '@/static/images/novelReading/set_up_mode_black.png';
|
|
||||||
import recharge_empty from '@/static/images/recharge_empty.png'
|
|
||||||
import config from '@/config/index';
|
|
||||||
import {
|
|
||||||
isGetSystemInfo
|
|
||||||
} from '@/utils/systemInfo.js';
|
|
||||||
import {
|
|
||||||
myGetStorage,
|
|
||||||
mySetStorage
|
|
||||||
} from '@/utils/storage/index.js';
|
|
||||||
import myData from './data.js';
|
|
||||||
import CommBookLeftRigth from '@/components/commBookLeftRigth/index.vue'
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
CommBookLeftRigth
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
navbarTitle: '小说阅读页面',
|
|
||||||
novelMainTypeColor: '',
|
|
||||||
setUpColorAll: {},
|
|
||||||
navigationBarTitleTextColor: '',
|
|
||||||
mainBodyBg: '',
|
|
||||||
navigationBarTitleTextBackColor: '',
|
|
||||||
previousChapterBbuttonBg: '',
|
|
||||||
previousChapterBbuttonTextColor: '',
|
|
||||||
nextChapterBbuttonBg: '',
|
|
||||||
nextChapterBbuttonTextColor: '',
|
|
||||||
bodyReadingHeight: 0,
|
|
||||||
scrollReadingHeight: 0,
|
|
||||||
// 内容背景
|
|
||||||
bodyReadingBg: '',
|
|
||||||
// 底部安全区
|
|
||||||
// bottomSecureHeight: 0,
|
|
||||||
tabBarPopupShow: false,
|
|
||||||
readingPopupshow: false,
|
|
||||||
stepUpPopupShow: false,
|
|
||||||
purchaseFullShow: false,
|
|
||||||
balanceShow: false,
|
|
||||||
balanceTitle: '下一章,付费章节',
|
|
||||||
// bar 的icon
|
|
||||||
barPopupIcon: {},
|
|
||||||
dialogTextColor: '',
|
|
||||||
progressBg: '',
|
|
||||||
progressActiveBg: '',
|
|
||||||
setUpModeBlack: '',
|
|
||||||
dialogATextBg: '',
|
|
||||||
novelContentColor: '',
|
|
||||||
// 目录信息
|
|
||||||
booksDirectorySid: '2387',
|
|
||||||
bookInfo: {},
|
|
||||||
booksDirectoryPage: 1,
|
|
||||||
newBooksDirectoryPage: [],
|
|
||||||
directoryList: [],
|
|
||||||
// directoryPopupHeight: 0,
|
|
||||||
directoryPopupShow: false,
|
|
||||||
// 小说信息
|
|
||||||
novelReadingContentText: [],
|
|
||||||
defaultCharactersSize: 46,
|
|
||||||
newCharactersSize: 46,
|
|
||||||
defaultCharactersLineHeight: 2,
|
|
||||||
readDirectoryActive: '',
|
|
||||||
myData: [],
|
|
||||||
computeRichText: '',
|
|
||||||
computeRichTextWidth: 0,
|
|
||||||
isScrollTop: 0,
|
|
||||||
refresherTriggered: false,
|
|
||||||
readChapterid: '',
|
|
||||||
readChapterFlag: false,
|
|
||||||
readChapterInfoObj: {},
|
|
||||||
readChapterLastid: '',
|
|
||||||
readChapterNextid: '',
|
|
||||||
refresherEnabled: true,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onLoad(options) {
|
|
||||||
this.booksDirectorySid = options.sid;
|
|
||||||
this.navbarTitle = options.n;
|
|
||||||
this.readChapterid = options.id;
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
// const booksDirectoryPage = this.booksDirectoryPage;
|
|
||||||
// const newBooksDirectoryPage = [...this.newBooksDirectoryPage, booksDirectoryPage];
|
|
||||||
// this.newBooksDirectoryPage = newBooksDirectoryPage;
|
|
||||||
const bookSid = this.booksDirectorySid;
|
|
||||||
const data = {
|
|
||||||
sid: bookSid,
|
|
||||||
}
|
|
||||||
uni.$u.http.post('/bookdetails', data).then((res) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
if (res.status == 1) {
|
|
||||||
const info = res.data.info;
|
|
||||||
const cover = info.cover.includes('http') ? info.cover : `${config.baseUrl}${info.cover}`;
|
|
||||||
this.bookInfo = {
|
|
||||||
...info,
|
|
||||||
cover
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}).catch((err) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
})
|
|
||||||
this.isGetUserRead();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async isGetUserRead() {
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = this.booksDirectoryPage;
|
|
||||||
const readChapterid = this.readChapterid ? this.readChapterid : '';
|
|
||||||
// this.readDirectoryActive = '3';
|
|
||||||
await this.isGetDirectory(booksDirectorySid, booksDirectoryPage);
|
|
||||||
await this.isGetBookInfo(readChapterid, '', true);
|
|
||||||
},
|
|
||||||
isGetBookInfo(chapterId, statusType, isShowLoading = false) {
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const novelReadingContentText = this.novelReadingContentText;
|
|
||||||
if (isShowLoading) {
|
|
||||||
uni.showLoading({
|
|
||||||
title: '加载中...'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
const data = {
|
|
||||||
sid: booksDirectorySid,
|
|
||||||
};
|
|
||||||
if (chapterId) {
|
|
||||||
data.id = chapterId;
|
|
||||||
}
|
|
||||||
uni.$u.http.post('/read', data).then((res) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
if (res.status == 1) {
|
|
||||||
const readChapterInfoObj = {
|
|
||||||
...res.data,
|
|
||||||
richTextNodes: `<h3>${res.data.chaptername}</h3></br>${res.data.novel_content}`
|
|
||||||
};
|
|
||||||
this.readChapterInfoObj = readChapterInfoObj;
|
|
||||||
if (readChapterInfoObj.chackpay == 1) {
|
|
||||||
this.isScrollTop = 0.01;
|
|
||||||
if (statusType == 'refresherrefresh') {
|
|
||||||
this.novelReadingContentText = [readChapterInfoObj, ...novelReadingContentText];
|
|
||||||
this.computeRichText = readChapterInfoObj.richTextNodes;
|
|
||||||
const query = uni.createSelectorQuery().in(this);
|
|
||||||
this.$nextTick(() => {
|
|
||||||
query.select(`#compute_rich_text`).boundingClientRect((data) => {
|
|
||||||
this.isScrollTop = parseInt(data.height) - 20;
|
|
||||||
}).exec();
|
|
||||||
});
|
|
||||||
this.refresherTriggered = false;
|
|
||||||
} else if (statusType == 'charactersLower') {
|
|
||||||
this.novelReadingContentText = [...novelReadingContentText, readChapterInfoObj];
|
|
||||||
} else if (statusType == 'nextChapter') {
|
|
||||||
this.novelReadingContentText = [readChapterInfoObj];
|
|
||||||
this.readDirectoryActive = readChapterInfoObj.chapterorder;
|
|
||||||
this.readChapterLastid = readChapterInfoObj.lastid;
|
|
||||||
this.readChapterNextid = readChapterInfoObj.nextid;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.isScrollTop = 0;
|
|
||||||
})
|
|
||||||
} else if (statusType == 'previousChapter') {
|
|
||||||
this.novelReadingContentText = [readChapterInfoObj];
|
|
||||||
this.readDirectoryActive = readChapterInfoObj.chapterorder;
|
|
||||||
this.readChapterLastid = readChapterInfoObj.lastid;
|
|
||||||
this.readChapterNextid = readChapterInfoObj.nextid;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.isScrollTop = 0;
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.novelReadingContentText = [readChapterInfoObj];
|
|
||||||
this.readDirectoryActive = readChapterInfoObj.chapterorder;
|
|
||||||
this.readChapterLastid = readChapterInfoObj.lastid;
|
|
||||||
this.readChapterNextid = readChapterInfoObj.nextid;
|
|
||||||
}
|
|
||||||
} else if (readChapterInfoObj.chackpay == 2) {
|
|
||||||
this.balanceShow = true;
|
|
||||||
this.balanceTitle = '下一章,付费章节';
|
|
||||||
if (isShowLoading) {
|
|
||||||
this.readChapterFlag = true;
|
|
||||||
}
|
|
||||||
} else if (readChapterInfoObj.chackpay == 3) {
|
|
||||||
this.purchaseFullShow = true;
|
|
||||||
if (isShowLoading) {
|
|
||||||
this.readChapterFlag = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch((err) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
console.log(err, '========');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
refresherrefresh() {
|
|
||||||
const readChapterInfoObj = this.readChapterInfoObj;
|
|
||||||
const readChapterLastid = this.readChapterLastid;
|
|
||||||
this.refresherTriggered = true;
|
|
||||||
if (!readChapterLastid) {
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: "已经是第一章了"
|
|
||||||
})
|
|
||||||
this.refresherTriggered = false;
|
|
||||||
}, 1000)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.isGetBookInfo(readChapterLastid, 'refresherrefresh');
|
|
||||||
},
|
|
||||||
charactersLower() {
|
|
||||||
const readChapterNextid = this.readChapterNextid;
|
|
||||||
// if (readChapterInfoObj.chackpay != 1) {
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
if (!readChapterNextid) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: "已经是最后一章了~"
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.isGetBookInfo(readChapterNextid, 'charactersLower');
|
|
||||||
},
|
|
||||||
charactersScroll(e) {
|
|
||||||
const bodyReadingHeight = this.bodyReadingHeight;
|
|
||||||
const scrollTop = e.detail.scrollTop;
|
|
||||||
// this.isScrollTop = scrollTop;
|
|
||||||
uni.createSelectorQuery().selectAll('.novelReading_characters_main').boundingClientRect((data) => {
|
|
||||||
data.forEach((m) => {
|
|
||||||
if (m.top < bodyReadingHeight) {
|
|
||||||
this.readDirectoryActive = m.dataset.chapterorder;
|
|
||||||
this.readChapterLastid = m.dataset.lastid;
|
|
||||||
this.readChapterNextid = m.dataset.nextid;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).exec();
|
|
||||||
},
|
|
||||||
previousChapter() {
|
|
||||||
const readChapterLastid = this.readChapterLastid
|
|
||||||
if (!readChapterLastid) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: "已经是第一章了"
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.isGetBookInfo(readChapterLastid, 'previousChapter');
|
|
||||||
},
|
|
||||||
nextChapter() {
|
|
||||||
const readChapterNextid = this.readChapterNextid;
|
|
||||||
if (!readChapterNextid) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: "已经是最后一章了~"
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.isGetBookInfo(readChapterNextid, 'nextChapter');
|
|
||||||
},
|
|
||||||
handelDirectoryItem(row) {},
|
|
||||||
handelShowStepUp() {
|
|
||||||
this.tabBarPopupShow = !this.tabBarPopupShow;
|
|
||||||
this.readingPopupshow = !this.readingPopupshow;
|
|
||||||
this.stepUpPopupShow = false;
|
|
||||||
},
|
|
||||||
handelDirectoryPopup() {
|
|
||||||
// this.directoryPopupShow = true;
|
|
||||||
const readChapterInfoObj = this.readChapterInfoObj;
|
|
||||||
const readDirectoryActive = this.readDirectoryActive;
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/bookRecommendList/bookRecommendList?sid=${readChapterInfoObj.sid}&t=${readChapterInfoObj.title}&c=${readDirectoryActive}`
|
|
||||||
})
|
|
||||||
},
|
|
||||||
directoryPopupClose() {
|
|
||||||
// this.directoryPopupShow = false;
|
|
||||||
// const readChapterInfoObj = this.readChapterInfoObj;
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: `/pages/bookRecommendList/bookRecommendList?sid=${readChapterInfoObj.sid}&t=${readChapterInfoObj.title}&c=${readChapterInfoObj.chapterorder}`
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
purchaseFullClose() {
|
|
||||||
const readChapterFlag = this.readChapterFlag;
|
|
||||||
if (readChapterFlag) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.purchaseFullShow = false;
|
|
||||||
},
|
|
||||||
handelSteUpPopup() {
|
|
||||||
this.stepUpPopupShow = true;
|
|
||||||
},
|
|
||||||
balanceConfirm() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/voucherCenter/index`
|
|
||||||
})
|
|
||||||
},
|
|
||||||
balanceCancel() {
|
|
||||||
this.balanceShow = false;
|
|
||||||
},
|
|
||||||
handelPurchaseFull() {
|
|
||||||
const readChapterInfoObj = this.readChapterInfoObj;
|
|
||||||
uni.showLoading({
|
|
||||||
title: '加载中...'
|
|
||||||
});
|
|
||||||
const data = {
|
|
||||||
sid: readChapterInfoObj.sid,
|
|
||||||
id: readChapterInfoObj.id,
|
|
||||||
allprice: readChapterInfoObj.allprice,
|
|
||||||
};
|
|
||||||
uni.$u.http.post('/buyall', data).then((res) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
if (res.status == 1) {
|
|
||||||
if (res.data.status == 2) {
|
|
||||||
this.balanceShow = true;
|
|
||||||
this.balanceTitle = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch((err) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 切换页面颜色
|
|
||||||
changNovelMainType(type) {
|
|
||||||
|
|
||||||
this.novelMainTypeColor = type;
|
|
||||||
this.initPage(type);
|
|
||||||
const novelMainObj = myGetStorage('novelMainObj') || '{}';
|
|
||||||
const obj = {
|
|
||||||
...JSON.parse(novelMainObj),
|
|
||||||
novelMainTypeColor: type,
|
|
||||||
}
|
|
||||||
mySetStorage('novelMainObj', JSON.stringify(obj));
|
|
||||||
},
|
|
||||||
// 字体减小
|
|
||||||
reduceCharactersSize() {
|
|
||||||
const newCharactersSize = this.newCharactersSize;
|
|
||||||
this.newCharactersSize = newCharactersSize - 2;
|
|
||||||
const novelMainObj = myGetStorage('novelMainObj') || '{}';
|
|
||||||
const obj = {
|
|
||||||
...JSON.parse(novelMainObj),
|
|
||||||
charactersSize: newCharactersSize - 2,
|
|
||||||
}
|
|
||||||
mySetStorage('novelMainObj', JSON.stringify(obj));
|
|
||||||
},
|
|
||||||
// 字体加大
|
|
||||||
addCharactersSize() {
|
|
||||||
const newCharactersSize = this.newCharactersSize;
|
|
||||||
this.newCharactersSize = newCharactersSize + 2;
|
|
||||||
const novelMainObj = myGetStorage('novelMainObj') || '{}';
|
|
||||||
const obj = {
|
|
||||||
...JSON.parse(novelMainObj),
|
|
||||||
charactersSize: newCharactersSize + 2,
|
|
||||||
}
|
|
||||||
mySetStorage('novelMainObj', JSON.stringify(obj));
|
|
||||||
},
|
|
||||||
// 恢复默认字体大小
|
|
||||||
handelCharactersSize() {
|
|
||||||
const defaultCharactersSize = this.defaultCharactersSize;
|
|
||||||
this.newCharactersSize = defaultCharactersSize;
|
|
||||||
const novelMainObj = myGetStorage('novelMainObj') || '{}';
|
|
||||||
const obj = {
|
|
||||||
...JSON.parse(novelMainObj),
|
|
||||||
charactersSize: defaultCharactersSize,
|
|
||||||
}
|
|
||||||
mySetStorage('novelMainObj', JSON.stringify(obj));
|
|
||||||
},
|
|
||||||
// 目录划到了最上边
|
|
||||||
directoryPopupUpper() {
|
|
||||||
const isBooksDirectoryPage = this.booksDirectoryPage;
|
|
||||||
const newBooksDirectoryPage = this.newBooksDirectoryPage;
|
|
||||||
if (isBooksDirectoryPage > 1 && newBooksDirectoryPage.indexOf(isBooksDirectoryPage) == -1) {
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = isBooksDirectoryPage - 1;
|
|
||||||
this.booksDirectoryPage = booksDirectoryPage;
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage, 'upper');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 目录划到了最下边
|
|
||||||
directoryPopupLower() {
|
|
||||||
const isBooksDirectoryPage = this.booksDirectoryPage;
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = isBooksDirectoryPage + 1;
|
|
||||||
const newBooksDirectoryPage = [...this.newBooksDirectoryPage, booksDirectoryPage];
|
|
||||||
this.newBooksDirectoryPage = newBooksDirectoryPage;
|
|
||||||
this.booksDirectoryPage = booksDirectoryPage;
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage, 'lower');
|
|
||||||
},
|
|
||||||
isGetDirectory(sid, page, type) {
|
|
||||||
uni.showLoading({
|
|
||||||
title: '加载中...'
|
|
||||||
});
|
|
||||||
const data = {
|
|
||||||
sid,
|
|
||||||
page
|
|
||||||
};
|
|
||||||
uni.$u.http.post('/getDirectory', data).then((res) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
if (res.status == 1) {
|
|
||||||
const directory = res.data.directory;
|
|
||||||
let columnsLabel = '';
|
|
||||||
if (type == 'upper') {
|
|
||||||
this.directoryList = [...directory, ...this.directoryList];
|
|
||||||
} else if (type == 'lower') {
|
|
||||||
this.directoryList = [...this.directoryList, ...directory];
|
|
||||||
} else {
|
|
||||||
this.directoryList = directory;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch((err) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
console.log(err, '========');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
initPage(novelMainTypeColor) {
|
|
||||||
const mainBodyBg = setUpReadingColorAll[novelMainTypeColor].mainBodyBg;
|
|
||||||
this.navigationBarTitleTextColor = setUpReadingColorAll[novelMainTypeColor].navigationBarTitleTextColor;
|
|
||||||
this.mainBodyBg = mainBodyBg;
|
|
||||||
this.bodyReadingBg = mainBodyBg;
|
|
||||||
this.dialogTextColor = setUpReadingColorAll[novelMainTypeColor].dialogTextColor;
|
|
||||||
this.progressBg = setUpReadingColorAll[novelMainTypeColor].progressBg;
|
|
||||||
this.progressActiveBg = setUpReadingColorAll[novelMainTypeColor].progressActiveBg;
|
|
||||||
this.setUpModeBlack = set_up_mode_black;
|
|
||||||
this.dialogATextBg = setUpReadingColorAll[novelMainTypeColor].dialogATextBg;
|
|
||||||
this.tabBarTextColor = setUpReadingColorAll[novelMainTypeColor].tabBarTextColor;
|
|
||||||
this.novelContentColor = setUpReadingColorAll[novelMainTypeColor].novelContentColor;
|
|
||||||
this.navigationBarTitleTextBackColor = setUpReadingColorAll[novelMainTypeColor]
|
|
||||||
.navigationBarTitleTextBackColor;
|
|
||||||
this.previousChapterBbuttonBg = setUpReadingColorAll[novelMainTypeColor].previousChapterBbuttonBg;
|
|
||||||
this.previousChapterBbuttonTextColor = setUpReadingColorAll[novelMainTypeColor]
|
|
||||||
.previousChapterBbuttonTextColor;
|
|
||||||
this.nextChapterBbuttonBg = setUpReadingColorAll[novelMainTypeColor].nextChapterBbuttonBg;
|
|
||||||
this.nextChapterBbuttonTextColor = setUpReadingColorAll[novelMainTypeColor].nextChapterBbuttonTextColor;
|
|
||||||
},
|
|
||||||
rightClick() {
|
|
||||||
uni.navigateBack();
|
|
||||||
},
|
|
||||||
toBookshelf() {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: `/pages/bookCity/bookCity/index`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onPullDownRefresh() {
|
|
||||||
// const isReadDirectoryActive = this.readDirectoryActive;
|
|
||||||
// if(isReadDirectoryActive == 0) {
|
|
||||||
// uni.showToast({
|
|
||||||
// icon:'none',
|
|
||||||
// title:"已经是第一章了"
|
|
||||||
// })
|
|
||||||
// uni.stopPullDownRefresh()
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// const readDirectoryActive = isReadDirectoryActive- 1;
|
|
||||||
// const novelReadingContentText = this.myData[readDirectoryActive];
|
|
||||||
// this.novelReadingContentText = [novelReadingContentText, ...this.novelReadingContentText];
|
|
||||||
// // setTimeout(() => {
|
|
||||||
// this.computeRichText = this.myData[readDirectoryActive].content;
|
|
||||||
// // this.readDirectoryActive = readDirectoryActive;
|
|
||||||
// const query = uni.createSelectorQuery().in(this);
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// query.select(`#compute_rich_text`).boundingClientRect((data) => {
|
|
||||||
// this.isScrollTop = parseInt(data.height) - 30;
|
|
||||||
// }).exec();
|
|
||||||
// });
|
|
||||||
// uni.stopPullDownRefresh()
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
const novelMainObj = myGetStorage('novelMainObj') || '{}';
|
|
||||||
const novelMainTypeColor = JSON.parse(novelMainObj).novelMainTypeColor || 'F3EFE9';
|
|
||||||
const {
|
|
||||||
screenHeight = 0, statusBarHeight = 0, windowHeight = 0, devicePixelRatio, windowBottom, windowWidth,
|
|
||||||
screenWidth
|
|
||||||
} = isGetSystemInfo();
|
|
||||||
// this.myData = myData;
|
|
||||||
this.computeRichTextWidth = windowWidth;
|
|
||||||
this.novelMainTypeColor = novelMainTypeColor;
|
|
||||||
this.newCharactersSize = JSON.parse(novelMainObj).charactersSize || 46;
|
|
||||||
this.bodyReadingHeight = screenHeight - statusBarHeight - devicePixelRatio * 22;
|
|
||||||
// 不需要
|
|
||||||
// this.scrollReadingHeight = screenHeight - statusBarHeight - devicePixelRatio * 38;
|
|
||||||
// this.scrollReadingHeight = windowHeight - (screenWidth / 375) * 54;
|
|
||||||
// // #ifdef APP-PLUS
|
|
||||||
// this.directoryPopupHeight = screenHeight - statusBarHeight;
|
|
||||||
// // #endif
|
|
||||||
// // #ifdef H5 || MP-WEIXIN
|
|
||||||
// this.directoryPopupHeight = screenHeight - statusBarHeight - devicePixelRatio * 22;
|
|
||||||
// // #endif
|
|
||||||
|
|
||||||
// this.bottomSecureHeight = screenHeight - windowHeight;
|
|
||||||
this.setUpColorAll = setUpReadingColorAll;
|
|
||||||
this.barPopupIcon = {
|
|
||||||
'F3EFE9': {
|
|
||||||
bookshelf_icon: bookshelf_f3efe,
|
|
||||||
directory_icon: directory_f3efe9,
|
|
||||||
step_up_icon: step_up_f3efe
|
|
||||||
},
|
|
||||||
'CCD9E2': {
|
|
||||||
bookshelf_icon: bookshelf_ccd9e2,
|
|
||||||
directory_icon: directory_ccd9e2,
|
|
||||||
step_up_icon: step_up_ccd9e2
|
|
||||||
},
|
|
||||||
'333333': {
|
|
||||||
bookshelf_icon: bookshelf_333,
|
|
||||||
directory_icon: directory_333,
|
|
||||||
step_up_icon: step_up_333
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.initPage(novelMainTypeColor);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
page {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.is_images {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mt40rpx {
|
|
||||||
margin-top: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content::v-deep.u-navbar__content__title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content::v-deep.u-navbar--fixed {
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content::v-deep.z-paging-content {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#compute_rich_text {
|
|
||||||
position: fixed;
|
|
||||||
top: 1500px;
|
|
||||||
padding: 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.novelReading_body {
|
|
||||||
flex: 1;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.novelReading_main_con {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 32rpx 32rpx;
|
|
||||||
padding-bottom: constant(safe-area-inset-bottom);
|
|
||||||
/* 兼容 iOS 设备 */
|
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
|
||||||
/* 兼容 iPhone X 及以上设备 */
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.novelReading_main {
|
|
||||||
flex: 1;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.novelReading_characters_scroll {
|
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.read_chapter {
|
|
||||||
padding: 40rpx 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_characters_main {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_box {
|
|
||||||
width: 100%;
|
|
||||||
height: 82rpx;
|
|
||||||
// padding: 40rpx;
|
|
||||||
// box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.u_popup_all {
|
|
||||||
flex: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.my_tabBar_Reading {
|
|
||||||
width: 100%;
|
|
||||||
height: 140rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 40rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-top: 1rpx solid #d6d2ce;
|
|
||||||
// padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS 设备 */
|
|
||||||
// padding-bottom: env(safe-area-inset-bottom); /* 兼容 iPhone X 及以上设备 */
|
|
||||||
|
|
||||||
.tabBar_Reading_item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.reading_item_icon {
|
|
||||||
width: 34rpx;
|
|
||||||
height: 34rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_item_name {
|
|
||||||
font-size: 30rpx;
|
|
||||||
line-height: 1;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_box {
|
|
||||||
width: 100%;
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
|
|
||||||
.reading_schedule_body {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
padding: 40rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: transparent;
|
|
||||||
|
|
||||||
._previous_chapter {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 192rpx;
|
|
||||||
height: 82rpx;
|
|
||||||
font-size: 34rpx;
|
|
||||||
line-height: 1;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
._next_chapter {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 442rpx;
|
|
||||||
height: 82rpx;
|
|
||||||
font-size: 34rpx;
|
|
||||||
line-height: 1;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_box {
|
|
||||||
width: 100%;
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
|
|
||||||
.step_up_box_body {
|
|
||||||
width: 100%;
|
|
||||||
padding: 40rpx 24rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: transparent;
|
|
||||||
|
|
||||||
.step_up_item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.step_up_item_name {
|
|
||||||
line-height: 1;
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 188rpx;
|
|
||||||
height: 74rpx;
|
|
||||||
border-radius: 37rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border: 2rpx solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_text_bg {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 188rpx;
|
|
||||||
height: 74rpx;
|
|
||||||
border-radius: 37rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg.activeBlack {
|
|
||||||
border-color: #1a1a1a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg.activeWhite {
|
|
||||||
border-color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_slider::v-deep.uni-slider-handle-wrapper {
|
|
||||||
height: 60rpx;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
|
|
||||||
.uni-slider-track {
|
|
||||||
border-radius: 30rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.directory_popup_box {
|
|
||||||
position: relative;
|
|
||||||
width: 560rpx;
|
|
||||||
height: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.directory_scroll_y {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
padding-left: 32rpx;
|
|
||||||
padding-right: 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding-bottom: constant(safe-area-inset-bottom);
|
|
||||||
/* 兼容 iOS 设备 */
|
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
|
||||||
/* 兼容 iPhone X 及以上设备 */
|
|
||||||
// padding-top: constant(safe-area-inset-top);
|
|
||||||
// /* 兼容 iOS 设备 */
|
|
||||||
// padding-top: env(safe-area-inset-top);
|
|
||||||
// /* 兼容 iPhone X 及以上设备 */
|
|
||||||
|
|
||||||
._popup_box_item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 120rpx;
|
|
||||||
border-bottom: 1rpx solid #f2f2f2;
|
|
||||||
|
|
||||||
._item_name {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
._item_name.active {
|
|
||||||
color: #ff728f;
|
|
||||||
}
|
|
||||||
|
|
||||||
._item_chapter_lock {
|
|
||||||
width: 32rpx;
|
|
||||||
height: 32rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.purchaseFull_popup_box {
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 50rpx 32rpx;
|
|
||||||
|
|
||||||
.purchaseFull_popup_btn_box {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: 50rpx;
|
|
||||||
|
|
||||||
.purchaseFull_popup_btn {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 640rpx;
|
|
||||||
height: 84rpx;
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: #fff;
|
|
||||||
background: linear-gradient(to top, #FBA676, #E95E32);
|
|
||||||
border-radius: 24rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,673 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="novelReading_content">
|
|
||||||
<u-navbar :title="navbarTitle" @rightClick="rightClick" :autoBack="true" :fixed="true" :bgColor="mainBodyBg"
|
|
||||||
:titleStyle="{'color':navigationBarTitleTextColor,}" :leftIconColor="navigationBarTitleTextBackColor"
|
|
||||||
:shadow="true" :safeAreaInsetTop="true" :placeholder="true" />
|
|
||||||
<view class="novelReading_body" :style="`background:${bodyReadingBg}`" @tap="handelShowStepUp">
|
|
||||||
<!-- :style="`height:${bodyReadingHeight}px;`" -->
|
|
||||||
<!-- <view class="novelReading_main" :style="`height:${bodyReadingHeight}px;`">
|
|
||||||
<scroll-view :scroll-top="isScrollTop" :scroll-into-view="`richText_${readDirectoryActive}`"
|
|
||||||
scroll-y="true" @scrolltoupper="charactersUpper" @scrolltolower="charactersLower"
|
|
||||||
@scroll="charactersScroll" :style="`height:${bodyReadingHeight}px;`"
|
|
||||||
class="novelReading_characters_scroll" upper-threshold="200" lower-threshold="200">
|
|
||||||
<view class="novelReading_characters_main"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight}`"
|
|
||||||
v-for="m in novelReadingContentText" :key="m.id" :id="`richText_${m.id}`">
|
|
||||||
<rich-text :nodes="m.content" :ref="`richText_${m.id}`"></rich-text>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view> -->
|
|
||||||
<view class="novelReading_main" :style="`height:${bodyReadingHeight}px;`">
|
|
||||||
<z-paging ref="paging" v-model="novelReadingContentText" :style="`height:${bodyReadingHeight}px;`"
|
|
||||||
class="novelReading_characters_scroll" :use-chat-record-mode="true" @onRefresh="refresherTouchend" refresher-threshold="200" :use-custom-refresher="false">
|
|
||||||
<view class="novelReading_characters_main"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight}`"
|
|
||||||
v-for="m in novelReadingContentText" :key="m.id" :id="`richText_${m.id}`">
|
|
||||||
<rich-text :nodes="m.content" :ref="`richText_${m.id}`"></rich-text>
|
|
||||||
</view>
|
|
||||||
</z-paging>
|
|
||||||
</view>
|
|
||||||
<!--<view class="novelReading_main" > <view class="novelReading_characters_main"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight}`"
|
|
||||||
v-for="m in novelReadingContentText" :key="m.id" :id="`richText_${m.id}`">
|
|
||||||
<rich-text :nodes="m.content" :ref="`richText_${m.id}`"></rich-text>
|
|
||||||
</view> </view> -->
|
|
||||||
<!-- <view class="novelReading_main" :style="`height:${bodyReadingHeight}px;`">
|
|
||||||
<swiper class="novelReading_main_swiper" :indicator-dots="false" :duration="300"
|
|
||||||
:current="novelSwiperCurrent">
|
|
||||||
<template v-for="m in novelReadingContentText">
|
|
||||||
<swiper-item v-for="(s,idx) in m.swiperItemPage" :key="idx" :id="`richText_${m.id}`">
|
|
||||||
<view class="swiper_item_con" :id="`richText_${m.id}`"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight};transform:translateY(-${idx*bodyReadingHeight}px)`">
|
|
||||||
<rich-text :nodes="m.content"></rich-text>
|
|
||||||
</view>
|
|
||||||
</swiper-item>
|
|
||||||
</template>
|
|
||||||
</swiper>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
|
||||||
<rich-text id="compute_rich_text" :nodes="computeRichText"
|
|
||||||
:style="`color:${novelContentColor};font-size:${newCharactersSize}rpx;line-height:${defaultCharactersLineHeight}`"></rich-text>
|
|
||||||
<u-popup :show="tabBarPopupShow" mode="bottom" :overlay="false" zIndex="6">
|
|
||||||
<view class="my_tabBar_Reading" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view class="tabBar_Reading_item">
|
|
||||||
<view class="reading_item_icon" @tap="handelDirectoryPopup">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].directory_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">目录</view>
|
|
||||||
</view>
|
|
||||||
<view class="tabBar_Reading_item">
|
|
||||||
<view class="reading_item_icon">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].bookshelf_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">书城</view>
|
|
||||||
</view>
|
|
||||||
<view class="tabBar_Reading_item" @tap="handelSteUpPopup">
|
|
||||||
<view class="reading_item_icon">
|
|
||||||
<image class="is_images" :src="barPopupIcon[novelMainTypeColor].step_up_icon"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reading_item_name" :style="`color:${tabBarTextColor}`">设置</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="readingPopupshow" mode="bottom" :overlay="false" zIndex="4" bgColor="transparent">
|
|
||||||
<view class="reading_schedule_box" :style="`background:${bodyReadingBg}`">
|
|
||||||
<!-- <view class="reading_schedule_body">
|
|
||||||
<view class="schedule_body_text" :style="`color:${dialogTextColor}`">上一章</view>
|
|
||||||
<view class="reading_schedule_slider">
|
|
||||||
<slider class="slider" :max="100" :min="0" :block-size="30" :activeColor="progressActiveBg"
|
|
||||||
:backgroundColor="progressBg" :value="sliderValue" @change="sliderChange" />
|
|
||||||
</view>
|
|
||||||
<view class="schedule_body_text" :style="`color:${dialogTextColor}`">下一章</view>
|
|
||||||
</view> -->
|
|
||||||
<view style="height:140rpx" />
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="stepUpPopupShow" mode="bottom" :overlay="false" bgColor="transparent" zIndex="5">
|
|
||||||
<view class="step_up_box" :style="`background:${bodyReadingBg}`">
|
|
||||||
<view class="step_up_box_body">
|
|
||||||
<view class="step_up_item">
|
|
||||||
<view class="step_up_item_name" :style="`color:${dialogTextColor}`">
|
|
||||||
背景
|
|
||||||
</view>
|
|
||||||
<view :class="[`step_up_item_bg`,novelMainTypeColor == 'F3EFE9' ? 'activeBlack' :'']"
|
|
||||||
style="background:#F3EFE9 ;" @tap="changNovelMainType('F3EFE9')"></view>
|
|
||||||
<view :class="[`step_up_item_bg`,novelMainTypeColor == 'CCD9E2' ? 'activeBlack' :'']"
|
|
||||||
style="background:#CCD9E2 ;" @tap="changNovelMainType('CCD9E2')"></view>
|
|
||||||
<view :class="[`step_up_item_bg`,novelMainTypeColor == '333333' ? 'activeWhite' :'']"
|
|
||||||
@tap="changNovelMainType('333333')">
|
|
||||||
<image class="is_images" :src="setUpModeBlack" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item mt40rpx">
|
|
||||||
<view class="step_up_item_name" :style="`color:${dialogTextColor}`">
|
|
||||||
字号
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`" @tap="reduceCharactersSize">
|
|
||||||
A-</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`" @tap="addCharactersSize">A+
|
|
||||||
</view>
|
|
||||||
<view class="step_up_item_text_bg"
|
|
||||||
:style="`color:${dialogTextColor};background:${dialogATextBg}`" @tap="handelCharactersSize">
|
|
||||||
默认</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view style="height:140rpx" />
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-popup :show="directoryPopupShow" @close="directoryPopupClose" mode="right" :safeAreaInsetTop="true">
|
|
||||||
<view class="directory_popup_box">
|
|
||||||
<scroll-view scroll-y="true" @scrolltoupper="directoryPopupUpper" @scrolltolower="directoryPopupLower"
|
|
||||||
:style="`height:${directoryPopupHeight}px`" :show-scrollbar="false">
|
|
||||||
<!-- <view class="_popup_box_item" v-for="m in directoryList" :key="m.id">
|
|
||||||
<view class="_item_name">
|
|
||||||
{{m.chaptername}}
|
|
||||||
</view>
|
|
||||||
<view v-if="m.isvip" class="_item_chapter_lock">
|
|
||||||
<image class="is_images" src="/static/images/chapter_lock.png"></image>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<view class="_popup_box_item" v-for="m in myData" :key="m.id">
|
|
||||||
<view :class="['_item_name', readDirectoryActive == m.id? 'active':''] ">
|
|
||||||
{{m.sub}}
|
|
||||||
</view>
|
|
||||||
<view v-if="m.isvip" class="_item_chapter_lock">
|
|
||||||
<image class="is_images" src="/static/images/chapter_lock.png"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import setUpReadingColorAll from './setUpReadingColorAll.js';
|
|
||||||
import bookshelf_333 from '/static/images/novelReading/bookshelf_333.png';
|
|
||||||
import directory_333 from '/static/images/novelReading/directory_333.png';
|
|
||||||
import step_up_333 from '/static/images/novelReading/step_up_333.png';
|
|
||||||
import bookshelf_ccd9e2 from '/static/images/novelReading/bookshelf_ccd9e2.png';
|
|
||||||
import step_up_ccd9e2 from '/static/images/novelReading/step_up_ccd9e2.png';
|
|
||||||
import directory_ccd9e2 from '/static/images/novelReading/directory_ccd9e2.png';
|
|
||||||
import bookshelf_f3efe from '/static/images/novelReading/bookshelf_f3efe.png';
|
|
||||||
import directory_f3efe9 from '/static/images/novelReading/directory_f3efe9.png';
|
|
||||||
import step_up_f3efe from '/static/images/novelReading/step_up_f3efe.png';
|
|
||||||
import set_up_mode_black from '/static/images/novelReading/set_up_mode_black.png';
|
|
||||||
import {
|
|
||||||
isGetSystemInfo
|
|
||||||
} from '@/utils/systemInfo.js';
|
|
||||||
import {
|
|
||||||
myGetStorage,
|
|
||||||
mySetStorage
|
|
||||||
} from '@/utils/storage/index.js';
|
|
||||||
import myData from './data.js'
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
novelMainTypeColor: '',
|
|
||||||
navbarTitle: '小说阅读页面',
|
|
||||||
setUpColorAll: {},
|
|
||||||
navigationBarTitleTextColor: '',
|
|
||||||
mainBodyBg: '',
|
|
||||||
navigationBarTitleTextBackColor: '',
|
|
||||||
bodyReadingHeight: 0,
|
|
||||||
scrollReadingHeight: 0,
|
|
||||||
// 内容背景
|
|
||||||
bodyReadingBg: '',
|
|
||||||
// 底部安全区
|
|
||||||
bottomSecureHeight: 0,
|
|
||||||
tabBarPopupShow: false,
|
|
||||||
readingPopupshow: false,
|
|
||||||
stepUpPopupShow: false,
|
|
||||||
directoryPopupShow: false,
|
|
||||||
// bar 的icon
|
|
||||||
barPopupIcon: {},
|
|
||||||
dialogTextColor: '',
|
|
||||||
progressBg: '',
|
|
||||||
progressActiveBg: '',
|
|
||||||
setUpModeBlack: '',
|
|
||||||
dialogATextBg: '',
|
|
||||||
novelContentColor: '',
|
|
||||||
// 目录信息
|
|
||||||
booksDirectorySid: '2387',
|
|
||||||
booksDirectoryPage: 1,
|
|
||||||
newBooksDirectoryPage: [],
|
|
||||||
directoryList: [],
|
|
||||||
directoryPopupHeight: 0,
|
|
||||||
// 小说信息
|
|
||||||
novelReadingContentText: [],
|
|
||||||
defaultCharactersSize: 46,
|
|
||||||
newCharactersSize: 46,
|
|
||||||
defaultCharactersLineHeight: 2,
|
|
||||||
readDirectoryActive: '',
|
|
||||||
myData: [],
|
|
||||||
novelSwiperCurrent: 0,
|
|
||||||
computeRichText: '',
|
|
||||||
isScrollTop: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = this.booksDirectoryPage;
|
|
||||||
const newBooksDirectoryPage = [...this.newBooksDirectoryPage, booksDirectoryPage];
|
|
||||||
this.newBooksDirectoryPage = newBooksDirectoryPage;
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage);
|
|
||||||
this.isGetUserRead()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
isGetUserRead() {
|
|
||||||
this.readDirectoryActive = '1';
|
|
||||||
this.isGetBookInfo()
|
|
||||||
},
|
|
||||||
isGetBookInfo() {
|
|
||||||
const readDirectoryActive = this.readDirectoryActive;
|
|
||||||
const bodyReadingHeight = this.bodyReadingHeight;
|
|
||||||
const novelReadingContentText = this.myData[readDirectoryActive];
|
|
||||||
this.computeRichText = novelReadingContentText.content
|
|
||||||
|
|
||||||
const query = uni.createSelectorQuery().in(this);
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// query.select(`#compute_rich_text`).boundingClientRect(data => {
|
|
||||||
// console.log(data.height / bodyReadingHeight, "============")
|
|
||||||
// const swiperItemHeightObj = [{
|
|
||||||
// ...novelReadingContentText,
|
|
||||||
// swiperItemHeight: data.height,
|
|
||||||
// swiperItemPage: parseInt(data.height / bodyReadingHeight)
|
|
||||||
// }]
|
|
||||||
// this.novelReadingContentText = [...this.novelReadingContentText, ...
|
|
||||||
// swiperItemHeightObj
|
|
||||||
// ];
|
|
||||||
// console.log(this.novelReadingContentText, "=========")
|
|
||||||
// }).exec()
|
|
||||||
// })
|
|
||||||
//
|
|
||||||
this.novelReadingContentText = [novelReadingContentText];
|
|
||||||
// this.$nextTick(() => {query.select(`.novelReading_main #richText_${readDirectoryActive}`).boundingClientRect(
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// query.select(`#compute_rich_text`).boundingClientRect(
|
|
||||||
// data => {
|
|
||||||
// // const swiperItemHeightObj = {
|
|
||||||
// // ...this.swiperItemHeightObj,
|
|
||||||
// // id: readDirectoryActive,
|
|
||||||
// // swiperItemHeight: data.height,
|
|
||||||
// // swiperItemPage: data.height / bodyReadingHeight
|
|
||||||
// // }
|
|
||||||
// // this.swiperItemHeightObj = {
|
|
||||||
// // ...swiperItemHeightObj
|
|
||||||
// // };
|
|
||||||
// console.log(data.height, "==========")
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.isScrollTop = parseInt(data.height) - 8632;
|
|
||||||
// // this.isScrollTop = 0;
|
|
||||||
// this.novelReadingContentText = [this.myData[0], ...this
|
|
||||||
// .novelReadingContentText
|
|
||||||
// ];
|
|
||||||
// }, 2000)
|
|
||||||
// }).exec()
|
|
||||||
// })
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.novelReadingContentText = [this.myData[0], ...this.novelReadingContentText];
|
|
||||||
// }, 1000)
|
|
||||||
},
|
|
||||||
refresherTouchend() {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.novelReadingContentText = [this.myData[0], ...this.novelReadingContentText];
|
|
||||||
}, 1000)
|
|
||||||
},
|
|
||||||
// charactersUpper() {
|
|
||||||
// console.log("ooooooooooooooo")
|
|
||||||
// },
|
|
||||||
// charactersLower() {
|
|
||||||
// console.log("6666666666666")
|
|
||||||
// const readDirectoryActive = parseInt(this.readDirectoryActive) + 1;
|
|
||||||
// console.log(readDirectoryActive, this.myData, "6666666666666")
|
|
||||||
// const novelReadingContentText = this.myData[readDirectoryActive];
|
|
||||||
// this.readDirectoryActive = readDirectoryActive;
|
|
||||||
// this.novelReadingContentText = [...this.novelReadingContentText, novelReadingContentText];
|
|
||||||
// },
|
|
||||||
// charactersScroll(e) {
|
|
||||||
// console.log(e, "ee")
|
|
||||||
// const readDirectoryActive = this.readDirectoryActive;
|
|
||||||
// },
|
|
||||||
handelShowStepUp() {
|
|
||||||
this.tabBarPopupShow = !this.tabBarPopupShow;
|
|
||||||
this.readingPopupshow = !this.readingPopupshow;
|
|
||||||
this.stepUpPopupShow = false;
|
|
||||||
},
|
|
||||||
handelDirectoryPopup() {
|
|
||||||
this.directoryPopupShow = true;
|
|
||||||
},
|
|
||||||
directoryPopupClose() {
|
|
||||||
this.directoryPopupShow = false;
|
|
||||||
},
|
|
||||||
handelSteUpPopup() {
|
|
||||||
this.stepUpPopupShow = true;
|
|
||||||
},
|
|
||||||
tabBarPopupClose() {
|
|
||||||
this.tabBarPopupShow = false;
|
|
||||||
},
|
|
||||||
changNovelMainType(type) {
|
|
||||||
this.novelMainTypeColor = type;
|
|
||||||
this.initPage(type);
|
|
||||||
mySetStorage('novelMainTypeColor', type);
|
|
||||||
},
|
|
||||||
reduceCharactersSize() {
|
|
||||||
const newCharactersSize = this.newCharactersSize;
|
|
||||||
this.newCharactersSize = newCharactersSize - 2;
|
|
||||||
},
|
|
||||||
addCharactersSize() {
|
|
||||||
const newCharactersSize = this.newCharactersSize;
|
|
||||||
this.newCharactersSize = newCharactersSize + 2;
|
|
||||||
},
|
|
||||||
handelCharactersSize() {
|
|
||||||
const defaultCharactersSize = this.defaultCharactersSize;
|
|
||||||
this.newCharactersSize = defaultCharactersSize;
|
|
||||||
},
|
|
||||||
// 目录划到了最上边
|
|
||||||
directoryPopupUpper() {
|
|
||||||
const isBooksDirectoryPage = this.booksDirectoryPage;
|
|
||||||
const newBooksDirectoryPage = this.newBooksDirectoryPage;
|
|
||||||
if (isBooksDirectoryPage > 1 && newBooksDirectoryPage.indexOf(isBooksDirectoryPage) == -1) {
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = isBooksDirectoryPage - 1;
|
|
||||||
this.booksDirectoryPage = booksDirectoryPage
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage, 'upper')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 目录划到了最下边
|
|
||||||
directoryPopupLower() {
|
|
||||||
const isBooksDirectoryPage = this.booksDirectoryPage
|
|
||||||
const booksDirectorySid = this.booksDirectorySid;
|
|
||||||
const booksDirectoryPage = isBooksDirectoryPage + 1;
|
|
||||||
const newBooksDirectoryPage = [...this.newBooksDirectoryPage, booksDirectoryPage]
|
|
||||||
this.newBooksDirectoryPage = newBooksDirectoryPage;
|
|
||||||
this.booksDirectoryPage = booksDirectoryPage
|
|
||||||
this.isGetDirectory(booksDirectorySid, booksDirectoryPage, 'lower')
|
|
||||||
},
|
|
||||||
isGetDirectory(sid, page, type) {
|
|
||||||
uni.showLoading({
|
|
||||||
title: '加载中...'
|
|
||||||
});
|
|
||||||
const data = {
|
|
||||||
sid,
|
|
||||||
page,
|
|
||||||
// startOrder,
|
|
||||||
}
|
|
||||||
uni.$u.http.post('/getDirectory', data).then((res) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
if (res.status == 1) {
|
|
||||||
const directory = res.data.directory;
|
|
||||||
// const stage = res.data.stage;
|
|
||||||
// const directoryCount = res.data.directory_count;
|
|
||||||
let columnsLabel = ''
|
|
||||||
if (type == 'upper') {
|
|
||||||
this.directoryList = [...directory, ...this.directoryList];
|
|
||||||
} else if (type == 'lower') {
|
|
||||||
this.directoryList = [...this.directoryList, ...directory];
|
|
||||||
} else {
|
|
||||||
this.directoryList = directory;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch((err) => {
|
|
||||||
uni.hideLoading();
|
|
||||||
console.log(err, "========")
|
|
||||||
})
|
|
||||||
},
|
|
||||||
initPage(novelMainTypeColor) {
|
|
||||||
const mainBodyBg = setUpReadingColorAll[novelMainTypeColor].mainBodyBg;
|
|
||||||
this.navigationBarTitleTextColor = setUpReadingColorAll[novelMainTypeColor].navigationBarTitleTextColor;
|
|
||||||
this.mainBodyBg = mainBodyBg;
|
|
||||||
this.bodyReadingBg = mainBodyBg;
|
|
||||||
this.dialogTextColor = setUpReadingColorAll[novelMainTypeColor].dialogTextColor;
|
|
||||||
this.progressBg = setUpReadingColorAll[novelMainTypeColor].progressBg;
|
|
||||||
this.progressActiveBg = setUpReadingColorAll[novelMainTypeColor].progressActiveBg;
|
|
||||||
this.setUpModeBlack = set_up_mode_black;
|
|
||||||
this.dialogATextBg = setUpReadingColorAll[novelMainTypeColor].dialogATextBg;
|
|
||||||
this.tabBarTextColor = setUpReadingColorAll[novelMainTypeColor].tabBarTextColor;
|
|
||||||
this.novelContentColor = setUpReadingColorAll[novelMainTypeColor].novelContentColor;
|
|
||||||
this.navigationBarTitleTextBackColor = setUpReadingColorAll[novelMainTypeColor]
|
|
||||||
.navigationBarTitleTextBackColor;
|
|
||||||
},
|
|
||||||
rightClick() {
|
|
||||||
uni.navigateBack()
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
const novelMainTypeColor = myGetStorage('novelMainTypeColor') || 'F3EFE9';
|
|
||||||
const {
|
|
||||||
screenHeight = 0, statusBarHeight = 0, windowHeight = 0,
|
|
||||||
devicePixelRatio, windowBottom
|
|
||||||
} = isGetSystemInfo();
|
|
||||||
console.log(isGetSystemInfo(), "-----------");
|
|
||||||
console.log(myData, "myDatamyData")
|
|
||||||
this.myData = myData;
|
|
||||||
this.novelMainTypeColor = novelMainTypeColor;
|
|
||||||
this.bodyReadingHeight = screenHeight - statusBarHeight - devicePixelRatio * 22;
|
|
||||||
this.scrollReadingHeight = screenHeight - statusBarHeight - devicePixelRatio * 38;
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
this.directoryPopupHeight = screenHeight - statusBarHeight;
|
|
||||||
// #endif
|
|
||||||
// #ifdef H5 || MP-WEIXIN
|
|
||||||
this.directoryPopupHeight = screenHeight - statusBarHeight - devicePixelRatio * 22;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
this.bottomSecureHeight = screenHeight - windowHeight;
|
|
||||||
this.setUpColorAll = setUpReadingColorAll;
|
|
||||||
this.barPopupIcon = {
|
|
||||||
'F3EFE9': {
|
|
||||||
bookshelf_icon: bookshelf_f3efe,
|
|
||||||
directory_icon: directory_f3efe9,
|
|
||||||
step_up_icon: step_up_f3efe,
|
|
||||||
},
|
|
||||||
'CCD9E2': {
|
|
||||||
bookshelf_icon: bookshelf_ccd9e2,
|
|
||||||
directory_icon: directory_ccd9e2,
|
|
||||||
step_up_icon: step_up_ccd9e2,
|
|
||||||
},
|
|
||||||
'333333': {
|
|
||||||
bookshelf_icon: bookshelf_333,
|
|
||||||
directory_icon: directory_333,
|
|
||||||
step_up_icon: step_up_333
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.initPage(novelMainTypeColor);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
page {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.is_images {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mt40rpx {
|
|
||||||
margin-top: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content::v-deep.u-navbar__content__title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content::v-deep.u-navbar--fixed {
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content::v-deep.z-paging-content {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#compute_rich_text {
|
|
||||||
position: fixed;
|
|
||||||
top: 1500px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_content {
|
|
||||||
// display: flex;
|
|
||||||
// flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
// overflow: hidden;
|
|
||||||
|
|
||||||
.novelReading_body {
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
// height: 100%;
|
|
||||||
|
|
||||||
|
|
||||||
.novelReading_main_swiper {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.swiper_item_con {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.novelReading_main {
|
|
||||||
width: 100%;
|
|
||||||
padding: 32rpx 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.novelReading_characters_scroll {
|
|
||||||
width: 100%;
|
|
||||||
// padding: 32rpx 32rpx;
|
|
||||||
// box-sizing: border-box;
|
|
||||||
|
|
||||||
.novelReading_characters_main {
|
|
||||||
width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.my_tabBar_Reading {
|
|
||||||
width: 100%;
|
|
||||||
height: 140rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 24rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-top: 1rpx solid #d6d2ce;
|
|
||||||
|
|
||||||
.tabBar_Reading_item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
|
|
||||||
.reading_item_icon {
|
|
||||||
width: 34rpx;
|
|
||||||
height: 34rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_item_name {
|
|
||||||
font-size: 30rpx;
|
|
||||||
line-height: 1;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_box {
|
|
||||||
width: 100%;
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
|
|
||||||
.reading_schedule_body {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
padding: 40rpx 24rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: transparent;
|
|
||||||
|
|
||||||
.schedule_body_text {
|
|
||||||
font-size: 34rpx;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_slider {
|
|
||||||
width: 430rpx;
|
|
||||||
// height: 60rpx;
|
|
||||||
|
|
||||||
.slider {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_box {
|
|
||||||
width: 100%;
|
|
||||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
|
|
||||||
.step_up_box_body {
|
|
||||||
width: 100%;
|
|
||||||
padding: 40rpx 24rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: transparent;
|
|
||||||
|
|
||||||
.step_up_item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.step_up_item_name {
|
|
||||||
line-height: 1;
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 188rpx;
|
|
||||||
height: 74rpx;
|
|
||||||
border-radius: 37rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border: 2rpx solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_text_bg {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 188rpx;
|
|
||||||
height: 74rpx;
|
|
||||||
border-radius: 37rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg.activeBlack {
|
|
||||||
border-color: #1A1A1A;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_up_item_bg.activeWhite {
|
|
||||||
border-color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reading_schedule_slider::v-deep.uni-slider-handle-wrapper {
|
|
||||||
height: 60rpx;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
|
|
||||||
.uni-slider-track {
|
|
||||||
border-radius: 30rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.directory_popup_box {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-end;
|
|
||||||
width: 560rpx;
|
|
||||||
height: 100%;
|
|
||||||
padding: 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
._popup_box_item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 120rpx;
|
|
||||||
border-bottom: 1rpx solid #F2F2F2;
|
|
||||||
|
|
||||||
._item_name {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
._item_name.active {
|
|
||||||
color: #FF728F;
|
|
||||||
}
|
|
||||||
|
|
||||||
._item_chapter_lock {
|
|
||||||
width: 32rpx;
|
|
||||||
height: 32rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -189,7 +189,6 @@
|
|||||||
myGetStorage,
|
myGetStorage,
|
||||||
mySetStorage
|
mySetStorage
|
||||||
} from '@/utils/storage/index.js';
|
} from '@/utils/storage/index.js';
|
||||||
import myData from './data.js';
|
|
||||||
import CommBookLeftRigth from '@/components/commBookLeftRigth/index.vue'
|
import CommBookLeftRigth from '@/components/commBookLeftRigth/index.vue'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -720,7 +719,6 @@
|
|||||||
screenHeight = 0, statusBarHeight = 0, windowHeight = 0, devicePixelRatio, windowBottom, windowWidth,
|
screenHeight = 0, statusBarHeight = 0, windowHeight = 0, devicePixelRatio, windowBottom, windowWidth,
|
||||||
screenWidth
|
screenWidth
|
||||||
} = isGetSystemInfo();
|
} = isGetSystemInfo();
|
||||||
// this.myData = myData;
|
|
||||||
this.novelMainTypeColor = novelMainTypeColor;
|
this.novelMainTypeColor = novelMainTypeColor;
|
||||||
this.newCharactersSize = JSON.parse(novelMainObj).charactersSize || 26;
|
this.newCharactersSize = JSON.parse(novelMainObj).charactersSize || 26;
|
||||||
this.setUpColorAll = setUpReadingColorAll;
|
this.setUpColorAll = setUpReadingColorAll;
|
||||||
|
Before Width: | Height: | Size: 41 KiB |
BIN
unpackage/cache/wgt/__UNI__474F351/.manifest/google-keystore.keystore
vendored
Normal file
BIN
unpackage/cache/wgt/__UNI__474F351/.manifest/icon-android-hdpi.png
vendored
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
unpackage/cache/wgt/__UNI__474F351/.manifest/icon-android-xhdpi.png
vendored
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
unpackage/cache/wgt/__UNI__474F351/.manifest/icon-android-xxhdpi.png
vendored
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
unpackage/cache/wgt/__UNI__474F351/.manifest/icon-android-xxxhdpi.png
vendored
Normal file
After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 4.1 KiB |
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
var isReady=false;var onReadyCallbacks=[];
|
var isReady=false;var onReadyCallbacks=[];
|
||||||
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
||||||
var __uniConfig = {"pages":["pages/initialization/initialization","pages/bookCity/bookCity/index","pages/bookshelf/bookshelf/index","pages/login/login","pages/loginMobile/loginMobile","pages/classification/classification/index","pages/myInfo/myInfo/index","pages/myInfo/aboutMy/index","pages/myInfo/mySetUp/index","pages/myInfo/problemList/index","pages/myInfo/problemDetail/index","pages/voucherCenter/index","pages/readingRecords/index","pages/signInBookCurrency/index","pages/booksListAll/index","pages/booksTheCharts/index","pages/voucherCenterDetail/index","pages/bookCoinDetail/bookCoinDetail","pages/giveCoinDetail/giveCoinDetail","pages/booksSearchList/booksSearchList","pages/novelReading/novelReading","pages/booksReadingDetail/booksReadingDetail","pages/bookRecommendList/bookRecommendList"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"tabBar":{"backgroundColor":"#FFFFFF","borderStyle":"#F5F5F5","selectedColor":"#FF5000","iconWidth":"24px","color":"#666666","fontSize":"10px","height":"68px","list":[{"pagePath":"pages/bookshelf/bookshelf/index","text":"书架","iconPath":"/static/images/tabbar/bookshelf.png","selectedIconPath":"/static/images/tabbar/bookshelfActive.png"},{"pagePath":"pages/bookCity/bookCity/index","text":"书城","iconPath":"/static/images/tabbar/bookCity.png","selectedIconPath":"/static/images/tabbar/bookCityActive.png"},{"pagePath":"pages/classification/classification/index","text":"分类","iconPath":"/static/images/tabbar/classification.png","selectedIconPath":"/static/images/tabbar/classificationActive.png"},{"pagePath":"pages/myInfo/myInfo/index","text":"我的","iconPath":"/static/images/tabbar/myInfo.png","selectedIconPath":"/static/images/tabbar/myInfoActive.png"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"古言小说","compilerVersion":"3.8.12","entryPagePath":"pages/initialization/initialization","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
var __uniConfig = {"pages":["pages/initialization/initialization","pages/agreement/agreement","pages/bookCity/bookCity/index","pages/bookshelf/bookshelf/index","pages/login/login","pages/loginMobile/loginMobile","pages/classification/classification/index","pages/myInfo/myInfo/index","pages/myInfo/aboutMy/index","pages/myInfo/mySetUp/index","pages/myInfo/problemList/index","pages/myInfo/problemDetail/index","pages/voucherCenter/index","pages/readingRecords/index","pages/signInBookCurrency/index","pages/booksListAll/index","pages/booksTheCharts/index","pages/voucherCenterDetail/index","pages/bookCoinDetail/bookCoinDetail","pages/giveCoinDetail/giveCoinDetail","pages/booksSearchList/booksSearchList","pages/novelReading/novelReading","pages/booksReadingDetail/booksReadingDetail","pages/bookRecommendList/bookRecommendList"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"tabBar":{"backgroundColor":"#FFFFFF","borderStyle":"#F5F5F5","selectedColor":"#FF5000","iconWidth":"24px","color":"#666666","fontSize":"10px","height":"68px","list":[{"pagePath":"pages/bookshelf/bookshelf/index","text":"书架","iconPath":"/static/images/tabbar/bookshelf.png","selectedIconPath":"/static/images/tabbar/bookshelfActive.png"},{"pagePath":"pages/bookCity/bookCity/index","text":"书城","iconPath":"/static/images/tabbar/bookCity.png","selectedIconPath":"/static/images/tabbar/bookCityActive.png"},{"pagePath":"pages/classification/classification/index","text":"分类","iconPath":"/static/images/tabbar/classification.png","selectedIconPath":"/static/images/tabbar/classificationActive.png"},{"pagePath":"pages/myInfo/myInfo/index","text":"我的","iconPath":"/static/images/tabbar/myInfo.png","selectedIconPath":"/static/images/tabbar/myInfoActive.png"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"古言小说","compilerVersion":"3.8.12","entryPagePath":"pages/initialization/initialization","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
||||||
var __uniRoutes = [{"path":"/pages/initialization/initialization","meta":{"isQuit":true},"window":{"navigationBarTitleText":"","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/bookCity/bookCity/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"书城","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/bookshelf/bookshelf/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"书架","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/login/login","meta":{},"window":{"navigationBarTitleText":"","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/loginMobile/loginMobile","meta":{},"window":{"navigationBarTitleText":"","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/classification/classification/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"分类","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/myInfo/myInfo/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的","bounce":"none"}},{"path":"/pages/myInfo/aboutMy/index","meta":{},"window":{"navigationBarTitleText":"关于我们","bounce":"none"}},{"path":"/pages/myInfo/mySetUp/index","meta":{},"window":{"navigationBarTitleText":"设置","bounce":"none"}},{"path":"/pages/myInfo/problemList/index","meta":{},"window":{"navigationBarTitleText":"常见问题","bounce":"none"}},{"path":"/pages/myInfo/problemDetail/index","meta":{},"window":{"navigationBarTitleText":"常见问题","bounce":"none"}},{"path":"/pages/voucherCenter/index","meta":{},"window":{"navigationBarTitleText":"充值中心","bounce":"none"}},{"path":"/pages/readingRecords/index","meta":{},"window":{"navigationBarTitleText":"阅读记录","bounce":"none"}},{"path":"/pages/signInBookCurrency/index","meta":{},"window":{"navigationBarTitleText":"签到领取书币","navigationStyle":"custom","navigationBarTextStyle":"white","bounce":"none"}},{"path":"/pages/booksListAll/index","meta":{},"window":{"navigationBarTitleText":"","bounce":"none"}},{"path":"/pages/booksTheCharts/index","meta":{},"window":{"navigationBarTitleText":"","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/voucherCenterDetail/index","meta":{},"window":{"navigationBarTitleText":"充值记录","bounce":"none"}},{"path":"/pages/bookCoinDetail/bookCoinDetail","meta":{},"window":{"navigationBarTitleText":"书币明细","bounce":"none"}},{"path":"/pages/giveCoinDetail/giveCoinDetail","meta":{},"window":{"navigationBarTitleText":"赠币明细","bounce":"none"}},{"path":"/pages/booksSearchList/booksSearchList","meta":{},"window":{"navigationBarTitleText":"搜索","bounce":"none"}},{"path":"/pages/novelReading/novelReading","meta":{},"window":{"navigationBarTitleText":"","navigationStyle":"custom","enablePullDownRefresh":false,"bounce":"none"}},{"path":"/pages/booksReadingDetail/booksReadingDetail","meta":{},"window":{"navigationBarTitleText":"","bounce":"none"}},{"path":"/pages/bookRecommendList/bookRecommendList","meta":{},"window":{"navigationBarTitleText":"","bounce":"none"}}];
|
var __uniRoutes = [{"path":"/pages/initialization/initialization","meta":{"isQuit":true},"window":{"navigationBarTitleText":"","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/agreement/agreement","meta":{},"window":{"navigationBarTitleText":"","bounce":"none","safearea":{"background":"#FFFFFF","bottom":{"offset":"auto"}}}},{"path":"/pages/bookCity/bookCity/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"书城","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/bookshelf/bookshelf/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"书架","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/login/login","meta":{},"window":{"navigationBarTitleText":"","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/loginMobile/loginMobile","meta":{},"window":{"navigationBarTitleText":"","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/classification/classification/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"分类","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/myInfo/myInfo/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的","bounce":"none"}},{"path":"/pages/myInfo/aboutMy/index","meta":{},"window":{"navigationBarTitleText":"关于我们","bounce":"none"}},{"path":"/pages/myInfo/mySetUp/index","meta":{},"window":{"navigationBarTitleText":"设置","bounce":"none"}},{"path":"/pages/myInfo/problemList/index","meta":{},"window":{"navigationBarTitleText":"常见问题","bounce":"none"}},{"path":"/pages/myInfo/problemDetail/index","meta":{},"window":{"navigationBarTitleText":"常见问题","bounce":"none"}},{"path":"/pages/voucherCenter/index","meta":{},"window":{"navigationBarTitleText":"充值中心","bounce":"none"}},{"path":"/pages/readingRecords/index","meta":{},"window":{"navigationBarTitleText":"阅读记录","bounce":"none"}},{"path":"/pages/signInBookCurrency/index","meta":{},"window":{"navigationBarTitleText":"签到领取书币","navigationStyle":"custom","navigationBarTextStyle":"white","bounce":"none"}},{"path":"/pages/booksListAll/index","meta":{},"window":{"navigationBarTitleText":"","bounce":"none"}},{"path":"/pages/booksTheCharts/index","meta":{},"window":{"navigationBarTitleText":"","navigationStyle":"custom","bounce":"none"}},{"path":"/pages/voucherCenterDetail/index","meta":{},"window":{"navigationBarTitleText":"充值记录","bounce":"none"}},{"path":"/pages/bookCoinDetail/bookCoinDetail","meta":{},"window":{"navigationBarTitleText":"书币明细","bounce":"none"}},{"path":"/pages/giveCoinDetail/giveCoinDetail","meta":{},"window":{"navigationBarTitleText":"赠币明细","bounce":"none"}},{"path":"/pages/booksSearchList/booksSearchList","meta":{},"window":{"navigationBarTitleText":"搜索","bounce":"none"}},{"path":"/pages/novelReading/novelReading","meta":{},"window":{"navigationBarTitleText":"","navigationStyle":"custom","enablePullDownRefresh":false,"bounce":"none"}},{"path":"/pages/booksReadingDetail/booksReadingDetail","meta":{},"window":{"navigationBarTitleText":"","bounce":"none"}},{"path":"/pages/bookRecommendList/bookRecommendList","meta":{},"window":{"navigationBarTitleText":"","bounce":"none"}}];
|
||||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
|
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
|
||||||
|
@ -1 +1 @@
|
|||||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__474F351","name":"古言小说","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"safearea":{"background":"#F5F6F9","bottom":{"offset":"none|auto"}},"bounce":"none","usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"D:\\project_web\\app_ancientSayings\\unpackage\\res\\icons\\72x72.png","xhdpi":"D:\\project_web\\app_ancientSayings\\unpackage\\res\\icons\\96x96.png","xxhdpi":"D:\\project_web\\app_ancientSayings\\unpackage\\res\\icons\\144x144.png","xxxhdpi":"D:\\project_web\\app_ancientSayings\\unpackage\\res\\icons\\192x192.png"},"ios":{"appstore":"appstore.png","ipad":{"app":"icon-ipad-app.png","app@2x":"icon-ipad-app@2x.png","notification":"icon-ipad-notification.png","notification@2x":"icon-ipad-notification@2x.png","proapp@2x":"icon-ipad-proapp@2x.png","settings":"icon-ipad-settings.png","settings@2x":"icon-ipad-settings@2x.png","spotlight":"icon-ipad-spotlight.png","spotlight@2x":"icon-ipad-spotlight@2x.png"},"iphone":{"app@2x":"icon-iphone-app@2x.png","app@3x":"icon-iphone-app@3x.png","notification@2x":"icon-iphone-notification@2x.png","notification@3x":"icon-iphone-notification@3x.png","settings@2x":"icon-iphone-settings@2x.png","settings@3x":"icon-iphone-settings@3x.png","spotlight@2x":"icon-iphone-spotlight@2x.png","spotlight@3x":"icon-iphone-spotlight@3x.png"},"prerendered":"false"}},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"custompermissions":true},"apple":{"dSYMs":false,"appid":"com.gygsh.app","password":"ep/Tdjka4Y7WYqDB6/S7dw==","mobileprovision":"apple-mobileprovision.mobileprovision","p12":"apple-private.p12","devices":"iphone","plistcmds":["Add :UIFileSharingEnabled bool true"]},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"debug":true,"syncDebug":true,"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.8.12","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"backgroundColor":"#FFFFFF","borderStyle":"#F5F5F5","selectedColor":"#FF5000","iconWidth":"24px","color":"#666666","fontSize":"10px","height":"68px","list":[{"pagePath":"pages/bookshelf/bookshelf/index","text":"书架","iconPath":"/static/images/tabbar/bookshelf.png","selectedIconPath":"/static/images/tabbar/bookshelfActive.png"},{"pagePath":"pages/bookCity/bookCity/index","text":"书城","iconPath":"/static/images/tabbar/bookCity.png","selectedIconPath":"/static/images/tabbar/bookCityActive.png"},{"pagePath":"pages/classification/classification/index","text":"分类","iconPath":"/static/images/tabbar/classification.png","selectedIconPath":"/static/images/tabbar/classificationActive.png"},{"pagePath":"pages/myInfo/myInfo/index","text":"我的","iconPath":"/static/images/tabbar/myInfo.png","selectedIconPath":"/static/images/tabbar/myInfoActive.png"}]},"launch_path":"__uniappview.html","adid":"122850200207"}}
|
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__474F351","name":"古言小说","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"safearea":{"background":"#F5F6F9","bottom":{"offset":"none|auto"}},"bounce":"none","usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNI474F351","aliasname":"com.gyjc.app","password":"ep/Tdjka4Y7WYqDB6/S7dw==","keystore":"google-keystore.keystore","custompermissions":true},"apple":{"dSYMs":false,"plistcmds":["Add :UIFileSharingEnabled bool true"],"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"debug":true,"syncDebug":true,"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.8.12","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"backgroundColor":"#FFFFFF","borderStyle":"#F5F5F5","selectedColor":"#FF5000","iconWidth":"24px","color":"#666666","fontSize":"10px","height":"68px","list":[{"pagePath":"pages/bookshelf/bookshelf/index","text":"书架","iconPath":"/static/images/tabbar/bookshelf.png","selectedIconPath":"/static/images/tabbar/bookshelfActive.png"},{"pagePath":"pages/bookCity/bookCity/index","text":"书城","iconPath":"/static/images/tabbar/bookCity.png","selectedIconPath":"/static/images/tabbar/bookCityActive.png"},{"pagePath":"pages/classification/classification/index","text":"分类","iconPath":"/static/images/tabbar/classification.png","selectedIconPath":"/static/images/tabbar/classificationActive.png"},{"pagePath":"pages/myInfo/myInfo/index","text":"我的","iconPath":"/static/images/tabbar/myInfo.png","selectedIconPath":"/static/images/tabbar/myInfoActive.png"}]},"launch_path":"__uniappview.html","adid":"122850200207"}}
|
BIN
unpackage/debug/android_debug.apk
Normal file
8
unpackage/dist/build/app-plus/app-service.js
vendored
2
unpackage/dist/build/app-plus/app-view.js
vendored
4567
unpackage/dist/dev/app-plus/app-service.js
vendored
8912
unpackage/dist/dev/app-plus/app-view.js
vendored
@ -1,75 +0,0 @@
|
|||||||
// 引入配置
|
|
||||||
import config from '@/config/index';
|
|
||||||
import {
|
|
||||||
myGetStorage
|
|
||||||
} from '@/utils/storage/index.js'
|
|
||||||
|
|
||||||
const requestInterceptors = (vm) => {
|
|
||||||
/**
|
|
||||||
* 请求拦截
|
|
||||||
* @param {Object} http
|
|
||||||
*/
|
|
||||||
uni.$u.http.interceptors.request.use((config) => {
|
|
||||||
// 可使用async await 做异步操作
|
|
||||||
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
|
|
||||||
config.data = config.data || {};
|
|
||||||
const token = myGetStorage('token');
|
|
||||||
// config?.custom?.token &&
|
|
||||||
if (token) {
|
|
||||||
config.header.token = token;
|
|
||||||
}
|
|
||||||
// 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
|
|
||||||
// console.log(vm.$store.state);
|
|
||||||
return config
|
|
||||||
}, (config) => {
|
|
||||||
// 可使用async await 做异步操作
|
|
||||||
return Promise.reject(config)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const responseInterceptors = (vm) => {
|
|
||||||
/**
|
|
||||||
* 响应拦截
|
|
||||||
* @param {Object} http
|
|
||||||
*/
|
|
||||||
uni.$u.http.interceptors.response.use((response) => {
|
|
||||||
/* 对响应成功做点什么 可使用async await 做异步操作*/
|
|
||||||
const data = response.data
|
|
||||||
console.log(response, "============")
|
|
||||||
// 自定义参数
|
|
||||||
const custom = response.config?.custom
|
|
||||||
// // 服务端返回的状态码不等于200,则reject()
|
|
||||||
if (data.status !== 1) {
|
|
||||||
// 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示
|
|
||||||
if (custom.toast !== false) {
|
|
||||||
uni.$u.toast(data.message)
|
|
||||||
}
|
|
||||||
// 如果需要catch返回,则进行reject
|
|
||||||
if (custom?.catch) {
|
|
||||||
return new Promise(() => {})
|
|
||||||
} else {
|
|
||||||
// 否则返回一个pending中的promise
|
|
||||||
return Promise.reject(data)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return data || {}
|
|
||||||
}, (response) => {
|
|
||||||
/* 对响应错误做点什么 (statusCode !== 200)*/
|
|
||||||
return Promise.reject(response)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化请求配置
|
|
||||||
const initRequest = (vm) => {
|
|
||||||
uni.$u.http.setConfig((defaultConfig) => {
|
|
||||||
/* defaultConfig 为默认全局配置 */
|
|
||||||
defaultConfig.baseURL = config.baseUrl;
|
|
||||||
/* 根域名 */
|
|
||||||
defaultConfig.header = config.header;
|
|
||||||
return defaultConfig
|
|
||||||
})
|
|
||||||
requestInterceptors()
|
|
||||||
responseInterceptors()
|
|
||||||
}
|
|
||||||
export {
|
|
||||||
initRequest
|
|
||||||
}
|
|