From 8f95bc835620564aae48d3aa5f064d7beaa02023 Mon Sep 17 00:00:00 2001
From: Bobi <2166145077@qq.com>
Date: Tue, 29 Apr 2025 20:21:05 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BA=95=E9=83=A8=E5=AF=BC=E8=88=AA=E6=A0=8F?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/novel/CatalogPopup.vue | 26 ++
components/novel/RankListItem.vue | 93 ++++++
components/novel/workItem.vue | 2 +-
pages.json | 36 +++
pages/index/bookshelf.vue | 62 ++--
pages/index/category.vue | 10 +-
pages/index/center.vue | 16 +-
pages_order/author/editor.vue | 186 ++++++++---
pages_order/novel/Giftbox.vue | 164 ++++++++++
pages_order/novel/Giftpurchases.vue | 278 ++++++++++++++++
pages_order/novel/Mycomment.vue | 180 +++++++++++
pages_order/novel/ReaderAchievement.vue | 192 +++++++++++
pages_order/novel/Respondcomments.vue | 206 ++++++++++++
pages_order/novel/Review.vue | 167 ++++++++++
pages_order/novel/SubscriptionInformation.vue | 228 +++++++++++++
pages_order/novel/Tipping.vue | 233 ++++++++++++++
pages_order/novel/Walletflow.vue | 249 ++++++++++++++
pages_order/novel/announcement.vue | 1 +
pages_order/novel/chapterList.vue | 165 +++++++---
pages_order/novel/comments.vue | 232 +++++++++++++
pages_order/novel/createNovel.vue | 25 +-
pages_order/novel/creator.vue | 116 +++++++
pages_order/novel/novelDetail.vue | 206 ++++++++++--
pages_order/novel/readnovels.vue | 448 ++++++++++++++++++++++++++
24 files changed, 3340 insertions(+), 181 deletions(-)
create mode 100644 components/novel/CatalogPopup.vue
create mode 100644 components/novel/RankListItem.vue
create mode 100644 pages_order/novel/Giftbox.vue
create mode 100644 pages_order/novel/Giftpurchases.vue
create mode 100644 pages_order/novel/Mycomment.vue
create mode 100644 pages_order/novel/ReaderAchievement.vue
create mode 100644 pages_order/novel/Respondcomments.vue
create mode 100644 pages_order/novel/Review.vue
create mode 100644 pages_order/novel/SubscriptionInformation.vue
create mode 100644 pages_order/novel/Tipping.vue
create mode 100644 pages_order/novel/Walletflow.vue
create mode 100644 pages_order/novel/comments.vue
create mode 100644 pages_order/novel/creator.vue
create mode 100644 pages_order/novel/readnovels.vue
diff --git a/components/novel/CatalogPopup.vue b/components/novel/CatalogPopup.vue
new file mode 100644
index 0000000..0576627
--- /dev/null
+++ b/components/novel/CatalogPopup.vue
@@ -0,0 +1,26 @@
+
+ CatalogPopup弹窗测试
+
+
+
\ No newline at end of file
diff --git a/components/novel/RankListItem.vue b/components/novel/RankListItem.vue
new file mode 100644
index 0000000..2dbf2cd
--- /dev/null
+++ b/components/novel/RankListItem.vue
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+ {{ name }}
+
+
+ {{ score }} 亲密值
+ {{ level }}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/novel/workItem.vue b/components/novel/workItem.vue
index b23d5be..82acdb7 100644
--- a/components/novel/workItem.vue
+++ b/components/novel/workItem.vue
@@ -27,7 +27,7 @@
-
+
diff --git a/pages.json b/pages.json
index bc0af0b..90b3332 100644
--- a/pages.json
+++ b/pages.json
@@ -69,6 +69,42 @@
},
{
"path": "novel/chapterList"
+ },
+ {
+ "path": "novel/ReaderAchievement"
+ },
+ {
+ "path": "novel/readnovels"
+ },
+ {
+ "path": "novel/SubscriptionInformation"
+ },
+ {
+ "path": "novel/Tipping"
+ },
+ {
+ "path": "novel/Review"
+ },
+ {
+ "path": "novel/comments"
+ },
+ {
+ "path": "novel/Respondcomments"
+ },
+ {
+ "path": "novel/Walletflow"
+ },
+ {
+ "path": "novel/creator"
+ },
+ {
+ "path": "novel/Giftbox"
+ },
+ {
+ "path": "novel/Giftpurchases"
+ },
+ {
+ "path": "novel/Mycomment"
}
]
}],
diff --git a/pages/index/bookshelf.vue b/pages/index/bookshelf.vue
index 5b540b8..8f5a774 100644
--- a/pages/index/bookshelf.vue
+++ b/pages/index/bookshelf.vue
@@ -1,4 +1,5 @@
+
-
-
@@ -73,7 +71,7 @@
{
id: '1',
title: '我是半妖',
- cover: 'https://bookcover.yuewen.com/qdbimg/349573/1033014772/150.webp',
+ cover: 'https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=facearea&w=400&h=400',
author: '东方不败',
desc: '这是一部关于半妖少年成长的玄幻小说,讲述了主角在人妖两界的冒险故事。',
tags: ['玄幻', '冒险', '热血'],
@@ -82,7 +80,7 @@
{
id: '2',
title: '兽王进化',
- cover: 'https://bookcover.yuewen.com/qdbimg/349573/1033014772/150.webp',
+ cover: 'https://images.unsplash.com/photo-1519125323398-675f0ddb6308?auto=format&fit=facearea&w=400&h=400',
author: '天下霸唱',
desc: '一场意外让主角获得兽王血脉,开始了进化之路...',
tags: ['奇幻', '冒险'],
@@ -91,7 +89,7 @@
{
id: '3',
title: '魔法少女纯爷们',
- cover: 'https://bookcover.yuewen.com/qdbimg/349573/1033014772/150.webp',
+ cover: 'https://images.unsplash.com/photo-1465101046530-73398c7f28ca?auto=format&fit=facearea&w=400&h=400',
author: '南派三叔',
desc: '一个普通男孩意外获得魔法少女的力量,开始了奇妙冒险...',
tags: ['搞笑', '奇幻'],
@@ -212,7 +210,7 @@
tempList.push({
id: categoryId + '-' + i,
title: '分类' + categoryId + '的书' + i,
- cover: 'https://bookcover.yuewen.com/qdbimg/349573/1033014772/150.webp',
+ cover: 'https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=facearea&w=400&h=400',
author: '作者' + categoryId,
desc: '这是分类' + categoryId + '的第' + i + '本书...',
tags: ['分类' + categoryId, '热门'],
diff --git a/pages/index/center.vue b/pages/index/center.vue
index 20e85a3..8e5746f 100644
--- a/pages/index/center.vue
+++ b/pages/index/center.vue
@@ -20,14 +20,14 @@
账户
-
+
- 钱包提现
+ 钱包流水
-
+
礼物盒
@@ -41,7 +41,7 @@
日常
-
+
我的评论
@@ -49,7 +49,7 @@
294
-
+
任务中心
@@ -64,14 +64,14 @@
设置
-
+
申请成为作者
-
+
联系客服
@@ -79,7 +79,7 @@
-
+
修改信息
diff --git a/pages_order/author/editor.vue b/pages_order/author/editor.vue
index 73d361b..9dddd0b 100644
--- a/pages_order/author/editor.vue
+++ b/pages_order/author/editor.vue
@@ -1,25 +1,21 @@
-
-
-
-
-
+
+
+
+ *
+ 章节名称
+
+
+
+ *
+ 章节内容
+
+
-
-
-
-
-
- 发布
+
@@ -29,8 +25,9 @@
data() {
return {
formats: {},
- form : {
- title : '',
+ form: {
+ title: '',
+ content: '',
},
}
},
@@ -109,42 +106,127 @@
})
}
})
- }
+ },
+ onSave() {
+ // 保存逻辑
+ const newChapter = {
+ title: this.form.title,
+ content: this.form.content
+ };
+ // 获取原有章节
+ let chapters = uni.getStorageSync('chapters') || [];
+ chapters.push(newChapter);
+ uni.setStorageSync('chapters', chapters);
+ // 跳转并传递参数
+ uni.redirectTo({
+ url: '/pages_order/novel/chapterList?fromSave=1'
+ });
+ },
+ onPublish() {
+ // 发布逻辑
+ const newChapter = {
+ title: this.form.title,
+ content: this.form.content,
+ time: Date.now()
+ };
+ // 保存到已发布章节
+ let publishedChapters = uni.getStorageSync('publishedChapters') || [];
+ publishedChapters.push(newChapter);
+ uni.setStorageSync('publishedChapters', publishedChapters);
+ // 跳转到bookshelf作品tab并弹窗
+ uni.redirectTo({
+ url: '/pages/index/bookshelf?fromPublish=1'
+ });
+ },
}
}
diff --git a/pages_order/novel/Giftbox.vue b/pages_order/novel/Giftbox.vue
new file mode 100644
index 0000000..98b1d2b
--- /dev/null
+++ b/pages_order/novel/Giftbox.vue
@@ -0,0 +1,164 @@
+
+
+
+
+
+
+
+
+
+
+ {{ gift.emoji }}
+
+ {{ gift.name }}
+
+ x{{ gift.count }}
+ {{ gift.price }}豆豆
+
+
+
+
+
+
+ 剩余:{{ gifts[selectedIndex].count }} 个
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_order/novel/Giftpurchases.vue b/pages_order/novel/Giftpurchases.vue
new file mode 100644
index 0000000..236a7f1
--- /dev/null
+++ b/pages_order/novel/Giftpurchases.vue
@@ -0,0 +1,278 @@
+
+
+
+
+
+
+
+
+ 礼物购买
+
+ 礼物名称
+ {{ giftName }}
+
+
+
+ * 购买数量
+
+
+
+
+ 支付方式
+
+
+ 账户余额:{{ balance }} 豆豆
+
+
+
+
+
+ 订单信息
+
+ 内容
+
+
+ 合计:
+ {{ totalPrice.toFixed(2) }} 元
+
+
+
+
+
+
+ 请仔细核查并确认相关信息。因用户个人疏忽导致的充值错误,需由用户自行承担。一旦完成充值,概不退换。
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_order/novel/Mycomment.vue b/pages_order/novel/Mycomment.vue
new file mode 100644
index 0000000..827711f
--- /dev/null
+++ b/pages_order/novel/Mycomment.vue
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
diff --git a/pages_order/novel/ReaderAchievement.vue b/pages_order/novel/ReaderAchievement.vue
new file mode 100644
index 0000000..72854eb
--- /dev/null
+++ b/pages_order/novel/ReaderAchievement.vue
@@ -0,0 +1,192 @@
+
+
+
+
+
+ 阅读成就设置
+ 设置审核中
+
+
+
+
+
+
+ *
+ 一级成就名称
+
+
+
+
+
+
+
+
+
+ *
+ 二级成就名称
+
+
+
+
+
+
+
+
+
+ *
+ 三级成就名称
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_order/novel/Respondcomments.vue b/pages_order/novel/Respondcomments.vue
new file mode 100644
index 0000000..d30e8da
--- /dev/null
+++ b/pages_order/novel/Respondcomments.vue
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
diff --git a/pages_order/novel/Review.vue b/pages_order/novel/Review.vue
new file mode 100644
index 0000000..a87d018
--- /dev/null
+++ b/pages_order/novel/Review.vue
@@ -0,0 +1,167 @@
+
+
+
+
+
+ 书本名称
+ 《{{ bookTitle }}》
+
+
+ *
+ 书评内容
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_order/novel/SubscriptionInformation.vue b/pages_order/novel/SubscriptionInformation.vue
new file mode 100644
index 0000000..02fe156
--- /dev/null
+++ b/pages_order/novel/SubscriptionInformation.vue
@@ -0,0 +1,228 @@
+
+
+
+
+
+ 订阅章节
+
+
+ 章节名称
+
+ 第1章 2004
+ 批量订阅
+
+
+
+
+
+ *
+ 批量订阅
+
+
+
+
+ 订阅本章
+
+
+
+
+
+ 章节信息
+
+ 本次订阅消耗:10 豆豆
+
+
+
+ 支付方式
+
+ 账户余额:0 豆豆
+
+
+
+
+ 订单信息
+
+ 内容
+
+
+ 合计:0.10 元
+
+
+
+ 请仔细检查并确认相关信息,因用户个人疏忽导致的充值错误、章节用户自行承担。一旦完成充值,概不退换。
+
+
+
+
+
+
+
+
+
diff --git a/pages_order/novel/Tipping.vue b/pages_order/novel/Tipping.vue
new file mode 100644
index 0000000..ff8ebce
--- /dev/null
+++ b/pages_order/novel/Tipping.vue
@@ -0,0 +1,233 @@
+
+
+
+
+
+
+
+
+
+ {{ topList[1].name }}
+ {{ topList[1].score }} 亲密值
+ 护书使者 五级
+
+
+
+ {{ topList[0].name }}
+ {{ topList[0].score }} 亲密值
+ 护书使者 五级
+
+
+
+ {{ topList[2].name }}
+ {{ topList[2].score }} 亲密值
+ 护书使者 五级
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_order/novel/Walletflow.vue b/pages_order/novel/Walletflow.vue
new file mode 100644
index 0000000..4c961de
--- /dev/null
+++ b/pages_order/novel/Walletflow.vue
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+
+
+ 账户
+
+ {{ balance }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+ {{ item.date }}
+
+ +{{ item.amount }}
+
+
+
+
+
+
+
+ {{ item.title }}
+ {{ item.date }}
+
+ -{{ item.amount }}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_order/novel/announcement.vue b/pages_order/novel/announcement.vue
index e08e075..d4d9c9b 100644
--- a/pages_order/novel/announcement.vue
+++ b/pages_order/novel/announcement.vue
@@ -1,4 +1,5 @@
+
-
+
@@ -37,16 +36,45 @@ export default {
data() {
return {
activeTab: 'draft',
- chapters: Array(8).fill({}) // 模拟8个章节数据
+ chapters: [] // 真实章节数据
+ }
+ },
+ onLoad(options) {
+ // 根据tab参数决定初始tab
+ if (options && options.tab === 'published') {
+ this.activeTab = 'published';
+ } else {
+ this.activeTab = 'draft';
+ }
+ this.loadChapters();
+ // 判断是否需要弹窗
+ if (options && options.fromSave === '1') {
+ uni.showToast({
+ title: '保存成功',
+ icon: 'success'
+ });
+ }
+ if (options && options.fromPublish === '1') {
+ uni.showToast({
+ title: '发布成功',
+ icon: 'success'
+ });
}
},
methods: {
+ loadChapters() {
+ if (this.activeTab === 'published') {
+ this.chapters = uni.getStorageSync('publishedChapters') || [];
+ } else {
+ this.chapters = uni.getStorageSync('chapters') || [];
+ }
+ },
goBack() {
uni.navigateBack()
},
switchTab(tab) {
- this.activeTab = tab
- // 根据tab加载不同的章节列表
+ this.activeTab = tab;
+ this.loadChapters();
},
addNewChapter() {
uni.navigateTo({
@@ -75,58 +103,89 @@ export default {
.header {
background: #fff;
- padding-top: var(--status-bar-height);
-
.nav-bar {
+ position: relative;
height: 44px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 15px;
-
.back {
- padding: 5px;
- .icon-back {
- font-size: 20px;
- }
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ width: 48px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 2;
}
-
- .tabs {
+ .right-icons {
+ position: absolute;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ width: 48px;
display: flex;
- .tab {
- padding: 0 15px;
- font-size: 16px;
- color: #666;
- position: relative;
-
- &.active {
- color: #000;
- font-weight: bold;
-
- &::after {
- content: '';
- position: absolute;
- bottom: -4px;
- left: 50%;
- transform: translateX(-50%);
- width: 20px;
- height: 2px;
- background: #2b4acb;
- border-radius: 1px;
- }
+ align-items: center;
+ justify-content: center;
+ z-index: 2;
+ }
+ .title {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ margin: auto;
+ height: 44px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 16px;
+ font-weight: 500;
+ color: #222;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ text-align: center;
+ z-index: 1;
+ pointer-events: none;
+ }
+ }
+ .tabs {
+ display: flex;
+ margin-top: 4px;
+ margin-left: 120rpx;
+ justify-content: space-between;
+
+ .tab {
+ font-size: 15px;
+ color: #888;
+ margin-right: 120rpx;
+ position: relative;
+ &.active {
+ color: #223a7a;
+ font-weight: 600;
+ &::after {
+ content: '';
+ display: block;
+ width: 24px;
+ height: 3px;
+ background: #223a7a;
+ border-radius: 2px;
+ position: absolute;
+ left: 50%;
+ transform: translateX(-50%);
+ bottom: -6px;
}
}
}
-
- .more {
- padding: 5px;
- }
}
}
.chapter-list {
- padding: 0 15px;
-
+ padding: 20rpx 40rpx;
+ background-color: rgb(255, 254, 254);
+ margin: 50rpx 40rpx;
+ border-radius: 3%;
.chapter-item {
display: flex;
justify-content: space-between;
diff --git a/pages_order/novel/comments.vue b/pages_order/novel/comments.vue
new file mode 100644
index 0000000..1928a51
--- /dev/null
+++ b/pages_order/novel/comments.vue
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+
diff --git a/pages_order/novel/createNovel.vue b/pages_order/novel/createNovel.vue
index 7d1be27..c345fc4 100644
--- a/pages_order/novel/createNovel.vue
+++ b/pages_order/novel/createNovel.vue
@@ -160,17 +160,36 @@ export default {
id: Date.now().toString(),
title: this.formData.title,
cover: this.formData.cover || 'https://bookcover.yuewen.com/qdbimg/349573/1033014772/150.webp',
- readers: '8721',
- status: 'ongoing',
+ type: this.formData.type,
+ description: this.formData.description,
+ status: this.formData.status,
+ readers: '0',
publishStatus: '发布审核中',
- isOriginal: true
+ isOriginal: true,
+ chapters: [],
+ author: '当前用户', // 添加作者信息
+ tags: [this.formData.type], // 添加标签
+ updateTime: new Date().getTime() // 添加更新时间
}
+ // 获取现有的作品列表
+ let worksList = uni.getStorageSync('worksList') || []
+ // 添加新作品
+ worksList.unshift(workData) // 使用unshift确保新作品显示在最前面
+ // 保存到本地存储
+ uni.setStorageSync('worksList', worksList)
+
// 保存到全局状态
getApp().globalData.submittedWork = workData
// 设置需要显示提交成功提示的标记
getApp().globalData.showSubmitSuccess = true
+ // 显示成功提示
+ uni.showToast({
+ title: '创建成功',
+ icon: 'success'
+ })
+
// 延迟返回上一页
setTimeout(() => {
// 先保存当前要显示的标签
diff --git a/pages_order/novel/creator.vue b/pages_order/novel/creator.vue
new file mode 100644
index 0000000..4ffc565
--- /dev/null
+++ b/pages_order/novel/creator.vue
@@ -0,0 +1,116 @@
+
+
+
+
+
+ *
+ 笔名
+
+
+
+ *
+ 简介
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_order/novel/novelDetail.vue b/pages_order/novel/novelDetail.vue
index 5464536..7533af1 100644
--- a/pages_order/novel/novelDetail.vue
+++ b/pages_order/novel/novelDetail.vue
@@ -2,7 +2,11 @@
-
+
+
+
+
+
@@ -86,7 +90,7 @@
-
+
+
+
@@ -121,7 +144,7 @@
我是本书的作者方香橙,这是一本甜文爽文哒!请放心入坑,五星好评!女主又美有个性可爱,绝对不圣母,不傻白!男主身心干净深情独宠媳妇儿一个人...
+
+