diff --git a/dist.zip b/dist.zip
new file mode 100644
index 0000000..25cb71f
Binary files /dev/null and b/dist.zip differ
diff --git a/src/api/home.js b/src/api/home.js
index 9420039..8590056 100644
--- a/src/api/home.js
+++ b/src/api/home.js
@@ -135,4 +135,24 @@ export const homeApi = {
getBookAreaList() {
return api.get('/all_index/getBookAreaList');
},
+
+ /**
+ * 检查章节是否需要付费
+ * @param {Object} params 参数
+ * @param {string} params.bookId 书本ID
+ * @param {string} params.novelId 章节ID
+ */
+ getMyShopNovel(params) {
+ return api.get('/my_book/getMyShopNovel', { params });
+ },
+
+ /**
+ * 购买章节
+ * @param {Object} params 参数
+ * @param {string} params.bookId 书本ID
+ * @param {string} params.novelId 章节ID(可以是单个或多个,多个用逗号分隔)
+ */
+ buyNovel(params) {
+ return api.post('/my_order/buyNovel', params);
+ },
}
\ No newline at end of file
diff --git a/src/assets/images/推荐票.png b/src/assets/images/Recommendationvote.png
similarity index 100%
rename from src/assets/images/推荐票.png
rename to src/assets/images/Recommendationvote.png
diff --git a/src/assets/images/crown.png b/src/assets/images/crown.png
new file mode 100644
index 0000000..8c91ffb
Binary files /dev/null and b/src/assets/images/crown.png differ
diff --git a/src/components/book/SubscriptionPopup.vue b/src/components/book/SubscriptionPopup.vue
new file mode 100644
index 0000000..b7b1bfe
--- /dev/null
+++ b/src/components/book/SubscriptionPopup.vue
@@ -0,0 +1,457 @@
+
+
+
+ {{ paragraph }} +
+这是付费章节
+订阅后可阅读完整内容
+{{ paragraph }}
@@ -87,7 +106,7 @@ 目录
@@ -143,7 +143,7 @@ export default {
try {
const res = await taskApi.getSignTaskToday();
// res.result == 0 表示可以签到,否则表示已签到
- canSignToday.value = res.result === 0;
+ canSignToday.value = res.result;
} catch (error) {
console.error('获取今日签到状态失败:', error);
// 默认设置为不可签到(已签到状态)
@@ -397,24 +397,25 @@ export default {
}
}
- .sign-button-container {
- text-align: center;
- margin-top: 16px;
-
- .sign-button {
- width: 280px;
- height: 44px;
- border-radius: 22px;
- font-weight: 600;
- background-color: #0A2463;
- border-color: #0A2463;
-
- &.checked-btn {
- background: linear-gradient(90deg, #e0e0e0, #bdbdbd) !important;
- border-color: #bdbdbd !important;
- color: #666 !important;
- cursor: not-allowed;
- }
+ }
+
+ .sign-button-container {
+ margin-top: 16px;
+ display: flex;
+ justify-content: center;
+ .sign-button {
+ width: 280px;
+ height: 44px;
+ border-radius: 22px;
+ font-weight: 600;
+ background-color: #0A2463;
+ border-color: #0A2463;
+
+ &.checked-btn {
+ background: linear-gradient(90deg, #e0e0e0, #bdbdbd) !important;
+ border-color: #bdbdbd !important;
+ color: #666 !important;
+ cursor: not-allowed;
}
}
}