|
@@ -1,28 +1,35 @@
|
|
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
|
|
|
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
|
|
|
<html>
|
|
|
<head>
|
|
|
- <title>直播管理</title>
|
|
|
- <meta name="decorator" content="default"/>
|
|
|
- <style type="text/css">
|
|
|
- .table th{text-align: center;}
|
|
|
- .table td{text-align: center;}
|
|
|
- .topSelect{
|
|
|
+ <title>直播管理</title>
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
+ <style type="text/css">
|
|
|
+ .table th {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .table td {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .topSelect {
|
|
|
width: 80px;
|
|
|
position: absolute;
|
|
|
right: 45px;
|
|
|
background-color: white;
|
|
|
}
|
|
|
- </style>
|
|
|
- <script type="text/javascript">
|
|
|
- $(document).ready(function() {
|
|
|
-
|
|
|
- });
|
|
|
- function page(n,s){
|
|
|
- $("#pageNo").val(n);
|
|
|
- $("#pageSize").val(s);
|
|
|
- $("#searchForm").submit();
|
|
|
- return false;
|
|
|
+ </style>
|
|
|
+ <script type="text/javascript">
|
|
|
+ $(document).ready(function () {
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ function page(n, s) {
|
|
|
+ $("#pageNo").val(n);
|
|
|
+ $("#pageSize").val(s);
|
|
|
+ $("#searchForm").submit();
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
function updateStatus(status, ids, type) {
|
|
@@ -31,19 +38,19 @@
|
|
|
if ('0' == status) {
|
|
|
msg = '确定停用该直播吗?';
|
|
|
}
|
|
|
- }else if ('crmValidFlag' == type) {
|
|
|
+ } else if ('crmValidFlag' == type) {
|
|
|
if ('0' == status) {
|
|
|
msg = '确定停用该直播吗?';
|
|
|
}
|
|
|
- }else if ('delFlag' == type) {
|
|
|
+ } else if ('delFlag' == type) {
|
|
|
msg = '确定删除该直播吗?';
|
|
|
- }else if ('topPosition' == type) {
|
|
|
+ } else if ('topPosition' == type) {
|
|
|
msg = '确认置顶该直播吗?'
|
|
|
//已有的置顶直播数量
|
|
|
var topLength = ${topLength};
|
|
|
if (status - 1 > topLength) {
|
|
|
- var emptyPosition = topLength == 0 ? '一' : '二' ;
|
|
|
- msg = '由于当前没有第'+ emptyPosition +'位的置顶直播,将直接把该条直播置顶为第'+emptyPosition+'位';
|
|
|
+ var emptyPosition = topLength == 0 ? '一' : '二';
|
|
|
+ msg = '由于当前没有第' + emptyPosition + '位的置顶直播,将直接把该条直播置顶为第' + emptyPosition + '位';
|
|
|
status = topLength == 0 ? 1 : topLength == 1 ? 2 : topLength == 2 ? 3 : topLength == 3 ? 4 : 5;
|
|
|
}
|
|
|
} else if ('clearTopPosition' == type) {
|
|
@@ -54,7 +61,7 @@
|
|
|
$.post("${ctx}/live/newPageLive/updateStatus", {
|
|
|
'status': status,
|
|
|
'id': ids,
|
|
|
- 'type':type
|
|
|
+ 'type': type
|
|
|
}, function (data) {
|
|
|
if (true == data.success) {
|
|
|
$.jBox.tip(data.msg, 'info');
|
|
@@ -63,159 +70,206 @@
|
|
|
}
|
|
|
setTimeout(function () {
|
|
|
$("#searchForm").submit();
|
|
|
- },800)
|
|
|
+ }, 800)
|
|
|
}, "JSON");//这里返回的类型有:json,html,xml,text
|
|
|
}
|
|
|
return;
|
|
|
}, {buttonsFocus: 1, persistent: true});
|
|
|
}
|
|
|
|
|
|
- //展示置顶选项
|
|
|
- function showTopSelect(index,status) {
|
|
|
- var homePageImage = $("#homePageImage" + index).text();
|
|
|
- if (homePageImage != "") {
|
|
|
- if ('open' == status) {
|
|
|
- document.getElementById("topSelect" + index).style.cssText = "display:block";
|
|
|
- } else if ('close' == status) {
|
|
|
- document.getElementById("topSelect" + index).style.cssText = "display:none";
|
|
|
- }
|
|
|
- }else {
|
|
|
- alertx("请先去编辑页面上传商城首页图再置顶")
|
|
|
- }
|
|
|
+ //展示置顶选项
|
|
|
+ function showTopSelect(index, status) {
|
|
|
+ var homePageImage = $("#homePageImage" + index).text();
|
|
|
+ if (homePageImage != "") {
|
|
|
+ if ('open' == status) {
|
|
|
+ document.getElementById("topSelect" + index).style.cssText = "display:block";
|
|
|
+ } else if ('close' == status) {
|
|
|
+ document.getElementById("topSelect" + index).style.cssText = "display:none";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ alertx("请先去编辑页面上传商城首页图再置顶")
|
|
|
+ }
|
|
|
}
|
|
|
- </script>
|
|
|
+ </script>
|
|
|
</head>
|
|
|
<body>
|
|
|
- <ul class="nav nav-tabs">
|
|
|
- <li class="active"><a href="${ctx}/live/newPageLive/">直播列表</a></li>
|
|
|
- <li><a href="${ctx}/live/newPageLive/advertisingImage">添加直播宣传图</a></li>
|
|
|
- </ul>
|
|
|
- <form:form id="searchForm" modelAttribute="newPageLive" action="${ctx}/live/newPageLive/" method="post" class="breadcrumb form-search">
|
|
|
- <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
|
- <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
|
- <div class="ul-form">
|
|
|
- <label>ID:</label>
|
|
|
- <form:input path="id" htmlEscape="false" maxlength="11" class="input-medium"/>
|
|
|
- <label>名称:</label>
|
|
|
- <form:input path="liveTitle" htmlEscape="false" maxlength="10" class="input-medium"/>
|
|
|
- <label>网站状态:</label>
|
|
|
- <form:select path="wwwValidFlag" class="input-medium">
|
|
|
- <form:option value="" label="全部"/>
|
|
|
- <form:option value="1" label="启用"/>
|
|
|
- <form:option value="0" label="停用"/>
|
|
|
- </form:select>
|
|
|
+<ul class="nav nav-tabs">
|
|
|
+ <li class="active"><a href="${ctx}/live/newPageLive/">直播列表</a></li>
|
|
|
+ <li><a href="${ctx}/live/newPageLive/advertisingImage">添加直播宣传图</a></li>
|
|
|
+</ul>
|
|
|
+<form:form id="searchForm" modelAttribute="newPageLive" action="${ctx}/live/newPageLive/" method="post"
|
|
|
+ class="breadcrumb form-search">
|
|
|
+<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
|
+<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
|
+<div class="ul-form">
|
|
|
+ <div class="flex-wrap">
|
|
|
+ <div class="item">
|
|
|
+ <label>ID:</label>
|
|
|
+ <form:input path="id" htmlEscape="false" maxlength="11" class="input-medium"/>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <label>名称:</label>
|
|
|
+ <form:input path="liveTitle" htmlEscape="false" maxlength="10" class="input-medium"/>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <label>网站状态:</label>
|
|
|
+ <form:select path="wwwValidFlag" class="input-medium">
|
|
|
+ <form:option value="" label="全部"/>
|
|
|
+ <form:option value="1" label="启用"/>
|
|
|
+ <form:option value="0" label="停用"/>
|
|
|
+ </form:select>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
<label>小程序状态:</label>
|
|
|
- <form:select path="crmValidFlag" class="input-medium">
|
|
|
- <form:option value="" label="全部"/>
|
|
|
- <form:option value="1" label="启用"/>
|
|
|
- <form:option value="0" label="停用"/>
|
|
|
- </form:select>
|
|
|
- <label>直播状态:</label>
|
|
|
- <form:select path="liveStatus" class="input-medium">
|
|
|
- <form:option value="" label="全部"/>
|
|
|
- <form:option value="1" label="未开始"/>
|
|
|
- <form:option value="2" label="直播中"/>
|
|
|
- <form:option value="3" label="已结束"/>
|
|
|
- </form:select>
|
|
|
- <label>首页置顶:</label>
|
|
|
- <form:select path="topFlag" class="input-medium">
|
|
|
- <form:option value="" label="全部"/>
|
|
|
- <form:option value="1" label="是"/>
|
|
|
- <form:option value="0" label="否"/>
|
|
|
- </form:select>
|
|
|
- <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
|
|
|
+ <form:select path="crmValidFlag" class="input-medium">
|
|
|
+ <form:option value="" label="全部"/>
|
|
|
+ <form:option value="1" label="启用"/>
|
|
|
+ <form:option value="0" label="停用"/>
|
|
|
+ </form:select>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <label>直播状态:</label>
|
|
|
+ <form:select path="liveStatus" class="input-medium">
|
|
|
+ <form:option value="" label="全部"/>
|
|
|
+ <form:option value="1" label="未开始"/>
|
|
|
+ <form:option value="2" label="直播中"/>
|
|
|
+ <form:option value="3" label="已结束"/>
|
|
|
+ </form:select>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <label>开始时间</label>
|
|
|
+ <input name="firstStartTime" type="text" readonly="readonly" maxlength="20"
|
|
|
+ class="input-medium Wdate required" id="firstStartTime"
|
|
|
+ value="<fmt:formatDate value="${newPageLive.firstStartTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/> 至
|
|
|
+ <input name="secondStartTime" type="text" readonly="readonly" maxlength="20"
|
|
|
+ class="input-medium Wdate required" id="secondStartTime"
|
|
|
+ value="<fmt:formatDate value="${newPageLive.secondStartTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <label>首页置顶:</label>
|
|
|
+ <form:select path="topFlag" class="input-medium">
|
|
|
+ <form:option value="" label="全部"/>
|
|
|
+ <form:option value="1" label="是"/>
|
|
|
+ <form:option value="0" label="否"/>
|
|
|
+ </form:select>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
|
|
|
<a class="btn btn-primary" href="${ctx}/live/newPageLive/form" style="margin-left: 15px">添加直播</a>
|
|
|
<div class="clearfix"></div>
|
|
|
- </div>
|
|
|
- </form:form>
|
|
|
- <sys:message content="${message}"/>
|
|
|
- <table id="contentTable" class="table table-striped table-bordered table-condensed">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>ID</th>
|
|
|
- <th>名称</th>
|
|
|
- <th>首页图片</th>
|
|
|
- <th>直播链接</th>
|
|
|
- <th>网站状态</th>
|
|
|
- <th>小程序状态</th>
|
|
|
- <th>直播状态</th>
|
|
|
- <th>首页置顶位</th>
|
|
|
- <th>创建时间</th>
|
|
|
- <th>操作</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <c:forEach items="${page.list}" var="newPageLive" varStatus="index">
|
|
|
- <tr>
|
|
|
- <td style="width: 60px">
|
|
|
- ${newPageLive.id}
|
|
|
- </td>
|
|
|
- <td style="width: 300px">
|
|
|
- ${newPageLive.liveTitle}
|
|
|
- </td>
|
|
|
- <td style="width: 70px">
|
|
|
- <label style="display: none" id="homePageImage${index.index}">${newPageLive.homePageImage}</label>
|
|
|
- <img src="${newPageLive.homePageImage eq ''?'/static/images/default_logo.png':newPageLive.homePageImage}" style="width: 60px;height: 60px">
|
|
|
- </td>
|
|
|
- <td >
|
|
|
- <a style="display: inline-block;overflow: hidden; text-overflow: ellipsis; width: 220px" href="${newPageLive.link}">${newPageLive.link}</a>
|
|
|
- </td>
|
|
|
- <td style="width: 120px">
|
|
|
- <c:if test="${newPageLive.wwwValidFlag eq 1 }">
|
|
|
- <font color="green" style="margin-right: 10px">已启用</font>
|
|
|
- <a style="margin-left: 10px;text-decoration: underline" href="javascript:void(0);" onclick="updateStatus('0','${newPageLive.id}','wwwValidFlag');">停用</a>
|
|
|
- </c:if>
|
|
|
- <c:if test="${newPageLive.wwwValidFlag ne 1 }">
|
|
|
- <font color="red" style="margin-right: 10px">已停用</font>
|
|
|
- <a style="margin-left: 10px;text-decoration: underline" href="javascript:void(0)" onclick="updateStatus('1','${newPageLive.id}','wwwValidFlag');">启用</a>
|
|
|
- </c:if>
|
|
|
- </td>
|
|
|
- <td style="width: 120px">
|
|
|
- <c:if test="${newPageLive.crmValidFlag eq 1 }">
|
|
|
- <font color="green" style="margin-right: 10px">已启用</font>
|
|
|
- <a style="margin-left: 10px;text-decoration: underline" href="javascript:void(0);" onclick="updateStatus('0','${newPageLive.id}','crmValidFlag');">停用</a>
|
|
|
- </c:if>
|
|
|
- <c:if test="${newPageLive.crmValidFlag ne 1 }">
|
|
|
- <font color="red" style="margin-right: 10px">已停用</font>
|
|
|
- <a style="margin-left: 10px;text-decoration: underline" href="javascript:void(0)" onclick="updateStatus('1','${newPageLive.id}','crmValidFlag');">启用</a>
|
|
|
- </c:if>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- ${newPageLive.liveStatus eq '1'?'未开始':newPageLive.liveStatus eq '2'?'直播中':newPageLive.liveStatus eq '3'?'已结束':'未知'}
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- ${newPageLive.topPosition}
|
|
|
- </td>
|
|
|
- <td style="width: 160px">
|
|
|
- ${newPageLive.createTime}
|
|
|
- </td>
|
|
|
- <td style="width: 200px">
|
|
|
- <a href="${ctx}/live/newPageLive/form?id=${newPageLive.id}">编辑</a>
|
|
|
- <a onclick="updateStatus('1','${newPageLive.id}','delFlag')" href="javascript:void(0)">删除</a>
|
|
|
- <a onclick="showTopSelect(${index.index},'open')" href="javascript:void(0)">首页置顶</a>
|
|
|
- <c:if test="${newPageLive.topPosition ne null}">
|
|
|
- <a onclick="updateStatus('','${newPageLive.id}','clearTopPosition')" href="javascript:void(0)">清除置顶</a>
|
|
|
- </c:if>
|
|
|
- <div style="display: none" class="topSelect" id="topSelect${index.index}" onmouseleave="showTopSelect(${index.index},'close')">
|
|
|
- <table style="border: 2px solid #000000;" cellpadding="0" cellspacing="0">
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td><a onclick="updateStatus('1',${newPageLive.id},'topPosition')" href="javascript:void(0)">置顶第一位</a></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td><a onclick="updateStatus('2',${newPageLive.id},'topPosition')" href="javascript:void(0)">置顶第二位</a></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td><a onclick="updateStatus('3',${newPageLive.id},'topPosition')" href="javascript:void(0)">置顶第三位</a></td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </c:forEach>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- <div class="pagination">${page}</div>
|
|
|
+ </div>
|
|
|
+ </form:form>
|
|
|
+ <sys:message content="${message}"/>
|
|
|
+ <table id="contentTable" class="table table-striped table-bordered table-condensed">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>ID</th>
|
|
|
+ <th>名称</th>
|
|
|
+ <th>首页图片</th>
|
|
|
+ <th>直播链接</th>
|
|
|
+ <th>网站状态</th>
|
|
|
+ <th>小程序状态</th>
|
|
|
+ <th>直播状态</th>
|
|
|
+ <th>首页置顶位</th>
|
|
|
+ <th>创建时间</th>
|
|
|
+ <th>开始时间</th>
|
|
|
+ <th>结束时间</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <c:forEach items="${page.list}" var="newPageLive" varStatus="index">
|
|
|
+ <tr>
|
|
|
+ <td style="width: 60px">
|
|
|
+ ${newPageLive.id}
|
|
|
+ </td>
|
|
|
+ <td style="width: 300px">
|
|
|
+ ${newPageLive.liveTitle}
|
|
|
+ </td>
|
|
|
+ <td style="width: 70px">
|
|
|
+ <label style="display: none"
|
|
|
+ id="homePageImage${index.index}">${newPageLive.homePageImage}</label>
|
|
|
+ <img src="${newPageLive.homePageImage eq ''?'/static/images/default_logo.png':newPageLive.homePageImage}"
|
|
|
+ style="width: 60px;height: 60px">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <a style="display: inline-block;overflow: hidden; text-overflow: ellipsis; width: 220px"
|
|
|
+ href="${newPageLive.link}">${newPageLive.link}</a>
|
|
|
+ </td>
|
|
|
+ <td style="width: 120px">
|
|
|
+ <c:if test="${newPageLive.wwwValidFlag eq 1 }">
|
|
|
+ <font color="green" style="margin-right: 10px">已启用</font>
|
|
|
+ <a style="margin-left: 10px;text-decoration: underline" href="javascript:void(0);"
|
|
|
+ onclick="updateStatus('0','${newPageLive.id}','wwwValidFlag');">停用</a>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${newPageLive.wwwValidFlag ne 1 }">
|
|
|
+ <font color="red" style="margin-right: 10px">已停用</font>
|
|
|
+ <a style="margin-left: 10px;text-decoration: underline" href="javascript:void(0)"
|
|
|
+ onclick="updateStatus('1','${newPageLive.id}','wwwValidFlag');">启用</a>
|
|
|
+ </c:if>
|
|
|
+ </td>
|
|
|
+ <td style="width: 120px">
|
|
|
+ <c:if test="${newPageLive.crmValidFlag eq 1 }">
|
|
|
+ <font color="green" style="margin-right: 10px">已启用</font>
|
|
|
+ <a style="margin-left: 10px;text-decoration: underline" href="javascript:void(0);"
|
|
|
+ onclick="updateStatus('0','${newPageLive.id}','crmValidFlag');">停用</a>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${newPageLive.crmValidFlag ne 1 }">
|
|
|
+ <font color="red" style="margin-right: 10px">已停用</font>
|
|
|
+ <a style="margin-left: 10px;text-decoration: underline" href="javascript:void(0)"
|
|
|
+ onclick="updateStatus('1','${newPageLive.id}','crmValidFlag');">启用</a>
|
|
|
+ </c:if>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ ${newPageLive.liveStatus eq '1'?'未开始':newPageLive.liveStatus eq '2'?'直播中':newPageLive.liveStatus eq '3'?'已结束':'未知'}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ ${newPageLive.topPosition}
|
|
|
+ </td>
|
|
|
+ <td style="width: 160px">
|
|
|
+ ${newPageLive.createTime}
|
|
|
+ </td>
|
|
|
+ <td style="width: 160px">
|
|
|
+ <fmt:formatDate value="${newPageLive.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
|
|
|
+ </td>
|
|
|
+ <td style="width: 160px">
|
|
|
+ <fmt:formatDate value="${newPageLive.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
|
|
|
+ </td>
|
|
|
+ <td style="width: 200px">
|
|
|
+ <a href="${ctx}/live/newPageLive/form?id=${newPageLive.id}">编辑</a>
|
|
|
+ <a onclick="updateStatus('1','${newPageLive.id}','delFlag')"
|
|
|
+ href="javascript:void(0)">删除</a>
|
|
|
+ <a onclick="showTopSelect(${index.index},'open')" href="javascript:void(0)">首页置顶</a>
|
|
|
+ <c:if test="${newPageLive.topPosition ne null}">
|
|
|
+ <a onclick="updateStatus('','${newPageLive.id}','clearTopPosition')"
|
|
|
+ href="javascript:void(0)">清除置顶</a>
|
|
|
+ </c:if>
|
|
|
+ <div style="display: none" class="topSelect" id="topSelect${index.index}"
|
|
|
+ onmouseleave="showTopSelect(${index.index},'close')">
|
|
|
+ <table style="border: 2px solid #000000;" cellpadding="0" cellspacing="0">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td><a onclick="updateStatus('1',${newPageLive.id},'topPosition')"
|
|
|
+ href="javascript:void(0)">置顶第一位</a></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><a onclick="updateStatus('2',${newPageLive.id},'topPosition')"
|
|
|
+ href="javascript:void(0)">置顶第二位</a></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><a onclick="updateStatus('3',${newPageLive.id},'topPosition')"
|
|
|
+ href="javascript:void(0)">置顶第三位</a></td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <div class="pagination">${page}</div>
|
|
|
</body>
|
|
|
</html>
|