This commit is contained in:
lipnggao 2023-09-22 09:10:49 +08:00
parent b40f57b594
commit 99effad482
3 changed files with 23 additions and 77 deletions

View File

@ -190,9 +190,7 @@
readingPopupshow: false, readingPopupshow: false,
stepUpPopupShow: false, stepUpPopupShow: false,
purchaseFullShow: false, purchaseFullShow: false,
balanceShow: false,
navbarPopupShow:false, navbarPopupShow:false,
balanceTitle: '下一章,付费章节',
// bar icon // bar icon
barPopupIcon: {}, barPopupIcon: {},
dialogTextColor: '', dialogTextColor: '',
@ -216,15 +214,11 @@
newCharactersSize: 28, newCharactersSize: 28,
defaultCharactersLineHeight: 20, defaultCharactersLineHeight: 20,
readDirectoryActive: '', readDirectoryActive: '',
computeRichText: '',
computeRichTextWidth: 0,
refresherTriggered: false,
readChapterid: '', readChapterid: '',
readChapterFlag: false, readChapterFlag: false,
readChapterInfoObj: {}, readChapterInfoObj: {},
readChapterLastid: '', readChapterLastid: '',
readChapterNextid: '', readChapterNextid: '',
refresherEnabled: true,
}; };
}, },
onLoad(options) { onLoad(options) {
@ -324,12 +318,18 @@
if (readChapterInfoObj.chackpay == 1) { if (readChapterInfoObj.chackpay == 1) {
callback('success', readChapterInfoObj) callback('success', readChapterInfoObj)
} }
const obj = { if (readChapterInfoObj.chackpay == 2 || readChapterInfoObj.chackpay == 3) {
...readChapterInfoObj, const novelContentColor = this.novelContentColor;
custom, const newCharactersSize = this.newCharactersSize;
content: '' const bodyReadingBg = this.bodyReadingBg;
const custom = [`slot:test`];
const obj = {
...readChapterInfoObj,
custom,
content: ''
}
callback('success', obj)
} }
callback('success', obj)
} }
if (chapter > newReadDirectoryActive) { if (chapter > newReadDirectoryActive) {
const readChapterInfoObj = await this.isGetBookInfo(newReadChapterNextid); const readChapterInfoObj = await this.isGetBookInfo(newReadChapterNextid);
@ -338,27 +338,11 @@
if (readChapterInfoObj.chackpay == 1) { if (readChapterInfoObj.chackpay == 1) {
callback('success', readChapterInfoObj) callback('success', readChapterInfoObj)
} }
if (readChapterInfoObj.chackpay == 2) { if (readChapterInfoObj.chackpay == 2 || readChapterInfoObj.chackpay == 3) {
const novelContentColor = this.novelContentColor; const novelContentColor = this.novelContentColor;
const newCharactersSize = this.newCharactersSize; const newCharactersSize = this.newCharactersSize;
const bodyReadingBg = this.bodyReadingBg; const bodyReadingBg = this.bodyReadingBg;
// const custom = [`slot:test`];
const custom = [`slot:test`]
// const custom = [
// `<div class="balance_con">
// <div class="balance_con_rich_text"
// style="color:${novelContentColor};font-size:${newCharactersSize}px;"
// >${readChapterInfoObj.content}</div>
// <div class="balance_recharge_option"></div>
// <div class="balance_recharge" style="background:${bodyReadingBg}">
// <div class="balance_tips" style="color:${novelContentColor}">
// ${readChapterInfoObj.price}</div>
// <div class="balance_btn_all">
// <div class="purchaseFull_popup_btn" onclick="handelPurchaseFull"></div>
// </div>
// </div>
// </div>`
// ]
const obj = { const obj = {
...readChapterInfoObj, ...readChapterInfoObj,
custom, custom,
@ -460,9 +444,6 @@
url: `/pages/voucherCenter/index` url: `/pages/voucherCenter/index`
}) })
}, },
balanceCancel() {
this.balanceShow = false;
},
handelPurchaseFull() { handelPurchaseFull() {
const readChapterInfoObj = this.readChapterInfoObj; const readChapterInfoObj = this.readChapterInfoObj;
uni.showLoading({ uni.showLoading({
@ -477,8 +458,7 @@
uni.hideLoading(); uni.hideLoading();
if (res.status == 1) { if (res.status == 1) {
if (res.data.status == 2) { if (res.data.status == 2) {
this.balanceShow = true; console.log("购买失败")
this.balanceTitle = '';
} }
} }
}).catch((err) => { }).catch((err) => {
@ -487,7 +467,6 @@
}, },
// //
changNovelMainType(type) { changNovelMainType(type) {
this.novelMainTypeColor = type; this.novelMainTypeColor = type;
this.initPage(type); this.initPage(type);
const novelMainObj = myGetStorage('novelMainObj') || '{}'; const novelMainObj = myGetStorage('novelMainObj') || '{}';
@ -614,7 +593,6 @@
screenWidth screenWidth
} = isGetSystemInfo(); } = isGetSystemInfo();
// this.myData = myData; // this.myData = myData;
this.computeRichTextWidth = windowWidth;
this.novelMainTypeColor = novelMainTypeColor; this.novelMainTypeColor = novelMainTypeColor;
this.newCharactersSize = JSON.parse(novelMainObj).charactersSize || 28; this.newCharactersSize = JSON.parse(novelMainObj).charactersSize || 28;
this.bodyReadingHeight = screenHeight - statusBarHeight - devicePixelRatio * 22; this.bodyReadingHeight = screenHeight - statusBarHeight - devicePixelRatio * 22;
@ -729,13 +707,6 @@
position: relative; position: relative;
} }
#compute_rich_text {
position: fixed;
top: 1500px;
padding: 32rpx;
box-sizing: border-box;
}
.novelReading_content { .novelReading_content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -929,14 +900,14 @@
} }
} }
.reading_schedule_slider::v-deep.uni-slider-handle-wrapper { // .reading_schedule_slider::v-deep.uni-slider-handle-wrapper {
height: 60rpx; // height: 60rpx;
border-radius: 30rpx; // border-radius: 30rpx;
.uni-slider-track { // .uni-slider-track {
border-radius: 30rpx; // border-radius: 30rpx;
} // }
} // }
.directory_popup_box { .directory_popup_box {
position: relative; position: relative;
@ -982,30 +953,5 @@
} }
} }
} }
}
.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> </style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long