From 8c4c72fa4dbd2d06e70d0a3ce1e8bd1f7320bae6 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Thu, 10 Jul 2025 17:39:09 +0800 Subject: [PATCH] 1 --- components/novel/workItem.vue | 22 +- config.js | 2 +- pages_order/novel/ReaderAchievement.vue | 28 +- pages_order/novel/Tipping.vue | 2 +- pages_order/novel/readnovels.vue | 563 ++++++++++++++++++++++++++++++-- 5 files changed, 581 insertions(+), 36 deletions(-) diff --git a/components/novel/workItem.vue b/components/novel/workItem.vue index d4e6966..77792ad 100644 --- a/components/novel/workItem.vue +++ b/components/novel/workItem.vue @@ -62,6 +62,10 @@ return statusMap[this.work.status] || 'ongoing'; }, statusText() { + // 优先使用 dictText,如果没有则使用默认映射 + if (this.work.status_dictText) { + return this.work.status_dictText; + } const textMap = { '0': '连载中', '1': '已完结' @@ -70,19 +74,23 @@ }, toolStatusClass() { const toolStatusMap = { - '0': 'ongoing', - '1': 'completed', - '2': 'error', + '0': 'completed', + '1': 'error', + // '2': 'error', }; return toolStatusMap[this.work.toolStatus] || ''; }, toolStatusText() { + // 优先使用 dictText,如果没有则使用默认映射 + if (this.work.toolStatus_dictText) { + return this.work.toolStatus_dictText; + } const textMap = { '0': '设置审核中', '1': '设置审核通过', '2': '设置审核不通过' }; - return textMap[this.work.toolStatus] || '连载中'; + return textMap[this.work.toolStatus] || ''; }, bookStatusClass() { const bookStatusMap = { @@ -93,12 +101,16 @@ return bookStatusMap[this.work.bookStatus] || ''; }, bookStatusText() { + // 优先使用 dictText,如果没有则使用默认映射 + if (this.work.bookStatus_dictText) { + return this.work.bookStatus_dictText; + } const textMap = { '0': '发布审核中', '1': '发布审核通过', '2': '发布审核不通过' }; - return textMap[this.work.bookStatus] || '连载中'; + return textMap[this.work.bookStatus] || ''; }, }, methods: { diff --git a/config.js b/config.js index 3f50244..0b239b6 100644 --- a/config.js +++ b/config.js @@ -8,7 +8,7 @@ import uvUI from '@/uni_modules/uv-ui-tools' Vue.use(uvUI); // 当前环境 -const type = 'prod' +const type = 'local' // 环境配置 diff --git a/pages_order/novel/ReaderAchievement.vue b/pages_order/novel/ReaderAchievement.vue index ebd2d3b..0f90b6c 100644 --- a/pages_order/novel/ReaderAchievement.vue +++ b/pages_order/novel/ReaderAchievement.vue @@ -63,9 +63,10 @@ - @@ -88,7 +89,7 @@ }, methods: { async getDetail(){ - this.form = await this.$fetch('getAchievement') + this.form = await this.$fetch('getAchievement') || {} this.isPending = this.form.status == 0 }, async submit() { @@ -118,14 +119,25 @@ // await Promise.all(arr) if(this.$utils.verificationAll(this.form, { - oneName : '请填写所有成就名称', - twoName : '请填写所有成就名称', - threeName : '请填写所有成就名称', + oneName : '请填写' + this.list[0].title, + twoName : '请填写' + this.list[1].title, + threeName : '请填写' + this.list[2].title, })){ return } + + let data = { + oneName : this.form.oneName, + twoName : this.form.twoName, + threeName : this.form.threeName, + status : 0 + } + + if(this.form.id){ + data.id = this.form.id + } - await this.$fetch('setAchievementName', this.form) + await this.$fetch('setAchievementName', data) uni.showToast({ title: '提交成功', @@ -259,7 +271,7 @@ } .submit-btn.disabled { - background: #807a7a; + background: #aaa; color: #fff; } diff --git a/pages_order/novel/Tipping.vue b/pages_order/novel/Tipping.vue index acde3c1..88c1021 100644 --- a/pages_order/novel/Tipping.vue +++ b/pages_order/novel/Tipping.vue @@ -36,7 +36,7 @@ {{ topList[0].hanHaiMember - && topList[0].hanHaiMember.nickName + && topList[0].hanHaiMember.nickName || '用户' }} {{ topList[0].num }} 亲密值 {{ diff --git a/pages_order/novel/readnovels.vue b/pages_order/novel/readnovels.vue index da03d08..87ecd32 100644 --- a/pages_order/novel/readnovels.vue +++ b/pages_order/novel/readnovels.vue @@ -22,8 +22,8 @@ - + {{ currentChapter }} @@ -32,9 +32,28 @@ {{ paragraph }} + + + + + + 滚动到底部停留2秒自动加载下一章 + + + + + 正在底部停留 {{ bottomStayTime.toFixed(1) }}s / 2.0s + 向上滚动可取消 + + + + {{ countdown }}秒后自动跳转下一章 + 点击取消 + + - + @@ -48,6 +67,18 @@ {{ isDarkMode ? '白天' : '夜间' }} + + + + + {{ autoLoadNext ? '自动' : '手动' }} + +