From e343134ce21c8295a8e1f3805a6f14f8650d4def Mon Sep 17 00:00:00 2001
From: xiongxiaoyang <773861846@qq.com>
Date: Thu, 5 Nov 2020 07:47:17 +0800
Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E7=AB=AF=E8=B4=AD=E4=B9=B0?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=9B=B4=E6=96=B0&=E7=89=88=E6=9C=AC?=
=?UTF-8?q?=E5=8F=B7=E6=9B=B4=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
novel-common/pom.xml | 2 +-
novel-crawl/pom.xml | 2 +-
novel-front/pom.xml | 2 +-
.../novel/controller/PageController.java | 7 ++--
.../templates/mobile/book/book_content.html | 42 ++++++++++++++++++-
pom.xml | 2 +-
6 files changed, 49 insertions(+), 8 deletions(-)
diff --git a/novel-common/pom.xml b/novel-common/pom.xml
index 4e93d3f..3ab32b3 100644
--- a/novel-common/pom.xml
+++ b/novel-common/pom.xml
@@ -5,7 +5,7 @@
novel
com.java2nb
- 2.6.5
+ 2.7.0
4.0.0
diff --git a/novel-crawl/pom.xml b/novel-crawl/pom.xml
index 552262d..a7667d3 100644
--- a/novel-crawl/pom.xml
+++ b/novel-crawl/pom.xml
@@ -5,7 +5,7 @@
novel
com.java2nb
- 2.6.5
+ 2.7.0
4.0.0
diff --git a/novel-front/pom.xml b/novel-front/pom.xml
index 464a0f4..ccfc482 100644
--- a/novel-front/pom.xml
+++ b/novel-front/pom.xml
@@ -5,7 +5,7 @@
novel
com.java2nb
- 2.6.5
+ 2.7.0
4.0.0
diff --git a/novel-front/src/main/java/com/java2nb/novel/controller/PageController.java b/novel-front/src/main/java/com/java2nb/novel/controller/PageController.java
index 966075e..45cfc32 100644
--- a/novel-front/src/main/java/com/java2nb/novel/controller/PageController.java
+++ b/novel-front/src/main/java/com/java2nb/novel/controller/PageController.java
@@ -140,6 +140,8 @@ public class PageController extends BaseController{
//查询内容
BookContent bookContent = bookService.queryBookContent(bookIndex.getId());
model.addAttribute("bookContent",bookContent);
+
+ boolean needBuy = false;
//判断该目录是否收费
if(bookIndex.getIsVip()!=null && bookIndex.getIsVip() == 1 ){
UserDetails user = getUserDetails(request);
@@ -152,11 +154,10 @@ public class PageController extends BaseController{
if(!isBuy){
//没有购买过,需要购买
bookContent.setContent(null);
- model.addAttribute("needBuy",true);
- return "book/book_content";
+ needBuy = true;
}
}
- model.addAttribute("needBuy",false);
+ model.addAttribute("needBuy",needBuy);
return ThreadLocalUtil.getTemplateDir()+"book/book_content";
}
diff --git a/novel-front/src/main/resources/templates/mobile/book/book_content.html b/novel-front/src/main/resources/templates/mobile/book/book_content.html
index 7891f07..abfcbc2 100644
--- a/novel-front/src/main/resources/templates/mobile/book/book_content.html
+++ b/novel-front/src/main/resources/templates/mobile/book/book_content.html
@@ -169,8 +169,12 @@
+
+
+
+
+
+