Parcourir la source

Merge remote-tracking branch 'origin/master'

lyq il y a 4 mois
Parent
commit
8b7f506178

+ 9 - 1
src/main/java/com/sooka/module/web/cms/IndexController.java

@@ -224,23 +224,31 @@ public class IndexController {
     @GetMapping("/${system.site.prefix}/{siteId}/{categoryId}")
     public String category(@PathVariable("siteId") Integer siteId,
                            @PathVariable("categoryId") Long categoryId,
-                           Model model){
+                           Model model, HttpServletRequest request){
         log.debug("栏目");
         TCmsSite site = siteService.findById(siteId);
         if(CmsUtil.isNullOrEmpty(site)) {
             throw new CmsException(CmsConst.SITE_NOT_FOUND);
         }
         TCmsCategory category = categoryService.findById(categoryId);
+        if (request.getSession().getAttribute(LOGIN_USER) == null) {
+            model.addAttribute("showState", false);
+        } else {
+            model.addAttribute("showState", true);
+        }
         if(CmsUtil.isNullOrEmpty(category)) {
             throw new CmsException(CmsConst.CATEGORY_NOT_FOUND);
         }
         PageInfo page = contentService.page(1,siteId,category.getCategoryId());
         model.addAttribute("title",category.getCategoryName());
+
         model.addAttribute("keyword",site.getKeyword());
         model.addAttribute("description",site.getDescription());
         model.addAttribute("site",site);
         model.addAttribute("category",category);
         model.addAttribute("page",page);
+
+
         if(StrUtil.isBlank(site.getTemplate())) {
             return view(category.getIndexTpl());
         }

+ 41 - 0
src/main/resources/templates/www/tuiyijunren/content-yzgw.html

@@ -0,0 +1,41 @@
+
+<!--头部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/header.html"){}
+<!--头部结束-->
+
+
+<!--中间内容开始-->
+<div class="er_content">
+	<div class="dqwz"><span>当前位置:<a href="${frontPath}/${site.siteId}">网站首页</a>><a href="${frontPath}/${site.siteId}/1237.html">优质岗位</a></span></div>
+	<div class="news_txt jy_news">
+		<div class="jy_news_top">
+			<h1>${content.title!}</h1>
+			<h2>${content.pay!}</h2>
+			<h4><span class="address">${content.address!}</span>&nbsp;&nbsp;${reg.replace(content.experience_and_education,"/","&nbsp;&nbsp;|&nbsp;&nbsp;")}</h4>
+			<div class="jy_news_top_right">
+				<p>咨询电话:${content.phone!}</p>
+			</div>
+		</div>
+		<div class="jy_news_con clearfix">
+			<div class="jy_news_con_left">
+				<p>${content.company_content}</p>
+			</div>
+			<div class="jy_news_con_right">
+				<img src="${content.company_logo!}" class="yq_img"/>
+				<h4>${content.company_name!}</h4>
+				<span class="lx">${content.company_industry}</span>
+				<span class="ry">${content.company_size!}</span>
+				<!--<span class="rz">不需要融资</span>-->
+				<a class="qy_more" href="${content.company_home!}">公司主页</a>
+			</div>
+
+		</div>
+	</div>
+</div>
+<!--中间内容结束-->
+
+<!--底部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/footer.html"){}
+<!--底部结束-->
+</body>
+</html>

+ 4 - 3
src/main/resources/templates/www/tuiyijunren/index.html

@@ -71,9 +71,10 @@
     <!--  通知公告 国家政策 地方政策 结束-->
     <div style="clear: both"></div>
     <!--  留言 咨询 开始-->
-    <div class="massage" aos="fade-up"><a class="massage_ly"><img src="${resPath}/tuiyijunren/images/twjr_icon6.png"/>留言</a>
-        <a
-                class="massage_zx"><img src="${resPath}/tuiyijunren/images/twjr_icon7.png"/>咨询</a></div>
+<!--    <div class="massage" aos="fade-up">-->
+<!--        <a class="massage_ly"><img src="${resPath}/tuiyijunren/images/twjr_icon6.png"/>留言</a>-->
+<!--        <a class="massage_zx"><img src="${resPath}/tuiyijunren/images/twjr_icon7.png"/>咨询</a>-->
+<!--    </div>-->
     <!--  留言 咨询 结束-->
     <!--职业技能培训 开始-->
     <div class="zyjn_div" aos="fade-up">

+ 26 - 10
src/main/resources/templates/www/tuiyijunren/list-dpsg.html

@@ -4,25 +4,41 @@
 <!--中间内容开始-->
 <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);
 	}
+
+	function showState(categoryName, state, id, aId, href){
+		//state == true  为已经登录
+		var html = $("#"+id);
+		if(state){
+			console.log("用户已经登陆")
+			var link = $("<a>", {
+				href: href, // 设置链接的href属性
+				text: categoryName, // 设置链接的文本
+				id: aId // 可选:添加一个ID
+			});
+			html.append(link);
+		}else{
+			console.log("用户未登录")
+			if("招聘信息" !== categoryName && "优质岗位" !== categoryName){
+				var link = $("<a>", {
+					href: href, // 设置链接的href属性
+					text: categoryName, // 设置链接的文本
+					id: aId // 可选:添加一个ID
+				});
+				html.append(link);
+			}
+		}
+	}
 </script>
 <div class="er_content clearfix">
 	<div class="er_left fl">
 		<div class="er_nav">
 			<h4>就业信息</h4>
+			<span id="${site.siteId}"></span>
 			<#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>
+			<script>showState("${bean.categoryName}", ${showState}, "${site.siteId}", "${bean.categoryId}", "${frontPath}/${site.siteId}/${bean.categoryId}.html")</script>
 			</#cms_category_list>
 		</div>
 	</div>

+ 32 - 1
src/main/resources/templates/www/tuiyijunren/list-jyxx.html

@@ -1,13 +1,44 @@
 <!--头部开始-->
 @includeFileTemplate("/www/tuiyijunren/include/header.html"){}
 <!--头部结束-->
+<style>
+    .yincang{
+        display: none;
+    }
+</style>
+<script>
+	function showState(categoryName, state, id, aId, href){
+		//state == true  为已经登录
+		var html = $("#"+id);
+        if(state){
+            console.log("用户已经登陆")
+            var link = $("<a>", {
+                href: href, // 设置链接的href属性
+                text: categoryName, // 设置链接的文本
+                id: aId // 可选:添加一个ID
+            });
+            html.append(link);
+        }else{
+            console.log("用户未登录")
+            if("招聘信息" !== categoryName && "优质岗位" !== categoryName){
+                var link = $("<a>", {
+                    href: href, // 设置链接的href属性
+                    text: categoryName, // 设置链接的文本
+                    id: aId // 可选:添加一个ID
+                });
+                html.append(link);
+            }
+        }
+	}
+</script>
 <!--中间内容开始-->
 <div class="er_content clearfix">
 	<div class="er_left fl">
 		<div class="er_nav">
 			<h4>就业信息</h4>
+			<span id="${site.siteId}"></span>
 			<#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>
+				<script>showState("${bean.categoryName}", ${showState}, "${site.siteId}", "${bean.categoryId}", "${frontPath}/${site.siteId}/${bean.categoryId}.html")</script>
 			</#cms_category_list>
 		</div>
 	</div>

+ 139 - 0
src/main/resources/templates/www/tuiyijunren/list-yzgw.html

@@ -0,0 +1,139 @@
+<!--头部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/header.html"){}
+<!--头部结束-->
+<!--中间内容开始-->
+<script>
+    function renderPost(post_str,id) {
+        let html = "";
+        let arr = post_str.split("/");
+        for (let i = 0; i < arr.length; i++) {
+            html += "<span>"+arr[i]+"</span>";
+        }
+        $("#"+id).html(html);
+    }
+    function getList(list,id,reg) {
+        console.log(list)
+        console.log(id)
+        console.log(reg)
+    }
+</script>
+<div class="er_content clearfix">
+    <div class="er_left fl">
+        <div class="er_nav">
+            <h4>优质岗位</h4>
+            <#cms_category_list  siteId="${site.siteId}" categoryId="1223" 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="zp_nav">
+            <span class="on">IT/互联网服务业</span>
+            <span>汽车/制造</span>
+            <span>贸易/零售</span>
+            <span>房地产/建筑</span>
+            <span>医疗/化工</span>
+            <span>消费品</span>
+            <span>文化/传媒</span>
+            <span>金融</span>
+            <span>其他</span>
+        </div>
+        <div class="yzgw_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="yzgw_list_div" aos="fade-up">
+                <h1>${bean.title!}<b>${bean.pay!}</b></h1>
+                <h4 id="${bean.content_id!}">
+                    <script>
+                        renderPost("${bean.salary_treatment!}","${bean.content_id!}");
+                    </script>
+                </h4>
+                <p><span class="address">${bean.address!}</span>&nbsp;&nbsp;${reg.replace(bean.experience_and_education,"/","&nbsp;&nbsp;")}</p>
+                <a class="zp_more" href="${bean.url}">查看详细</a>
+            </div>
+                </#cms_content_list>
+            </#cms_pagination>
+        </div>
+        <div class="yzgw_list clearfix">
+            <div class="yzgw_list_div" aos="fade-up">
+                <h1>动画学院行政1<b>5K-8K</b></h1>
+                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
+                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
+                <a class="zp_more">查看详细</a>
+            </div>
+        </div>
+        <div class="yzgw_list clearfix">
+            <div class="yzgw_list_div" aos="fade-up">
+                <h1>动画学院行政2<b>5K-8K</b></h1>
+                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
+                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
+                <a class="zp_more">查看详细</a>
+            </div>
+        </div>
+        <div class="yzgw_list clearfix">
+            <div class="yzgw_list_div" aos="fade-up">
+                <h1>动画学院行政3<b>5K-8K</b></h1>
+                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
+                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
+                <a class="zp_more">查看详细</a>
+            </div>
+        </div>
+        <div class="yzgw_list clearfix">
+            <div class="yzgw_list_div" aos="fade-up">
+                <h1>动画学院行政4<b>5K-8K</b></h1>
+                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
+                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
+                <a class="zp_more">查看详细</a>
+            </div>
+        </div>
+        <div class="yzgw_list clearfix">
+            <div class="yzgw_list_div" aos="fade-up">
+                <h1>动画学院行政5<b>5K-8K</b></h1>
+                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
+                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
+                <a class="zp_more">查看详细</a>
+            </div>
+        </div>
+        <div class="yzgw_list clearfix">
+            <div class="yzgw_list_div" aos="fade-up">
+                <h1>动画学院行政6<b>5K-8K</b></h1>
+                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
+                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
+                <a class="zp_more">查看详细</a>
+            </div>
+        </div>
+        <div class="yzgw_list clearfix">
+            <div class="yzgw_list_div" aos="fade-up">
+                <h1>动画学院行政7<b>5K-8K</b></h1>
+                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
+                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
+                <a class="zp_more">查看详细</a>
+            </div>
+        </div>
+        <div class="yzgw_list clearfix">
+            <div class="yzgw_list_div" aos="fade-up">
+                <h1>动画学院行政8<b>5K-8K</b></h1>
+                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
+                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
+                <a class="zp_more">查看详细</a>
+            </div>
+        </div>
+    </div>
+
+</div>
+<!--中间内容结束-->
+<!--底部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/footer.html"){}
+<!--底部结束-->
+<script>
+    $(function(){
+        //	列表切换
+        $('.yzgw_list').eq(0).show().siblings('.yzgw_list').hide();
+        $('.zp_nav span').hover(function(){
+            $(this).addClass('on').siblings('span').removeClass('on');
+            $('.yzgw_list').eq($(this).index()).show().siblings('.yzgw_list').hide();
+        });
+    })
+</script>
+</body>
+</html>