diff --git a/tamguo-mms/src/main/java/com/tamguo/web/BookController.java b/tamguo-mms/src/main/java/com/tamguo/web/BookController.java index 7948d58..f87b0d2 100644 --- a/tamguo-mms/src/main/java/com/tamguo/web/BookController.java +++ b/tamguo-mms/src/main/java/com/tamguo/web/BookController.java @@ -113,4 +113,16 @@ public class BookController { } return entitys; } + + @RequestMapping(value="book/{id}.html" , method=RequestMethod.GET) + @ResponseBody + public Result book(@PathVariable String id) { + try { + BookEntity book = iBookService.selectById(id); + return Result.result(0, book, "查询成功!"); + } catch (Exception e) { + logger.error(e.getMessage() , e); + return Result.result(1, null, "查询失败!"); + } + } } diff --git a/tamguo-mms/src/main/resources/application.properties b/tamguo-mms/src/main/resources/application.properties index 6b4fa54..7837c8c 100644 --- a/tamguo-mms/src/main/resources/application.properties +++ b/tamguo-mms/src/main/resources/application.properties @@ -1,7 +1,7 @@ -domain.name=https://member.tamguo.com/ +domain.name=http://localhost:8084/ book.domain.name=https://book.tamguo.com/ tamguo.domain.name=https://www.tamguo.com/ -cookie.domian.name=tamguo.com +cookie.domian.name=localhost server.port=8084 jasypt.encryptor.password=tamguo @@ -14,14 +14,14 @@ spring.datasource.maxPoolPreparedStatementPerConnectionSize=20 spring.datasource.maxWait=60000 spring.datasource.minEvictableIdleTimeMillis=300000 spring.datasource.minIdle=5 -spring.datasource.password=tanguo520pig +spring.datasource.password=123456 spring.datasource.poolPreparedStatements=true spring.datasource.testOnBorrow=false spring.datasource.testOnReturn=false spring.datasource.testWhileIdle=true spring.datasource.timeBetweenEvictionRunsMillis=60000 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/tamguo?useUnicode=true&characterEncoding=UTF-8&useSSL=false +spring.datasource.url=jdbc:mysql://127.0.0.1:3306/tamguo_20181110?useUnicode=true&characterEncoding=UTF-8&useSSL=false spring.datasource.username=root spring.datasource.validationQuery=SELECT 1 FROM DUAL diff --git a/tamguo-mms/src/main/resources/static/js/member/booklist.js b/tamguo-mms/src/main/resources/static/js/member/booklist.js index 1421f97..e9e8eac 100644 --- a/tamguo-mms/src/main/resources/static/js/member/booklist.js +++ b/tamguo-mms/src/main/resources/static/js/member/booklist.js @@ -86,6 +86,19 @@ var vm = new Vue({ } }); }, + showEditDialog:function(id){ + axios.get('book/'+id + '.html').then(function (response) { + console.log(response); + if(response.data.code == 0){ + vm.bookDialogVisible = true; + vm.book = result.data.result; + }else{ + this.$message.error(response.data.message); + } + }).catch(function (error) { + console.log(error); + }); + }, handleAvatarSuccess(res, file) { this.imageUrl = res.result.filePath; }, diff --git a/tamguo-mms/src/main/resources/templates/booklist.html b/tamguo-mms/src/main/resources/templates/booklist.html index 5f12952..1752da5 100644 --- a/tamguo-mms/src/main/resources/templates/booklist.html +++ b/tamguo-mms/src/main/resources/templates/booklist.html @@ -101,11 +101,12 @@
  • diff --git a/tamguo-mms/src/main/resources/templates/index.html b/tamguo-mms/src/main/resources/templates/index.html index 3afce05..481c468 100644 --- a/tamguo-mms/src/main/resources/templates/index.html +++ b/tamguo-mms/src/main/resources/templates/index.html @@ -41,10 +41,10 @@
    @@ -104,7 +104,7 @@

  • 1
    - 试卷总数 + 书籍总数

  • @@ -114,14 +114,14 @@

  • 19
    - 试题总数 + 章节总数
  • - 开始新建试卷 + 开始新建书籍