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 @@ + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 402b349..aeef8ff 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.java2nb novel - 2.6.5 + 2.7.0 novel-common novel-front