Commit e756539f by 石头

更新静态页

1 parent 65911c19
...@@ -43,7 +43,20 @@ public class WordController extends BaseController { ...@@ -43,7 +43,20 @@ public class WordController extends BaseController {
@RequestMapping(value = "/detail/{id}", method = RequestMethod.GET) @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
public ModelAndView detail(@PathVariable Long id) { public ModelAndView detail(@PathVariable Long id) {
WordDomain wordDomain = wordService.get(id); WordDomain wordDomain = wordService.get(id);
ModelAndView mv = new ModelAndView(wordDomain.getWord().length() >= 2 ? "/portal/word/detail" : "/portal/word/baike"); ModelAndView mv = new ModelAndView("/portal/word/detail");
mv.addObject("word", wordDomain);
return mv;
}
/**
* @author 石磊
* @date 2017/12/7
* @description 百科页面
*/
@RequestMapping(value = "/baike/{id}", method = RequestMethod.GET)
public ModelAndView baike(@PathVariable Long id) {
WordDomain wordDomain = wordService.get(id);
ModelAndView mv = new ModelAndView("/portal/word/baike");
mv.addObject("word", wordDomain); mv.addObject("word", wordDomain);
return mv; return mv;
} }
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
<%--添加此行消除额外空格--%> <%--添加此行消除额外空格--%>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="${ctx}/static/js/vendor.js"></script> <script src="${ctx}/static/js/vendor.js"></script>
<script src="${ctx}/static/js/routes.js"></script>
<script src="${ctx}/static/js/backend.js"></script> <script src="${ctx}/static/js/backend.js"></script>
<script src="${ctx}/static/js/layer/layer.js"></script> <script src="${ctx}/static/js/layer/layer.js"></script>
<script src="${ctx}/static/js/main.js"></script>
<script> <script>
$(function () { $(function () {
backEndApp.init() backEndApp.init()
......
...@@ -15,3 +15,13 @@ ...@@ -15,3 +15,13 @@
<link rel="stylesheet" href="${ctx}/static/css/vendor.css"> <link rel="stylesheet" href="${ctx}/static/css/vendor.css">
</head> </head>
<body> <body>
<div class="loading" id="loading">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="64px" height="64px" viewBox="0 0 128 128" xml:space="preserve">
<g>
<path d="M78.75 16.18V1.56a64.1 64.1 0 0 1 47.7 47.7H111.8a49.98 49.98 0 0 0-33.07-33.08zM16.43 49.25H1.8a64.1 64.1 0 0 1 47.7-47.7V16.2a49.98 49.98 0 0 0-33.07 33.07zm33.07 62.32v14.62A64.1 64.1 0 0 1 1.8 78.5h14.63a49.98 49.98 0 0 0 33.07 33.07zm62.32-33.07h14.62a64.1 64.1 0 0 1-47.7 47.7v-14.63a49.98 49.98 0 0 0 33.08-33.07z"
fill="#494949" fill-opacity="1" />
<animateTransform attributeName="transform" type="rotate" from="0 64 64" to="-90 64 64" dur="400ms" repeatCount="indefinite"></animateTransform>
</g>
</svg>
</div>
\ No newline at end of file \ No newline at end of file
...@@ -4,16 +4,7 @@ ...@@ -4,16 +4,7 @@
<jsp:include page="/WEB-INF/jsp/include/header.jsp"> <jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="首页"/> <jsp:param name="pageTitle" value="首页"/>
</jsp:include> </jsp:include>
<div class="loading" id="loading">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="64px" height="64px" viewBox="0 0 128 128" xml:space="preserve">
<g>
<path d="M78.75 16.18V1.56a64.1 64.1 0 0 1 47.7 47.7H111.8a49.98 49.98 0 0 0-33.07-33.08zM16.43 49.25H1.8a64.1 64.1 0 0 1 47.7-47.7V16.2a49.98 49.98 0 0 0-33.07 33.07zm33.07 62.32v14.62A64.1 64.1 0 0 1 1.8 78.5h14.63a49.98 49.98 0 0 0 33.07 33.07zm62.32-33.07h14.62a64.1 64.1 0 0 1-47.7 47.7v-14.63a49.98 49.98 0 0 0 33.08-33.07z"
fill="#494949" fill-opacity="1" />
<animateTransform attributeName="transform" type="rotate" from="0 64 64" to="-90 64 64" dur="400ms" repeatCount="indefinite"></animateTransform>
</g>
</svg>
</div>
<div id="app"> <div id="app">
<div class="statusbar"></div> <div class="statusbar"></div>
<div class="view view-main view-init ios-edges" data-url="/"> <div class="view view-main view-init ios-edges" data-url="/">
...@@ -54,4 +45,75 @@ ...@@ -54,4 +45,75 @@
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="/wechat/jsConfig"></script> <script src="/wechat/jsConfig"></script>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/> <jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<script src="${ctx}/static/js/index.js"></script> <script>
$('.search-area-voice').on('click', function () {
wx.startRecord();
myApp.dialog.create({
title: '正在录音...',
buttons: [
{
text: '完成',
onClick: function () {
wx.stopRecord({
success: function (res) {
myApp.dialog.preloader();
var localId = res.localId;
wx.translateVoice({
localId: localId, // 需要识别的音频的本地Id,由录音相关接口获得
isShowProgressTips: 0, // 默认为1,显示进度提示
success: function (res) {
jQuery.get("/home/search", {keyword: res.translateResult}, function (data) {
myApp.dialog.close();
if (data.code == "OK") {
// myApp.view.main.router.load({
// url:data.data
// });
location.href = data.data;
} else {
myApp.dialog.alert(data.message);
$('.j_search_input').val(res.translateResult);
}
})
}
});
}
});
}
}
]
}).open();
});
$('.search-area-image').on('click', function () {
wx.chooseImage({
count: 1, // 默认9
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
wx.getLocalImgData({
localId: localIds[0], // 图片的localID
success: function (res) {
var localData = res.localData; // localData是图片的base64数据,可以用img标签显示
alert(localData);
}
});
}
});
})
</script>
\ No newline at end of file \ No newline at end of file
...@@ -299,7 +299,7 @@ ...@@ -299,7 +299,7 @@
<a class="panel-open" href="#" data-panel="right"> <a class="panel-open" href="#" data-panel="right">
<span class="icon icon-book"></span> <span class="icon icon-book"></span>
</a> </a>
<a href="/word-wiki/"> <a href="/word/baike/${word.id}">
<i class="iconfont icon-qiyeguanxitupu"></i> <i class="iconfont icon-qiyeguanxitupu"></i>
</a> </a>
</div> </div>
...@@ -333,7 +333,7 @@ ...@@ -333,7 +333,7 @@
<span class="icon icon-word-prev"></span> <span class="icon icon-word-prev"></span>
</a> </a>
<h1 class="word-title-inner bg-farmland">${word.word}</h1> <h1 class="word-title-inner bg-farmland">${word.word}</h1>
<a class="word-title-pager next" href="/word-wiki/">百科 <a class="word-title-pager next js-jump-page" href="/word/baike/${word.id}">百科
<span class="icon icon-word-next"></span> <span class="icon icon-word-next"></span>
</a> </a>
</div> </div>
...@@ -418,7 +418,6 @@ ...@@ -418,7 +418,6 @@
</div> </div>
</div> </div>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/> <jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<script src="${ctx}/static/js/word.js"></script>
<script> <script>
$(function () { $(function () {
......
This diff could not be displayed because it is too large.
...@@ -335,7 +335,6 @@ ...@@ -335,7 +335,6 @@
</div> </div>
</div> </div>
<script src="js/vendor.js"></script> <script src="js/vendor.js"></script>
<script src="js/vis.js"></script> <script src="js/main.js"></script>
<script src="js/index.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
var $ = Dom7;
var app = new Framework7({
root: '#app',
theme: 'ios',
routes: routes
});
var numSwiper = new Swiper('.num-swiper', { var numSwiper = new Swiper('.num-swiper', {
loop: false, loop: false,
slidesPerView: 4, slidesPerView: 4,
slidesPerGroup: 1, slidesPerGroup: 1,
navigation: { navigation: {
nextEl: '.swiper-button-next', nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev', prevEl: '.swiper-button-prev'
} }
}); });
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -9,6 +9,16 @@ ...@@ -9,6 +9,16 @@
<link rel="stylesheet" href="css/vendor.css"> <link rel="stylesheet" href="css/vendor.css">
</head> </head>
<body> <body>
<div class="loading" id="loading">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="64px" height="64px" viewBox="0 0 128 128" xml:space="preserve">
<g>
<path d="M78.75 16.18V1.56a64.1 64.1 0 0 1 47.7 47.7H111.8a49.98 49.98 0 0 0-33.07-33.08zM16.43 49.25H1.8a64.1 64.1 0 0 1 47.7-47.7V16.2a49.98 49.98 0 0 0-33.07 33.07zm33.07 62.32v14.62A64.1 64.1 0 0 1 1.8 78.5h14.63a49.98 49.98 0 0 0 33.07 33.07zm62.32-33.07h14.62a64.1 64.1 0 0 1-47.7 47.7v-14.63a49.98 49.98 0 0 0 33.08-33.07z"
fill="#494949" fill-opacity="1" />
<animateTransform attributeName="transform" type="rotate" from="0 64 64" to="-90 64 64" dur="400ms" repeatCount="indefinite"></animateTransform>
</g>
</svg>
</div>
<div id="app"> <div id="app">
<div class="statusbar"></div> <div class="statusbar"></div>
<div class="view view-main view-init ios-edges" data-url="/"> <div class="view view-main view-init ios-edges" data-url="/">
...@@ -335,7 +345,7 @@ ...@@ -335,7 +345,7 @@
</div> </div>
</div> </div>
<script src="js/vendor.js"></script> <script src="js/vendor.js"></script>
<script src="js/vis.js"></script> <script src="js/main.js"></script>
<script src="js/special.js"></script> <script src="js/special.js"></script>
<script> <script>
function relationPic(id, data) { function relationPic(id, data) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!