This commit is contained in:
@fawn-nine
2023-03-17 18:12:24 +08:00
parent ffa17b7630
commit 8aabbd6bf5
6 changed files with 201 additions and 72 deletions

View File

@@ -816,8 +816,6 @@
.operate { .operate {
display: flex; display: flex;
.goBuy { .goBuy {
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: #fff;

View File

@@ -90,7 +90,7 @@
<!-- 充值协议 --> <!-- 充值协议 -->
<u-popup :show="xieyiShow" :round="10" @close="xieyiShow=false"> <u-popup :show="xieyiShow" :round="10" @close="xieyiShow=false">
<view class="tanchu"> <view class="tanchu">
<view class="dp_title">会员服务协议</view> <view class="dp_title">{{xieyi.title}}</view>
<view style="max-height: 1000rpx;overflow-y: scroll;"> <view style="max-height: 1000rpx;overflow-y: scroll;">
<view v-html="xieyi.content"></view> <view v-html="xieyi.content"></view>
</view> </view>
@@ -345,6 +345,7 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/style/mixin.scss'; @import '@/style/mixin.scss';
.highlight{color: $uni-color-primary;}
.agreeRadio{ zoom: .8;} .agreeRadio{ zoom: .8;}
.tanchu { .tanchu {
padding: 40rpx 30rpx 40rpx 30rpx; padding: 40rpx 30rpx 40rpx 30rpx;

View File

@@ -67,7 +67,7 @@
<!-- 充值协议 --> <!-- 充值协议 -->
<u-popup :show="xieyiShow" :round="10" @close="xieyiShow=false"> <u-popup :show="xieyiShow" :round="10" @close="xieyiShow=false">
<view class="tanchu"> <view class="tanchu">
<view class="dp_title">增值服务协议</view> <view class="dp_title">{{xieyi.title}}</view>
<view style="max-height: 1000rpx;overflow-y: scroll;"> <view style="max-height: 1000rpx;overflow-y: scroll;">
<view v-html="xieyi.content"></view> <view v-html="xieyi.content"></view>
</view> </view>

View File

@@ -51,13 +51,15 @@
<!-- 垂直翻页 --> <!-- 垂直翻页 -->
<!-- @click="showMenu" --> <!-- @click="showMenu" -->
<view class="vertical" v-if="isVertical"> <view class="vertical" v-if="isVerticalHua">
<view class="verticalbox" :class="{ container0: background === 1, container1: background === 2 }" <view class="verticalbox" :class="{ container0: background === 1, container1: background === 2 }"
@click="showMenu"> @click="showMenu">
<!-- 章节名 --> <!-- 章节名 -->
<view class="chapter">{{ verticalData.chapterName }}</view> <view class="chapter">
{{ verticalData.chapterName }}
</view>
<scroll-view :scroll-anchoring="true" scroll-y="true" :scroll-top="scrollTop" scroll-with-animation="true" style="height: 600px; " <scroll-view :scroll-anchoring="true" scroll-y="true" :scroll-top="scrollTop" scroll-with-animation="true" style="height: 600px; "
@scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower" @scroll="scroll" @touchend="touchEnd" @touchstart="touchStart"> @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower" @scroll="scroll" >
<view class="content"> <view class="content">
<view class="inner-box" :style="{ height: `${innerHeight}px` }" v-if="verticalData.canRead"> <view class="inner-box" :style="{ height: `${innerHeight}px` }" v-if="verticalData.canRead">
<view> <view>
@@ -146,7 +148,9 @@
boxShadow: showShadow && turnType === 0 ? '0 0 10px 0 rgba(0,0,0,.4)' : '' boxShadow: showShadow && turnType === 0 ? '0 0 10px 0 rgba(0,0,0,.4)' : ''
}" @touchstart="touchStart" @touchend="touchEnd" @touchmove="touchMove" @touchcancel="touchcancel"> }" @touchstart="touchStart" @touchend="touchEnd" @touchmove="touchMove" @touchcancel="touchcancel">
<!-- 章节名 --> <!-- 章节名 -->
<view class="chapter">{{ curPage.chapterName }}</view> <view class="chapter">{{ curPage.chapterName }}
<uni-icons v-if="newchapterImgList && newchapterImgList.length > 0" id="showImgs" @click="showImgHandle" class="showImgs" type="images" size="20"></uni-icons>
</view>
<view class="content"> <view class="content">
<view class="inner-box" :style="{ height: `${innerHeight}px` }" v-if="curPage.canRead"> <view class="inner-box" :style="{ height: `${innerHeight}px` }" v-if="curPage.canRead">
<view class="book-inner" > <view class="book-inner" >
@@ -312,14 +316,18 @@
<view class="line" :class="{ lineActive: lineHeight === 2 }" v-for="i in 3" :key="i"></view> <view class="line" :class="{ lineActive: lineHeight === 2 }" v-for="i in 3" :key="i"></view>
</view> </view>
</view> </view>
<view class="item"> <view class="item" >
<view class="item-name">翻页</view> <view class="item-name" style="display: block; width: 45px;">翻页</view>
<view class="icon" :class="{ active: turnType === 0 }" style="padding: 5px 8px;" <view style="display: flex; flex-grow: 1" class="item_wrap">
<view class="icon" :class="{ active: turnType === 0 }" style="padding: 5px 8px; margin-bottom: 6px;"
@click="changeTurnType(0)">覆盖</view> @click="changeTurnType(0)">覆盖</view>
<view class="icon" :class="{ active: turnType === 1 }" style="padding: 5px 8px;" <view class="icon" :class="{ active: turnType === 1 }" style="padding: 5px 8px; margin-bottom: 6px;"
@click="changeTurnType(1)">左右平移</view> @click="changeTurnType(1)">左右平移</view>
<!-- <view class="icon" :class="{ active: turnType === 2 }" style="padding: 5px 8px;" <view class="icon" :class="{ active: turnType === 2 }" style="padding: 5px 8px; margin-bottom: 6px;"
@click="changeTurnType(2)">上下平移</view> --> @click="changeTurnType(2)">上下平移</view>
<view class="icon" :class="{ active: turnType === 3 }" style="padding: 5px 8px; margin-bottom: 6px;"
@click="changeTurnType(3)">上下滑动</view>
</view>
</view> </view>
<view class="item"> <view class="item">
<view class="item-name">背景</view> <view class="item-name">背景</view>
@@ -346,6 +354,21 @@
</virtual-list> </virtual-list>
</view> </view>
</view> </view>
<!-- 图片弹窗 -->
<u-popup :show="imgsShow" :round="10" @close="imgsShow=false">
<view class="tanchu" v-if="newchapterImgList">
<text class="chapterImgTitle">当前章节共 {{newchapterImgList.length}} 张图片</text>
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="120" @scrolltolower="toRight">
<view v-for="(item,index) in newchapterImgList" class="scroll-view-item_H">
<view class="imgBox">
<view style="height:90%" @click="clickImg(newchapterImgList,index)">
<img :src="item" alt="" height="100%"></view>
<!-- <text class="nothingShow" v-if="index == newchapterImgList.length-1">已最后一张图片</text> -->
</view>
</view>
</scroll-view>
</view>
</u-popup>
</view> </view>
</template> </template>
@@ -362,6 +385,8 @@
let copyBookText = [] let copyBookText = []
let preText = [] let preText = []
let nextText = [] let nextText = []
let imglist = []
// var music = uni.createInnerAudioContext(); // var music = uni.createInnerAudioContext();
export default { export default {
components: { components: {
@@ -370,6 +395,11 @@
}, },
data() { data() {
return { return {
imgsShow:false,
nothingShow:false,
// 本章图片列表
chapterImgList:[],
newchapterImgList:[],
preChapterTotal : null, preChapterTotal : null,
nextChapterTotal :null, nextChapterTotal :null,
// preBookText = [] // preBookText = []
@@ -524,7 +554,7 @@
lineHeight: '', //行高注意是fontSize的倍数 lineHeight: '', //行高注意是fontSize的倍数
background: '', //背景 background: '', //背景
colorList: ['#000', '#666'], //与背景对应的字体颜色 colorList: ['#000', '#666'], //与背景对应的字体颜色
highlight: "", // 字体高亮 highlight: "null", // 字体高亮
fhighlight: false, // 左右的高亮 fhighlight: false, // 左右的高亮
chapterProgress: 0, //‘章节进度条’的参数 chapterProgress: 0, //‘章节进度条’的参数
progressTouched: false, //是否正在点击‘章节进度条’ progressTouched: false, //是否正在点击‘章节进度条’
@@ -543,6 +573,7 @@
isBuy: 0, isBuy: 0,
isVip: 0, isVip: 0,
}, },
isVerticalHua:false,
speedTrue: false, //判断是否更新进度 speedTrue: false, //判断是否更新进度
speedData: { speedData: {
bookId: 0, bookId: 0,
@@ -560,6 +591,9 @@
width: 0, width: 0,
before: false before: false
}, },
topChange:0,
scroll_end: false,
musicPlaying: false // 正在播放音频
} }
}, },
@@ -594,14 +628,45 @@
...mapState(['userInfo']), ...mapState(['userInfo']),
}, },
methods: { methods: {
clickImg(item,index){
// 点击图片
let imgarr = this.newchapterImgList.map(item => item)
console.log(imgarr,'imgarr')
this.imgsShow = false
uni.previewImage({
current:index,
urls: imgarr
})
},
toRight(){
this.nothingShow = true
},
showImgHandle(){
this.imgsShow = true
},
scroll: function(e) { scroll: function(e) {
// this.oldType = "Vertical" // this.oldType = "Vertical"
// console.log(e.detail) // setTimeout(() => {
// //console.log(e.detail)
// this.topChange = e.detail.scrollTop
// },2000)
// this.scrollTop = e.detail.scrollTop // this.scrollTop = e.detail.scrollTop
// this.scrollTop1 = e.detail.scrollTop // this.scrollTop1 = e.detail.scrollTop
// 计算当前的page // 计算当前的page
// this.page = parseInt(e.detail.scrollTop / (this.NumCol * this.lineHeight * this.fontSize)) // this.page = parseInt(e.detail.scrollTop / (this.NumCol * this.lineHeight * this.fontSize))
// this.scroll_end = false;
// const that = this;
// this.scrollTop = e.detail.scrollTop;
// clearTimeout(timer);
// var timer = setTimeout(function(){
// if( e.detail.scrollTop === that.scrollTop ){
// that.scroll_end = true;
// console.log(that.scroll_end,"是否结束",e.detail.scrollTop, "data", that.scrollTop )
// clearTimeout(timer);
// timer = null; // 处理回收
// }
// }, 500)
}, },
bookMessage() { bookMessage() {
this.$http this.$http
@@ -661,11 +726,14 @@
let arr = [] //数组每一项代表一行 let arr = [] //数组每一项代表一行
// console.log(copyBookText,'拆分前') // console.log(copyBookText,'拆分前')
let isbiaodian = false let isbiaodian = false
this.chapterImgList = []
copyBookText.map((res, index) => { copyBookText.map((res, index) => {
res.picAndWord = '' + res.picAndWord res.content = '' + res.content
if (res.picAndWord.length > colSize - 2) { // console.log(res.picAndWord)
if (res.content.length > colSize - 2) {
//colSize - 2 段落首行空格
// 判断是否下一行以标点开始 // 判断是否下一行以标点开始
let nextString = res.picAndWord.substr(colSize-2, 1) let nextString = res.content.substr(colSize-2, 1)
let haveBiao = 0 let haveBiao = 0
for (var i=0; i < this.biaodian.length; i++) { for (var i=0; i < this.biaodian.length; i++) {
if(nextString == this.biaodian[i]) { if(nextString == this.biaodian[i]) {
@@ -673,14 +741,36 @@
} }
} }
//console.log(haveBiao, nextString, 'isbiaodian') //console.log(haveBiao, nextString, 'isbiaodian')
arr.push({'paragraph':index,'list':res.picAndWord.substr(0, colSize - 2 - haveBiao), 'level':0, class:'jushou'}) arr.push({'paragraph':index,'list':res.content.substr(0, colSize - 2 - haveBiao), 'level':0, class:'jushou'})
let text = res.picAndWord.substr(colSize - 2 - haveBiao ) let text = res.content.substr(colSize - 2 - haveBiao )
that.aginForget(text, arr, colSize, index) that.aginForget(text, arr, colSize, index)
} else { } else {
arr.push({'paragraph':index,list:res.picAndWord.substr(0, colSize - 2), 'level':0, class:'jushou'}) arr.push({'paragraph':index,list:res.content.substr(0, colSize - 2), 'level':0, class:'jushou'})
} }
let picAndWord = res.otherContent
// let reg = new RegExp('(?<=(img src="))[^"]*?(?=")/gi)')
//let RegEx = /(?<=(img src="))[^"]*?(?=")/gims
// let imgArr = picAndWord.match(reg)
let imgArr = picAndWord
// let imgArr = picAndWord.match(/src*?\/g)
this.chapterImgList[index] = imgArr
}) })
// 过滤图片数据
let arr3 = []
this.chapterImgList.map((item,index) =>
{
if(item != null && item != ''){
// console.log(item,'item')
arr3.push(item)
}
}
)
this.newchapterImgList = arr3
console.log(this.newchapterImgList, 'newchapterImgList')
copyBookText = arr copyBookText = arr
// console.log(copyBookText,'copyBookText') // console.log(copyBookText,'copyBookText')
this.getSizePage(NumCol) this.getSizePage(NumCol)
@@ -691,10 +781,10 @@
// console.log(copyBookText,'拆分前') // console.log(copyBookText,'拆分前')
let isbiaodian = false let isbiaodian = false
preText.map((res, index) => { preText.map((res, index) => {
res.picAndWord = '' + res.picAndWord res.content = '' + res.content
if (res.picAndWord.length > colSize - 2) { if (res.content.length > colSize - 2) {
// 判断是否下一行以标点开始 // 判断是否下一行以标点开始
let nextString = res.picAndWord.substr(colSize-2, 1) let nextString = res.content.substr(colSize-2, 1)
let haveBiao = 0 let haveBiao = 0
for (var i=0; i < this.biaodian.length; i++) { for (var i=0; i < this.biaodian.length; i++) {
if(nextString == this.biaodian[i]) { if(nextString == this.biaodian[i]) {
@@ -702,12 +792,12 @@
} }
} }
//console.log(haveBiao, nextString, 'isbiaodian') //console.log(haveBiao, nextString, 'isbiaodian')
arr.push({'paragraph':index,'list':res.picAndWord.substr(0, colSize - 2 - haveBiao), 'level':0, class:'jushou'}) arr.push({'paragraph':index,'list':res.content.substr(0, colSize - 2 - haveBiao), 'level':0, class:'jushou'})
let text = res.picAndWord.substr(colSize - 2 - haveBiao ) let text = res.content.substr(colSize - 2 - haveBiao )
that.aginForget(text, arr, colSize, index) that.aginForget(text, arr, colSize, index)
} else { } else {
arr.push({'paragraph':index,list:res.picAndWord.substr(0, colSize - 2), 'level':0, class:'jushou'}) arr.push({'paragraph':index,list:res.content.substr(0, colSize - 2), 'level':0, class:'jushou'})
} }
}) })
preText = arr preText = arr
@@ -720,10 +810,10 @@
// console.log(copyBookText,'拆分前') // console.log(copyBookText,'拆分前')
let isbiaodian = false let isbiaodian = false
nextText.map((res, index) => { nextText.map((res, index) => {
res.picAndWord = '' + res.picAndWord res.content = '' + res.content
if (res.picAndWord.length > colSize - 2) { if (res.content.length > colSize - 2) {
// 判断是否下一行以标点开始 // 判断是否下一行以标点开始
let nextString = res.picAndWord.substr(colSize-2, 1) let nextString = res.content.substr(colSize-2, 1)
let haveBiao = 0 let haveBiao = 0
for (var i=0; i < this.biaodian.length; i++) { for (var i=0; i < this.biaodian.length; i++) {
if(nextString == this.biaodian[i]) { if(nextString == this.biaodian[i]) {
@@ -731,12 +821,12 @@
} }
} }
//console.log(haveBiao, nextString, 'isbiaodian') //console.log(haveBiao, nextString, 'isbiaodian')
arr.push({'paragraph':index,'list':res.picAndWord.substr(0, colSize - 2 - haveBiao), 'level':0, class:'jushou'}) arr.push({'paragraph':index,'list':res.content.substr(0, colSize - 2 - haveBiao), 'level':0, class:'jushou'})
let text = res.picAndWord.substr(colSize - 2 - haveBiao ) let text = res.content.substr(colSize - 2 - haveBiao )
that.aginForget(text, arr, colSize, index) that.aginForget(text, arr, colSize, index)
} else { } else {
arr.push({'paragraph':index,list:res.picAndWord.substr(0, colSize - 2), 'level':0, class:'jushou'}) arr.push({'paragraph':index,list:res.content.substr(0, colSize - 2), 'level':0, class:'jushou'})
} }
}) })
nextText = arr nextText = arr
@@ -770,10 +860,10 @@
// console.log(copyBookText,'拆分前') // console.log(copyBookText,'拆分前')
let isbiaodian = false let isbiaodian = false
this.tmpChapter.text.map((res, index) => { this.tmpChapter.text.map((res, index) => {
res.picAndWord = '' + res.picAndWord res.content = '' + res.content
if (res.picAndWord.length > colSize - 2) { if (res.content.length > colSize - 2) {
// 判断是否下一行以标点开始 // 判断是否下一行以标点开始
let nextString = res.picAndWord.substr(colSize-2, 1) let nextString = res.content.substr(colSize-2, 1)
let haveBiao = 0 let haveBiao = 0
for (var i=0; i < this.biaodian.length; i++) { for (var i=0; i < this.biaodian.length; i++) {
if(nextString == this.biaodian[i]) { if(nextString == this.biaodian[i]) {
@@ -781,12 +871,12 @@
} }
} }
//console.log(haveBiao, nextString, 'isbiaodian') //console.log(haveBiao, nextString, 'isbiaodian')
arr.push({'paragraph':index,'list':res.picAndWord.substr(0, colSize - 2 - haveBiao), 'level':0, class:'jushou'}) arr.push({'paragraph':index,'list':res.content.substr(0, colSize - 2 - haveBiao), 'level':0, class:'jushou'})
let text = res.picAndWord.substr(colSize - 2 - haveBiao ) let text = res.content.substr(colSize - 2 - haveBiao )
that.aginForget(text, arr, colSize, index) that.aginForget(text, arr, colSize, index)
} else { } else {
arr.push({'paragraph':index,list:res.picAndWord.substr(0, colSize - 2), 'level':0, class:'jushou'}) arr.push({'paragraph':index,list:res.content.substr(0, colSize - 2), 'level':0, class:'jushou'})
} }
}) })
this.tmpChapter.text = arr this.tmpChapter.text = arr
@@ -960,6 +1050,9 @@
if (this.turnType == 2) { if (this.turnType == 2) {
this.isVertical = true; this.isVertical = true;
} }
if (this.turnType == 3) {
this.isVerticalHua = true;
}
if (typeof this.turnType !== 'number') { if (typeof this.turnType !== 'number') {
this.turnType = 0 this.turnType = 0
} }
@@ -1214,14 +1307,18 @@
if (this.music.src) { if (this.music.src) {
setTimeout(() => { setTimeout(() => {
this.music.play(); //执行播放 this.music.play(); //执行播放
this.musicPlaying = true
}, 150) }, 150)
} }
// 音频播放结束 // 音频播放结束
this.music.onEnded(() => { this.music.onEnded(() => {
this.musicPlaying = false
if (this.domIndex == this.domList.length - 1) { if (this.domIndex == this.domList.length - 1) {
console.log('全部音频播放完毕'); console.log('全部音频播放完毕');
} else { } else {
console.log('音频播放结束2'); console.log('音频播放结束2');
this.addDomIndex() this.addDomIndex()
} }
}); });
@@ -1241,13 +1338,12 @@
return return
} }
}) })
console.log(paragraphindex, this.domIndex)
//return //return
if(this.domIndex > paragraphindex){ if(this.domIndex > paragraphindex){
this.goNextPage() this.goNextPage()
} }
},2000) },1000)
}, },
// 暂停事件 // 暂停事件
@@ -1255,19 +1351,22 @@
this.isPause = !this.isPause this.isPause = !this.isPause
if (this.isPause) { if (this.isPause) {
this.music.pause() this.music.pause()
this.musicPlaying = false
} else { } else {
this.music.play() this.music.play()
this.musicPlaying = true
} }
}, },
// 关闭听书 // 关闭听书
offAudio() { offAudio() {
this.music.stop(); this.music.stop();
// this.domIndex = 0; // this.domIndex = 0;
this.highlight = ""; this.highlight = "null";
this.fhighlight = false this.fhighlight = false
this.isAudioMenu = false; this.isAudioMenu = false;
this.isPause = false; this.isPause = false;
this.music = null; this.music = null;
this.musicPlaying = false
}, },
/** /**
@@ -1617,6 +1716,7 @@
* 触摸结束 * 触摸结束
**/ **/
touchEnd(e) { touchEnd(e) {
console.log(e,'e')
this.isTouch = false this.isTouch = false
this.showAnimation = true this.showAnimation = true
this.showShadow = false this.showShadow = false
@@ -1626,9 +1726,6 @@
delta = e.changedTouches[0].clientX - this.touchStartX; delta = e.changedTouches[0].clientX - this.touchStartX;
} else { } else {
delta = e.changedTouches[0].clientY - this.touchStartY; delta = e.changedTouches[0].clientY - this.touchStartY;
console.log(delta, '触摸结束')
this.scrollTop += -delta
console.log(this.scrollTop, 'scrollTop')
this.page = parseInt(this.scrollTop / (this.NumCol * this.lineHeight * this.fontSize)) this.page = parseInt(this.scrollTop / (this.NumCol * this.lineHeight * this.fontSize))
console.log(this.page, 'page') console.log(this.page, 'page')
//this.getNowReadIndex() //this.getNowReadIndex()
@@ -1640,8 +1737,9 @@
this.goPrePage() this.goPrePage()
} }
} else if (e.changedTouches[0].clientX > this.windowWidth / 3 * 2) { //点击屏幕右1/3为下一页 } else if (e.changedTouches[0].clientX > this.windowWidth / 3 * 2) { //点击屏幕右1/3为下一页
this.goNextPage() //if(e.changedTouches[0].clientY > 100){ // 显示弹窗
e.changedTouches[0].clientY > 100 ? this.goNextPage() : ''
//}
} else if (e.changedTouches[0].clientX <= this.windowWidth / 3 * 2 && e.changedTouches[0].clientX >= } else if (e.changedTouches[0].clientX <= this.windowWidth / 3 * 2 && e.changedTouches[0].clientX >=
this this
.windowWidth / 3) { //点击屏幕中间1/3为呼出菜单 .windowWidth / 3) { //点击屏幕中间1/3为呼出菜单
@@ -1752,7 +1850,7 @@
plus.navigator.setFullscreen(false); plus.navigator.setFullscreen(false);
// #endif // #endif
this.menuShow = true; this.menuShow = true;
if (this.music == null) { if (this.music == null && !this.isVerticalHua) {
this.musicManuShow = true; this.musicManuShow = true;
} else { } else {
this.musicManuShow = false; this.musicManuShow = false;
@@ -2387,22 +2485,32 @@
if (turnType === this.turnType) { if (turnType === this.turnType) {
return return
} else { } else {
if (this.oldType == "Vertical") {
// 从垂直改成’覆盖’ 或者 ’左右’
this.goToPage(this.page + 1)
this.oldType == null
}
this.showAnimation = false this.showAnimation = false
this.turnType = turnType; this.turnType = turnType;
uni.setStorageSync('turnType', this.turnType) uni.setStorageSync('turnType', this.turnType)
} }
if (turnType == 2) { if (turnType == 3) {
this.oldType = "Vertical" this.isVerticalHua = true
// 获取当前的domIndex // 如果正在播放音频 则暂停掉
this.getNowReadIndex() if(this.musicPlaying){
this.isVertical = true //console.log('正在播放音频')
this.music.pause()
this.highlight = "null";
this.isAudioMenu = false
}
uni.showModal({
title: '提示',
showCancel:false,
content: '当前阅读模式下,无听书功能,如想体验听书功能,请切换其他模式,并且阅读进度与其他模式不共享。',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
}
}
})
} else { } else {
this.isVertical = false this.isVerticalHua = false
} }
}, },
@@ -2555,7 +2663,7 @@
preText = this.tmpChapter.text preText = this.tmpChapter.text
this.mpcounlSystemInfo() this.mpcounlSystemInfo()
this.preChapterTotal = Math.floor(preText.length / this.NumCol) + 1 this.preChapterTotal = Math.floor(preText.length / this.NumCol) + 1
console.log(this.preChapterTotal,'上一章内容页数') // console.log(this.preChapterTotal,'上一章内容页数')
// 处理数据 // 处理数据
// //
@@ -2578,7 +2686,7 @@
nextText = this.tmpChapter.text nextText = this.tmpChapter.text
this.nextmpcounlSystemInfo() this.nextmpcounlSystemInfo()
this.nextChapterTotal = Math.floor(nextText.length / this.NumCol) + 1 this.nextChapterTotal = Math.floor(nextText.length / this.NumCol) + 1
console.log(this.nextChapterTotal,'下一章内容页数') // console.log(this.nextChapterTotal,'下一章内容页数')
} else { } else {
this.nextChapter = { this.nextChapter = {
ready: true, ready: true,
@@ -2683,16 +2791,38 @@
} }
}, },
beforeDestroy() { beforeDestroy() {
if(this.musicPlaying){
this.music.pause() this.music.pause()
}
}, },
onHide() { onHide() {
if(this.musicPlaying){
this.music.pause() this.music.pause()
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import url("@/pages/yRead/iconfont.css"); @import url("@/pages/yRead/iconfont.css");
.showImgs{ float: right; padding-right: 3px;}
.chapterImgTitle{display: block; ;color: #636363; text-align: center; font-size: 30rpx; margin: 10px 0;}
.scroll-view_H {
white-space: nowrap;
width: 100%;
.scroll-view-item_H {
display: inline-block;
width: 100%;
//height: 300rpx;
//line-height: 300rpx;
text-align: center;
font-size: 36rpx;
}
.imgBox{
height: 500rpx; overflow: hidden; padding:10px;
// img{height: 300rpx !important; width: unset;}
}
}
.scroll-Y{height: 600px;} .scroll-Y{height: 600px;}
page { page {
position: relative; position: relative;
@@ -2718,7 +2848,7 @@
height: 100%; height: 100%;
} }
} }
.nothingShow{display: block; height: 10%; font-size: 24rpx; color: #636363; margin: 10px 0; text-align: center;}
.listenitem { .listenitem {
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
@@ -3103,4 +3233,5 @@
height: 300rpx; height: 300rpx;
} }
.jushou{text-indent: 2em;} .jushou{text-indent: 2em;}
.item_wrap{flex-wrap: wrap;}
</style> </style>

View File

@@ -1 +0,0 @@
installed

Binary file not shown.