Commit 94afd1ca by 石头

词条页面

1 parent be04608f
......@@ -82,11 +82,11 @@ public class HomeController extends BaseController {
ThemeQuery query = new ThemeQuery();
query.setKeyword(result);
ThemeDomain themeDomain = themeService.getFirst(query);
if (themeDomain == null) return errorResult("暂无检索结果");
if (themeDomain == null) return errorResult(String.format("暂无\"%s\"检索结果",keyword));
System.out.println(themeDomain);
return successResult("success", "/theme/detail/" + themeDomain.getId());
} catch (Exception ex) {
return errorResult("暂无检索结果");
return errorResult(String.format("暂无\"%s\"检索结果",keyword));
}
}
}
/*****************************************
* *
* @dookay.com Internet make it happen *
* ----------- ----------------------- *
* dddd ddddd Internet make it happen *
* o o o Internet make it happen *
* k k k Internet make it happen *
* a a a Internet make it happen *
* yyyy yyyyy Internet make it happen *
* ----------- ----------------------- *
* NO BUG ENJOY LIFE *
* *
****************************************/
package com.dookay.cihai.wechat.controller;
import com.dookay.cihai.core.word.domain.WordDomain;
import com.dookay.cihai.core.word.service.IWordService;
import com.dookay.coral.common.web.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
/**
* @author 石磊
* @date 2017/12/7
*/
@Controller
@RequestMapping("/word")
public class WordController extends BaseController {
@Autowired
private IWordService wordService;
/**
* @author 石磊
* @date 2017/12/7
* @description 详情
*/
@RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
public ModelAndView detail(@PathVariable Long id) {
WordDomain wordDomain = wordService.get(id);
ModelAndView mv = new ModelAndView("/portal/word/detail");
mv.addObject("word", wordDomain);
return mv;
}
}
......@@ -5,7 +5,6 @@
<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/routes.js"></script>
<script src="${ctx}/static/js/index.js"></script>
<script src="${ctx}/static/js/backend.js"></script>
<script src="${ctx}/static/js/layer/layer.js"></script>
<script>
......
......@@ -53,4 +53,5 @@
</div>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="/wechat/jsConfig"></script>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
\ No newline at end of file
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<script src="${ctx}/static/js/index.js"></script>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!