|
@@ -5,87 +5,99 @@
|
|
<title>推送方式设置</title>
|
|
<title>推送方式设置</title>
|
|
<meta name="decorator" content="default"/>
|
|
<meta name="decorator" content="default"/>
|
|
<style>
|
|
<style>
|
|
- body {
|
|
|
|
|
|
+ .body {
|
|
padding: 30px;
|
|
padding: 30px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
-<form id="statusForm">
|
|
|
|
- <input id="cmAutoTypeId" name="cmAutoTypeId" type="hidden" value="${cmAutoType.id}"/>
|
|
|
|
- <div>
|
|
|
|
- <label style="float: left">推荐方式:</label>
|
|
|
|
- <div style="margin-left: 70px">
|
|
|
|
- <input type="radio" name="autoStatus" value="0" ${cmAutoType.autoStatus ne 1 ? "checked" : ""}>自动推送(设置自动推送后,则自动推送新发布的文章给所有机构)
|
|
|
|
- <br>
|
|
|
|
- <br>
|
|
|
|
- <input type="radio" name="autoStatus" value="1" ${cmAutoType.autoStatus eq 1 ? "checked" : ""}>手动推荐
|
|
|
|
- <br>
|
|
|
|
- <br>
|
|
|
|
- <button id="btnSave" class="btn btn-primary" type="button"
|
|
|
|
- onclick="checkInfo()" ${cmAutoType.autoStatus eq 1 ? "" : "disabled"}>选择需要推送的文章
|
|
|
|
- </button>
|
|
|
|
|
|
+<ul class="nav nav-tabs">
|
|
|
|
+ <c:if test="${cmAutoTypeRecord.type==2}">
|
|
|
|
+ <li><a href="${ctx}/cmpage/cmImage/?type=4&flag=4">活动专区列表</a></li>
|
|
|
|
+ <shiro:hasPermission name="cmpage:cmImage:edit">
|
|
|
|
+ <li><a href="${ctx}/cmpage/cmImage/form?flag=4&type=4">活动专区图添加</a></li>
|
|
|
|
+ </shiro:hasPermission>
|
|
|
|
+ </c:if>
|
|
|
|
+ <li class="active"><a
|
|
|
|
+ href="${ctx}/autoType/list?type=${cmAutoTypeRecord.type}">${cmAutoTypeRecord.type==1?"文章推送":"活动推送"}</a></li>
|
|
|
|
+</ul>
|
|
|
|
+<div class="body">
|
|
|
|
+ <form id="statusForm">
|
|
|
|
+ <input id="cmAutoTypeId" name="cmAutoTypeId" type="hidden" value="${cmAutoType.id}"/>
|
|
|
|
+ <div>
|
|
|
|
+ <label style="float: left">推荐方式:</label>
|
|
|
|
+ <div style="margin-left: 70px">
|
|
|
|
+ <input type="radio" name="autoStatus" value="0" ${cmAutoType.autoStatus ne 1 ? "checked" : ""}>自动推送(设置自动推送后,则自动推送新发布的文章给所有机构)
|
|
|
|
+ <br>
|
|
|
|
+ <br>
|
|
|
|
+ <input type="radio" name="autoStatus" value="1" ${cmAutoType.autoStatus eq 1 ? "checked" : ""}>手动推荐
|
|
|
|
+ <br>
|
|
|
|
+ <br>
|
|
|
|
+ <button id="btnSave" class="btn btn-primary" type="button"
|
|
|
|
+ onclick="checkInfo()" ${cmAutoType.autoStatus eq 1 ? "" : "disabled"}>
|
|
|
|
+ 选择需要推送的${cmAutoTypeRecord.type==1?"文章":"活动"}
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
-</form>
|
|
|
|
|
|
+ </form>
|
|
|
|
|
|
-<form:form id="searchForm" modelAttribute="cmAutoTypeRecord" action="${ctx}/autoType/list" 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}"/>
|
|
|
|
- <input id="type" name="type" type="hidden" value="${cmAutoTypeRecord.type}"/>
|
|
|
|
- <div class="ul-form">
|
|
|
|
- <label>ID:</label>
|
|
|
|
- <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
|
|
|
|
- <label>标题:</label>
|
|
|
|
- <form:input path="createTime" htmlEscape="false" maxlength="100" class="input-medium"/>
|
|
|
|
- <label>推荐类型:</label>
|
|
|
|
- <form:select path="autoStatus" class="input-medium">
|
|
|
|
- <form:option value="" label="请选择"/>
|
|
|
|
- <form:option value="0" label="自动推荐"/>
|
|
|
|
- <form:option value="1" label="手动推荐"/>
|
|
|
|
- </form:select>
|
|
|
|
- <label>推送时间:</label>
|
|
|
|
- <form:input path="startPvCreateTime" type="text" maxlength="20" class="input-mini Wdate"
|
|
|
|
- value="${fns:setDate(cmAutoTypeRecord.startPvCreateTime,'yyyy-MM-dd')}"
|
|
|
|
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
|
- -
|
|
|
|
- <form:input path="endPvCreateTime" type="text" maxlength="20" class="input-mini Wdate"
|
|
|
|
- value="${fns:setDate(cmAutoTypeRecord.endPvCreateTime,'yyyy-MM-dd')}"
|
|
|
|
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
|
- <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
|
|
|
|
- <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>
|
|
|
|
- </tr>
|
|
|
|
- </thead>
|
|
|
|
- <tbody>
|
|
|
|
- <c:forEach items="${page.list}" var="item">
|
|
|
|
|
|
+ <form:form id="searchForm" modelAttribute="cmAutoTypeRecord" action="${ctx}/autoType/list" 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}"/>
|
|
|
|
+ <input id="type" name="type" type="hidden" value="${cmAutoTypeRecord.type}"/>
|
|
|
|
+ <div class="ul-form">
|
|
|
|
+ <label>ID:</label>
|
|
|
|
+ <form:input path="authorId" htmlEscape="false" maxlength="11" class="input-mini"/>
|
|
|
|
+ <label>标题:</label>
|
|
|
|
+ <form:input path="title" htmlEscape="false" maxlength="100" class="input-medium"/>
|
|
|
|
+ <label>推荐类型:</label>
|
|
|
|
+ <form:select path="autoStatus" class="input-medium">
|
|
|
|
+ <form:option value="" label="请选择"/>
|
|
|
|
+ <form:option value="0" label="自动推荐"/>
|
|
|
|
+ <form:option value="1" label="手动推荐"/>
|
|
|
|
+ </form:select>
|
|
|
|
+ <label>推送时间:</label>
|
|
|
|
+ <form:input path="startPvCreateTime" type="text" maxlength="20" class="input-mini Wdate"
|
|
|
|
+ value="${fns:setDate(cmAutoTypeRecord.startPvCreateTime,'yyyy-MM-dd')}"
|
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
|
+ -
|
|
|
|
+ <form:input path="endPvCreateTime" type="text" maxlength="20" class="input-mini Wdate"
|
|
|
|
+ value="${fns:setDate(cmAutoTypeRecord.endPvCreateTime,'yyyy-MM-dd')}"
|
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
|
+ <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
|
|
|
|
+ <div class="clearfix"></div>
|
|
|
|
+ </div>
|
|
|
|
+ </form:form>
|
|
|
|
+ <sys:message content="${message}"/>
|
|
|
|
+ <table id="contentTable" class="table table-striped table-bordered table-condensed">
|
|
|
|
+ <thead>
|
|
<tr>
|
|
<tr>
|
|
- <td>${item.authorId}</td>
|
|
|
|
- <td><img src="${item.guidanceImage}" width="100px;" height="100px;"></td>
|
|
|
|
- <td>${item.title}</td>
|
|
|
|
- <td>${item.autoStatus==0?"自动推荐":"手动推荐"}</td>
|
|
|
|
- <td><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
|
|
|
|
|
+ <th>ID</th>
|
|
|
|
+ <th>${cmAutoTypeRecord.type==1?"引导图":"PC端图片"}</th>
|
|
|
|
+ <th>${cmAutoTypeRecord.type==1?"文章":"活动"}标题</th>
|
|
|
|
+ <th>推送类型</th>
|
|
|
|
+ <th>推送时间</th>
|
|
</tr>
|
|
</tr>
|
|
- </c:forEach>
|
|
|
|
- </tbody>
|
|
|
|
-</table>
|
|
|
|
-<div class="pagination">${page}</div>
|
|
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ <c:forEach items="${page.list}" var="item">
|
|
|
|
+ <tr>
|
|
|
|
+ <td>${item.authorId}</td>
|
|
|
|
+ <td><img src="${item.image}" width="100px;" height="100px;"></td>
|
|
|
|
+ <td>${item.title}</td>
|
|
|
|
+ <td>${item.autoStatus==0?"自动推荐":"手动推荐"}</td>
|
|
|
|
+ <td><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
|
|
|
+ </tr>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ <div class="pagination">${page}</div>
|
|
|
|
+</div>
|
|
<script>
|
|
<script>
|
|
$(document).ready(function () {
|
|
$(document).ready(function () {
|
|
$("#searchForm").validate({
|
|
$("#searchForm").validate({
|
|
submitHandler: function (form) {
|
|
submitHandler: function (form) {
|
|
-
|
|
|
|
loading('正在提交,请稍等...');
|
|
loading('正在提交,请稍等...');
|
|
form.submit();
|
|
form.submit();
|
|
},
|
|
},
|
|
@@ -116,16 +128,18 @@
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+ var items = null;
|
|
|
|
+ var type = $('#type').val();
|
|
|
|
+ var title = type == 1 ? "选择文章" : "选择活动";
|
|
|
|
|
|
function checkInfo() {
|
|
function checkInfo() {
|
|
- let url = "${ctx}/autoType/findAddPage";
|
|
|
|
- let title = "选择文章";
|
|
|
|
- let buttons={"取消": '-1',"下一步": '1'}
|
|
|
|
- iframe(url, title,buttons, submitInfo)
|
|
|
|
|
|
+ let url = type == 1 ? "${ctx}/autoType/findAddPage" : "${ctx}/autoType/findCmImageAddPage";
|
|
|
|
+ let buttons = {"取消": '-1', "下一步": '1'}
|
|
|
|
+ iframe(url, title, buttons, submitInfo)
|
|
}
|
|
}
|
|
|
|
|
|
- var items =null;
|
|
|
|
- var submitInfo = function (v, h, f) {
|
|
|
|
|
|
+
|
|
|
|
+ var submitInfo = function (v, h, f) {
|
|
//确定
|
|
//确定
|
|
let $jboxFrame = top.$('#jbox-iframe');
|
|
let $jboxFrame = top.$('#jbox-iframe');
|
|
let $mainFrame = top.$('#mainFrame');
|
|
let $mainFrame = top.$('#mainFrame');
|
|
@@ -133,9 +147,8 @@
|
|
items = $jboxFrame[0].contentWindow.getCheckedItems(0);
|
|
items = $jboxFrame[0].contentWindow.getCheckedItems(0);
|
|
if (items.length > 0) {
|
|
if (items.length > 0) {
|
|
let url = "${ctx}/autoType/findClubAddPage";
|
|
let url = "${ctx}/autoType/findClubAddPage";
|
|
- let title = "选择文章";
|
|
|
|
- let buttons={ "取消": '-1',"上一步": '0',"发送": '1'}
|
|
|
|
- iframe(url, title,buttons,submitClub)
|
|
|
|
|
|
+ let buttons = {"取消": '-1', "上一步": '0', "发送": '1'}
|
|
|
|
+ iframe(url, title, buttons, submitClub)
|
|
} else {
|
|
} else {
|
|
top.$.jBox.tip("请先勾选文章...");
|
|
top.$.jBox.tip("请先勾选文章...");
|
|
return false;
|
|
return false;
|
|
@@ -144,8 +157,8 @@
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
- var submitClub = function (v, h, f){
|
|
|
|
- if ('0' == v){
|
|
|
|
|
|
+ var submitClub = function (v, h, f) {
|
|
|
|
+ if ('0' == v) {
|
|
checkInfo()
|
|
checkInfo()
|
|
}
|
|
}
|
|
//确定
|
|
//确定
|
|
@@ -153,30 +166,28 @@
|
|
let $mainFrame = top.$('#mainFrame');
|
|
let $mainFrame = top.$('#mainFrame');
|
|
if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
|
|
if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
|
|
let ids = $jboxFrame[0].contentWindow.getCheckedItems(0);
|
|
let ids = $jboxFrame[0].contentWindow.getCheckedItems(0);
|
|
- if (null==ids){
|
|
|
|
- addRecord({"type": 1,"autoStatus": 1,"infoIds": infoIds})
|
|
|
|
- }else if (ids.length > 0) {
|
|
|
|
- addRecord({"type": 1,"autoStatus": 1,"infoIds": infoIds,"clubIds": clubIds})
|
|
|
|
- }else {
|
|
|
|
|
|
+ if (null == ids) {
|
|
|
|
+ addRecord({"type": type, "autoStatus": 1, "thisIds": items.toString()})
|
|
|
|
+ } else if (ids.length > 0) {
|
|
|
|
+ addRecord({"type": type, "autoStatus": 1, "thisIds": items.toString(), "clubIds": ids.toString()})
|
|
|
|
+ } else {
|
|
top.$.jBox.tip("请先勾选机构...");
|
|
top.$.jBox.tip("请先勾选机构...");
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- console.log(ids);
|
|
|
|
- console.log(items);
|
|
|
|
}
|
|
}
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
|
|
- function addRecord(data){
|
|
|
|
- // {"type": type,"infoIds": infoIds,"clubIds": clubIds}
|
|
|
|
|
|
+ function addRecord(data) {
|
|
$.ajax({
|
|
$.ajax({
|
|
- url: "${ctx}/bulkpurchase/contractOrder/enCode",
|
|
|
|
|
|
+ url: "${ctx}/autoType/addCmAutoTypeRecord",
|
|
data: data,
|
|
data: data,
|
|
type: "POST",
|
|
type: "POST",
|
|
async: false,
|
|
async: false,
|
|
success: function (res) {
|
|
success: function (res) {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
$.jBox.tip(res.msg, 'info');
|
|
$.jBox.tip(res.msg, 'info');
|
|
|
|
+ history.go(0)
|
|
} else {
|
|
} else {
|
|
$.jBox.tip(res.msg, 'error');
|
|
$.jBox.tip(res.msg, 'error');
|
|
}
|
|
}
|