Ver código fonte

Merge remote-tracking branch 'origin/master'

lyq 4 meses atrás
pai
commit
4ee8e35c78

+ 1 - 0
.idea/vcs.xml

@@ -2,5 +2,6 @@
 <project version="4">
 <project version="4">
   <component name="VcsDirectoryMappings">
   <component name="VcsDirectoryMappings">
     <mapping directory="" vcs="Git" />
     <mapping directory="" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
   </component>
   </component>
 </project>
 </project>

+ 2 - 1
src/main/java/com/sooka/component/druid/DataSourceConfiguration.java

@@ -44,7 +44,8 @@ public class DataSourceConfiguration {
         //分页插件
         //分页插件
         PageInterceptor pageHelper = new PageInterceptor();
         PageInterceptor pageHelper = new PageInterceptor();
         Properties properties = new Properties();
         Properties properties = new Properties();
-        properties.setProperty("reasonable", "true");
+//        properties.setProperty("reasonable", "true");分页合理化,开启后,当pageNum大于总页数时,会自动设置为最后一页
+        properties.setProperty("reasonable", "false"); //关闭,适配手机端
         properties.setProperty("supportMethodsArguments", "true");
         properties.setProperty("supportMethodsArguments", "true");
         properties.setProperty("returnPageInfo", "check");
         properties.setProperty("returnPageInfo", "check");
         properties.setProperty("params", "count=countSql");
         properties.setProperty("params", "count=countSql");

+ 4 - 30
src/main/java/com/sooka/module/web/cms/IndexController.java

@@ -150,13 +150,13 @@ public class IndexController {
         modelAndView.addObject("site",site);
         modelAndView.addObject("site",site);
         return modelAndView;
         return modelAndView;
     }
     }
-     //ccmj搜索
+     //搜索
      @RequestMapping("/searchFor")
      @RequestMapping("/searchFor")
      public ModelAndView SearchTitleFor(String type, String lmid, String keyword, String siteId, @RequestParam(value = "number",defaultValue = "1") Integer pageNumber){
      public ModelAndView SearchTitleFor(String type, String lmid, String keyword, String siteId, @RequestParam(value = "number",defaultValue = "1") Integer pageNumber){
-         ModelAndView modelAndView=new ModelAndView("www/ccmj/listss");
-         Map<String,Object>map=new HashMap<String, Object>(3);
+         ModelAndView modelAndView=new ModelAndView("www/tuiyijunren/listForSearch");
+         Map<String,Object>map=new HashMap<>(3);
          map.put("type",type);
          map.put("type",type);
-         if(!lmid.equals("0")){
+         if(lmid != null && !lmid.equals("0")){
             map.put("categoryId",lmid);
             map.put("categoryId",lmid);
          }
          }
          map.put("keyword",keyword);
          map.put("keyword",keyword);
@@ -172,32 +172,6 @@ public class IndexController {
          return modelAndView;
          return modelAndView;
      }
      }
 
 
-
-
-    //spdxx搜索
-    @RequestMapping("/searchFors")
-    public ModelAndView SearchTitleFors(String keyword, String siteId, @RequestParam(value = "number", defaultValue = "1") Integer pageNumber) {
-        ModelAndView modelAndView = new ModelAndView("www/spdx/listss");
-        Map<String, Object> map = new HashMap<String, Object>(4);
-        map.put("keyword", keyword);
-        map.put("type", "title");
-        map.put("status", 1); // 添加status为1的条件
-
-        PageInfo<TCmsContent> tCmsContentPageInfo = contentService.SearchTitleFor(pageNumber, map);
-        TCmsSite site = new TCmsSite();
-        site.setSiteId(Integer.parseInt(siteId));
-        modelAndView.addObject("model", tCmsContentPageInfo);
-        modelAndView.addObject("frontPath", httpProtocol + "://" + host + ":" + port + "/" + siteName + "/" + sitePrefix);
-        modelAndView.addObject("resPath", httpProtocol + "://" + host + ":" + port + "/" + siteName + "/static/www");
-        modelAndView.addObject("keyword", keyword);
-        modelAndView.addObject("siteId", siteId);
-        modelAndView.addObject("site", site);
-        return modelAndView;
-    }
-//     @RequestMapping("/ceshi")
-//     public ModelAndView ceTitleshi(String ceshi1, String ceshi2 ,String ceshi3, @RequestParam(value="number",defaultValue="1") Integer pageNumber){
-//      Map<String,Object>map=new HashMap<String, Object>
-//     }
     /**
     /**
      * 站点首页
      * 站点首页
      * @param siteId
      * @param siteId

BIN
src/main/resources/static/images/success.png


+ 1 - 1
src/main/resources/static/js/login/login_tooltips.js

@@ -30,7 +30,7 @@ function show_msg(msg, url, type) {
     if (type) {
     if (type) {
         var htmltop = '<div class="bac" style="padding:8px 0px;border:1px solid #090;width:100%;margin:0 auto;background-color:#FFF2F8;color:#090;border:3px #090 solid;;text-align:center;font-size:16px;"><img style="margin-right:10px;" src="/static/images/loading.gif">';
         var htmltop = '<div class="bac" style="padding:8px 0px;border:1px solid #090;width:100%;margin:0 auto;background-color:#FFF2F8;color:#090;border:3px #090 solid;;text-align:center;font-size:16px;"><img style="margin-right:10px;" src="/static/images/loading.gif">';
     } else {
     } else {
-        var htmltop = '<div class="bac" style="padding:8px 0px;border:1px solid #090;width:100%;margin:0 auto;background-color:#FFF2F8;color:#090;border:3px #090 solid;;text-align:center;font-size:16px;"><img style="margin-right:10px;" src="/static/images/error.png">';
+        var htmltop = '<div class="bac" style="padding:8px 0px;border:1px solid #090;width:100%;margin:0 auto;background-color:#FFF2F8;color:#090;border:3px #090 solid;;text-align:center;font-size:16px;"><img style="margin-right:10px;" src="/static/images/success.png">';
     }
     }
     var htmlfoot = '</div>';
     var htmlfoot = '</div>';
     $('.msg_bg').height($(document).height());
     $('.msg_bg').height($(document).height());

Diferenças do arquivo suprimidas por serem muito extensas
+ 30 - 0
src/main/resources/templates/www/tuiyijunren/content-dpsg.html


+ 6 - 3
src/main/resources/templates/www/tuiyijunren/include/header-index.html

@@ -26,9 +26,12 @@
         </span>
         </span>
     </div>
     </div>
     <div class="wid1200"><img src="${resPath}/tuiyijunren/images/twjr_logo.png"/>
     <div class="wid1200"><img src="${resPath}/tuiyijunren/images/twjr_logo.png"/>
-        <form class="ss">
-            <input type="text" class="ss_inp" placeholder="请输入搜索关键词"/>
-            <input type="button" class="ss_btn"/>
+        <form class="ss" action="${ctxPath}/searchFor"  accept-charset="UTF-8" method="post">
+            <input type="hidden" value="${site.siteId!}" name="siteId">
+            <input type="hidden" value="title" name="type">
+            <input type="text" class="ss_inp" placeholder="请输入搜索关键词" name="keyword"
+                   onblur="if (this.value == ''){this.value = '';}" onfocus="if (this.value == '请输入搜索关键词') {this.value = '';}"/>
+            <button type="submit" class="ss_btn"></button>
         </form>
         </form>
     </div>
     </div>
 </div>
 </div>

+ 6 - 3
src/main/resources/templates/www/tuiyijunren/include/header.html

@@ -14,9 +14,12 @@
 <div class="header">
 <div class="header">
     <div class="top_btn"><span><a>登录</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a>注册</a></span></div>
     <div class="top_btn"><span><a>登录</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a>注册</a></span></div>
     <div class="wid1200"><img src="${resPath}/tuiyijunren/images/twjr_logo.png"/>
     <div class="wid1200"><img src="${resPath}/tuiyijunren/images/twjr_logo.png"/>
-        <form class="ss">
-            <input type="text" class="ss_inp" placeholder="请输入搜索关键词"/>
-            <input type="button" class="ss_btn"/>
+        <form class="ss" action="${ctxPath}/searchFor"  accept-charset="UTF-8" method="post">
+            <input type="hidden" value="${site.siteId!}" name="siteId">
+            <input type="hidden" value="title" name="type">
+            <input type="text" class="ss_inp" placeholder="请输入搜索关键词" name="keyword"
+                   onblur="if (this.value == ''){this.value = '';}" onfocus="if (this.value == '请输入搜索关键词') {this.value = '';}"/>
+            <button type="submit" class="ss_btn"></button>
         </form>
         </form>
     </div>
     </div>
 </div>
 </div>

+ 64 - 0
src/main/resources/templates/www/tuiyijunren/list-dpsg.html

@@ -0,0 +1,64 @@
+<!--头部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/header.html"){}
+<!--头部结束-->
+<!--中间内容开始-->
+<script>
+	function renderPost(post_str,id) {
+		console.log(post_str)
+		// let html = "<h4>";
+		let arr = post_str.replace(/ /g,"").replace(/,/g," | ");
+		// html += arr + "</h4>"
+		/*for (let i = 0; i < arr.length; i++) {
+			html += +arr[i]+" | ";
+		}*/
+
+		// console.log(html);
+		// return html;
+		$("#"+id).html(arr);
+	}
+</script>
+<div class="er_content clearfix">
+	<div class="er_left fl">
+		<div class="er_nav">
+			<h4>就业信息</h4>
+			<#cms_category_list  siteId="${site.siteId}" categoryId="1218" isNav="0" var="bean">
+				<a id="${bean.categoryId}" href="${frontPath}/${site.siteId}/${bean.categoryId}.html">${bean.categoryName}</a>
+			</#cms_category_list>
+		</div>
+	</div>
+	<div class="er_right fl">
+		<div class="zyjn_list clearfix">
+			<#cms_pagination siteId="${site.siteId}" categoryId="${categoryId}" page="${page}" moreNum="6" var="page">
+				<#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="3" isHot="0" hasChild="0" isRecommend="0" size="4" titleLen="24" var="bean" pageNumber="${page.current}">
+					<div class="zyjn_list_div">
+							<img src="${bean.thumb!}" alt="${bean.title!}"/>
+							<h1>${bean.title!}</h1>
+<!--							<h4>${bean.position_tag!}</h4>-->
+							<h4  id="${bean.content_id!}"></h4>
+							<script>
+								renderPost("${bean.position_tag!}","${bean.content_id!}");
+							</script>
+							<p>行业平均薪资</p>
+							<b>¥${bean.industry_average_ssalary!}</b>
+							<a class="zyjn_more" href="${frontPath}/${site.siteId}/${bean.categoryId}/${bean.contentId}.html">查看详细</a>
+					</div>
+				</#cms_content_list>
+			</#cms_pagination>
+		</div>
+		<div class="fenye">
+			@includeFileTemplate("/www/tuiyijunren/include/page.html"){}
+		</div>
+	</div>
+</div>
+<script>
+	$(function () {
+		let id = "${categoryId}";
+		$("#"+id).addClass("on");
+	});
+</script>
+<!--中间内容结束-->
+<!--底部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/footer.html"){}
+<!--底部结束-->
+</body>
+</html>

+ 21 - 0
src/main/resources/templates/www/tuiyijunren/listForSearch.html

@@ -0,0 +1,21 @@
+<!--头部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/header.html"){}
+<!--头部结束-->
+<div class="er_content">
+	<div class="news_list">
+		@for(item in model.list){
+			<a class="hzqy_list_div clearfix" href="${frontPath}/${siteId}/${item.categoryId}/${item.contentId}.html" style="color: #1b1b1b">
+				<div class="hzqy_list_text">
+					<h2>${item.title!}</h2>
+					<span>发布时间:${item.inputdate,dateFormat="YYYY-MM-dd"}</span>
+				</div>
+			</a>
+		@}
+	</div>
+</div>
+<!--中间内容结束-->
+<!--底部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/footer.html"){}
+<!--底部结束-->
+</body>
+</html>