index.jsp 10.3 KB
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<head>
	<jsp:include page="${ctx }/view/common/meta.jsp" />
	<link href="${ctx }/resource/css/home.css" rel="stylesheet" type="text/css" />
	<link href="${ctx }/resource/js/utils/jquery/jquery.slideBox.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="${ctx }/resource/js/utils/jquery/jquery.slideBox.js"></script>
	<script type="text/javascript" src="${ctx }/resource/js/utils/jquery/jquery.kxbdmarquee.js"></script>
	<script type="text/javascript" src="${ctx }/resource/js/utils/jquery/jquery.rotate.min.js"></script>
	<script src="${ctx }/resource/js/trade/sockjs.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="${ctx }/resource/js/entrust/indexSocket.js?r=<%=Math.random() %>"></script>
	<script type="text/javascript" src="${ctx }/resource/js/home.js"></script>
	<link href="${ctx }/resource/js/css/layui.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="${ctx }/resource/js/layui.all.js"></script>
</head>
<body>
	<jsp:include page="${ctx }/view/common/header.jsp" />

	<%-- <div class="top_struct">
		<div class="sbox banner">
			<div id="demo1" class="slideBox" style="width: 1000px; height: 400px;">
				<ul class="items" style="margin-top: -17px;">
					<c:forEach items="${banners }" varStatus="status" var="banner">
						<li>
							<a href="${banner.url}"> 
								<img src="${banner.image}" width="1000" height="400" alt="${banner.title }" />
							</a>
						</li>
					</c:forEach>
				</ul>
			</div>
			<div class="slide-detail">
				<ul>
					<li>
						<a href="${ctx }/entrust/list">
							<img src=" ${ctx }/resource/images/newHomePage/tuoguan.png"></img>
							<span>托管</span>
						</a>
					</li>
					<li>
						<a href="${ctx }/user/charge">
							<img src=" ${ctx }/resource/images/newHomePage/chongzhi.png"></img>
							<span>充值</span>
						</a>
					</li>
					<li>
						<a href="${ctx }/register"> 
							<img src=" ${ctx }/resource/images/newHomePage/zhuce.png"></img> 
							<span>注册</span>
						</a>
					</li>
					<li>
						<a href="${ctx }/user/kiting"> 
							<img src=" ${ctx }/resource/images/newHomePage/tikuan.png"></img> 
							<span>提现</span>
						</a>
					</li>
				</ul>
				<!--<a class="zhuce-link" href="${ctx }/view/info/openAccount.jsp">查看注册流程</a>  -->

			</div>
			<div class="clear"></div>

		</div>
	</div> --%>

	<div class="sbox">
		<a id="entrust_anchor"></a>
		<table id="centerbox" width="100%" cellpadding="0" cellspacing="0">
			<c:forEach items="${entrusts}" var="entrust" varStatus="stat">
				<c:if test="${stat.index % 5 == 0 && stat.index < 20 }">
					<tr>
				</c:if>
				<c:if test="${stat.index % 5 == 0 && stat.index >= 20 }">
					<tr class="hide_entrust">
				</c:if>
				<td>
					<div>
						<a href="#"> 
							<img src="${entrust.IMAGE }" height="95" width="140" />
						</a>
					</div>
					<p style="text-align: left;">
						<a href="#">${entrust.SDC_NAME }</a> 
						<span style="float: right;">
							<c:if test="${entrust.PRICE == 0 }">--</c:if>
							<c:if test="${entrust.PRICE > 0 }">
								<fmt:formatNumber value="${entrust.PRICE}" pattern="0.00" />
							</c:if>

						</span>
					</p>
				</td>
				<c:if test="${stat.index % 5 == 4 }">
					</tr>
				</c:if>
			</c:forEach>
			<c:if test="${fn:length(entrusts) % 5 != 0 }"></tr></c:if>
			<tr>
				<td id="entrust_down" colspan="5" class="more">
					更多<img src="/resource/images/newHomePage/expand.png" width="27" height="13" />
				</td>
			</tr>
		</table>
	</div>

	<!--  最新发布/最新成交 (实时更新)-->
	<%-- <div class="sbox ">
		<div class="sbox-item new-publish">
			<div class="">
				<h3 class="left top-line">最新发布</h3>
				<p class="right">
					<a href="${ctx }/entrust/all">立即买卖</a>
				</p>
				<div style="clear: both"></div>
			</div>
			<div class="grayleftl ">
				<table cellpadding='0' cellspacing='0'>
					<thead>
						<tr>
							<th>代码</th>
							<th style="text-align: left; padding-left: 10px;">名称</th>
							<th>类型</th>
							<th>价格</th>
							<th>数量</th>
						</tr>
					</thead>
					<tbody id="tabLastEntrust"></tbody>
				</table>
			</div>
		</div>
		<div class="sbox-item  new-deal">
			<div class="">
				<h3 class="left top-line">最新成交</h3>
				<p class="right">
					<a href="${ctx }/entrust/record">更多</a>
				</p>
				<div style="clear: both"></div>
			</div>
			<div class="grayleftl ">
				<table cellpadding='0' cellspacing='0'>
					<thead>
						<tr>
							<th>代码</th>
							<th style="text-align: left; padding-left: 10px;">名称</th>
							<th>价格</th>
							<th>数量</th>
							<th>成交时间</th>
						</tr>
					</thead>
					<tbody id="tabLastBargin"></tbody>
				</table>
			</div>
		</div>
		<div style="clear: both"></div>
	</div>
 --%>
 
	<div class="sbox content">
		<div class="sbox-item notice ">
			<div class="paddingbottom10">
				<h3 class="left top-line">公告通知</h3>
				<p class="right">
					<a href="${ctx }/info/gonggao">更多</a>
				</p>
				<div style="clear: both"></div>
			</div>
			<div class="grayleftl ">
				<ul class="item-list">
					<c:forEach items="${gonggao}" var="zx" step="1" end="4" varStatus="s">
						<li>
							<a href="/trade/article?id=${zx.id}&cid=${zx.categoryId}" class=" item-detail" title="${zx.title}">${zx.title}</a>
							<p class=" item-time">
								<fmt:formatDate value="${zx.sortTime }" pattern="yyyy-MM-dd" />
							</p>
							<div style="clear: both"></div>
						</li>
					</c:forEach>

				</ul>
				
				<span id="box-show-notice-title"  style="display:none" data-title="${showggBox.title}">${showggBox.content}</span>

			</div>
		</div>
		<div class="news sbox-item">
			<div class="paddingbottom10">
				<h3 class="left top-line">新闻动态</h3>
				<p class="right">
					<a href="${ctx }/info/news">更多</a>
				</p>
				<div style="clear: both"></div>
			</div>
			<div class="grayleftl ">
				<ul class="item-list">
					<c:forEach items="${news }" var="article" step="1" end="4" varStatus="status">
						<c:if test="${status.count==1}">
							<%-- <dl>
		                     <dt class="left"><input type="hidden"  value=""  id="img_1"/><img src="" width="127" height="101"   id="title_img"/></dt>
			                 <dd><a href="/trade/article?id=${article.id}&cid=${newCategoryId}"><span class="xiaoyuanquanbgimg">${article.title}</span></a></dd>
			                 <dd class="graydate"><fmt:formatDate value="${article.sortTime }" pattern="yyyy-MM-dd" /></dd>
                         </dl> --%>
						</c:if>

						<li><a href="/trade/article?id=${article.id}&cid=${newCategoryId}" class=" item-detail" title="${article.title}">${article.title}</a>
							<p class=" item-time">
								<fmt:formatDate value="${article.sortTime }" pattern="yyyy-MM-dd" />
							</p>
							<div style="clear: both"></div></li>

					</c:forEach>
				</ul>
			</div>
		</div>

		<!-- 行情页显示 误删 -->
		<!--  <div class="quotation" style="display:none;">		
			<div class="paddingbottom10">
				<h3 class="left bigcircle">行 情</h3>
				<p class="right">
					<img src="${ctx }/resource/images/icons/more.jpg" width="18" height="11" />
				</p>
				<div style="clear:both"></div>
			</div>
			<div class="grayboxheight">
				<img src="${ctx }/resource/images/hangqing.jpg" width="306" height="110" />
				<ul class="title">
					<li class="quotationcol"><span> 编号 </span><span> 名称 </span><span> 现价 </span></li>
				</ul>
				<div id="scrollContentContainer">
		            <div id="exchangeInfoDiv">
		            	<ul id="exchangeInfoUl">
		            		
						</ul>
					    <ul id="exchangeInfoUl1">
					    	
						</ul>
		            </div>
	            </div>
	            
			</div> 
		</div>-->
		<div>
			<a href="${bannerRight.url }">
				<img class="bg-2" src="${bannerRight.image }" />
			</a>
		</div>
		<div class="clear"></div>
	</div>
	<div class="bg-3">
		<a href="${bannerBottom.url }">
			<img src="${bannerBottom.image }" />
		</a>
	</div>

	<!-- 
	 <c:if test="${!empty entrusts}">
	     <div class="bottomlb">
		   <div class="bigbox">
			<div class="cpml-list">
				<a class="prev">prev</a>
				<div class="img-list">
					<ul>
					    <c:forEach  items="${entrusts}"  var="entrust">
					       <li>
						         <a href="/entrust/info?id=${entrust.id}&entrustId=${entrust.entrustId}">
						         <img src="${entrust.entrustImage }" height="95" width="160" /></a>
								 <p class="bh">${entrust.entrustId }</p>
								 <p class="mc">
									 <a href="/entrust/info?id=${entrust.id}&entrustId=${entrust.entrustId}">${entrust.entrustName}</a>
								 </p>
							</li>
					     </c:forEach>						
					 </ul>
				</div>
				<a class="next">next</a>
			</div>
		</div>
	</div>
</c:if> -->
	<div class="clear"></div>
	<jsp:include page="${ctx }/view/common/bottom.jsp" />
	
	<SCRIPT type="text/javascript">
	
	layui.use('layer', function(){ //独立版的layer无需执行这一句
		  var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
		  var title = $("#box-show-notice-title").attr('data-title');
		  var content = $("#box-show-notice-title").html();
		  console.log(content)
	      //示范一个公告层
	      layer.open({
	        type: 1
	        ,title: title //不显示标题栏
	        ,closeBtn: false
	        ,area: ['1000px', '600px']
	        ,shade: 0.8
	        ,closeBtn:1
	        ,id: 'LAY_layuipro' //设定一个id,防止重复弹出
	        ,btn: ['详情', '关闭']
	        ,btnAlign: 'c'
	        ,moveType: 1 //拖拽模式,0或者1
	        ,content: '<div style="height: 459px;font-size: 14px;color: #333;line-height: 36px;padding: 9px;">'+content+'</div>'
	        ,success: function(layero){
	          var btn = layero.find('.layui-layer-btn');
	          btn.find('.layui-layer-btn0').attr({
	            href: 'https://www.zhao.com/trade/article?id=519&cid=24'
	            ,target: '_blank'
	          });
	        }
	      });
	});
	</SCRIPT>
</body>
</html>