Authored by weiqingting

Merge branch 'release/1.6' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into release/1.6

... ... @@ -157,8 +157,13 @@ $(document).on("click", ".addBtn", function () {
*/
$(document).on("click", ".delBtn", function () {
var index = $(this).data("index");
Bll.module.couponsIds.splice(index, 1);
Bll.renderDialog("template");
if(Bll.module.couponsIds.length<=1){
common.util.__tip("至少有一张优惠券","warning")
}
else {
Bll.module.couponsIds.splice(index, 1);
Bll.renderDialog("template");
}
});
/**
... ...
... ... @@ -52,23 +52,24 @@ $('.hasDatepicker').fdatepicker({
var Timmer = {
toast: function (content, fn) {
common.dialog.confirm("定时发布", content, function () {
console.log("fn()",fn());
common.util.__ajax({
url: '/guang/article/timmer',
data: fn()
}, function () {
g.reload();
loadTab();
}, function (res) {
if(res.code=='200'){
g.reload();
loadTab();
}
});
});
}
}
};
var g = new common.grid({
el: '#basicTable',
size: 10,
parms: function () {
return {
articleTitle: common.util.__input('articleTitle'),
articleGender: common.util.__input('articleGender'),
... ... @@ -119,7 +120,7 @@ var g = new common.grid({
render: function (item) {
if (item.createTime && item.createTime !== 0) {
var t = new Date(item.createTime * 1000);
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss");
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm");
return "<p>" + formatted + "</p>";
}
else {
... ... @@ -130,9 +131,10 @@ var g = new common.grid({
}, {
display: "发布时间",
render: function (item) {
//console.log(item.publishTime);
if (item.publishTime && item.publishTime !== 0) {
var t = new Date(item.publishTime * 1000);
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss");
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm");
return "<p>" + formatted + "</p>";
}
else {
... ... @@ -282,7 +284,6 @@ $(document).on("click", ".info-time", function () {
// 删除
$(document).on("click", ".info-del", function () {
var item = g.rows[$(this).data("index")];
common.dialog.confirm("温馨提示", "您确定要删除吗?", function () {
common.util.__ajax({
url: '/guang/article/del',
... ...
... ... @@ -4,6 +4,7 @@
*/
exports.domain = require('../config/common.js').domain;
//exports.domain ="http://172.16.6.157:8080/yohobuy-platform-web";
//=================================【资讯管理】
exports.res = [
{//逛-> 资讯管理 空白页
... ... @@ -30,13 +31,10 @@ exports.res = [
{name: 'startTime', type: 'String'},
{name: 'endTime', type: 'String'},
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
{name: 'size', type: 'Number'}
]
},
{
// 资讯管理-列表操作(修改、发布、关闭、推荐、取消推荐)
route: '/guang/article/operation',
method: 'POST',
... ... @@ -54,10 +52,9 @@ exports.res = [
{name: 'coverImageType', type: 'Number'},
{name: 'articleType', type: 'Number'},
{name: 'adsImgSize', type: 'String'},
{name: 'isRecommend', type: 'Number'},
{name: 'isRecommend', type: 'Number'}
]
},
{
// 资讯管理-定时
... ... @@ -70,7 +67,6 @@ exports.res = [
]
},
{
// 资讯管理-删除
route: '/guang/article/del',
method: 'POST',
... ... @@ -99,7 +95,7 @@ exports.res = [
url: '/guang/article/sort/getList',
params: [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
{name: 'size', type: 'Number'}
]
}, {
... ... @@ -113,7 +109,7 @@ exports.res = [
{name: 'orderBy', type: 'Number'},
{name: 'status', type: 'Number'},
{name: 'name', type: 'String'},
{name: 'advertCode', type: 'String'},
{name: 'advertCode', type: 'String'}
]
}, {
... ... @@ -126,7 +122,7 @@ exports.res = [
{name: 'orderBy', type: 'Number'},
{name: 'status', type: 'Number'},
{name: 'name', type: 'String'},
{name: 'advertCode', type: 'String'},
{name: 'advertCode', type: 'String'}
]
},
{
... ... @@ -161,7 +157,7 @@ exports.res = [
{name: 'isHot', type: 'Number'},
{name: 'status', type: 'Number'},
{name: 'classifyId', type: 'Number'},
{name: 'tagName', type: 'String'},
{name: 'tagName', type: 'String'}
]
}, {
... ... @@ -174,7 +170,7 @@ exports.res = [
{name: 'tagName', type: 'String'},
{name: 'classifyId', type: 'Number'},
{name: 'isHot', type: 'Number'},
{name: 'status', type: 'Number'},
{name: 'status', type: 'Number'}
]
}, {
... ... @@ -186,7 +182,7 @@ exports.res = [
{name: 'tagName', type: 'String'},
{name: 'classifyId', type: 'Number'},
{name: 'isHot', type: 'Number'},
{name: 'status', type: 'Number'},
{name: 'status', type: 'Number'}
]
},
{
... ... @@ -217,7 +213,7 @@ exports.res = [
url: '/guang/tagSort/getList',
params: [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
{name: 'size', type: 'Number'}
]
}, { // 标签分类管理-编辑
route: '/guang/tags/sort/update',
... ... @@ -227,7 +223,7 @@ exports.res = [
{name: 'id', type: 'Number'},
{name: 'status', type: 'Number'},
{name: 'orderBy', type: 'Number'},
{name: 'classifyName', type: 'String'},
{name: 'classifyName', type: 'String'}
]
}, {
... ... @@ -238,7 +234,7 @@ exports.res = [
params: [
{name: 'status', type: 'Number'},
{name: 'orderBy', type: 'Number'},
{name: 'classifyName', type: 'String'},
{name: 'classifyName', type: 'String'}
]
},
{
... ... @@ -272,7 +268,7 @@ exports.res = [
{name: 'size', type: 'Number'},
{name: 'status', type: 'Number'},
{name: 'condContent', type: 'String'},
{name: 'condNum', type: 'Number'},
{name: 'condNum', type: 'Number'}
]
}, {
// 评论管理-审核
... ... @@ -281,7 +277,7 @@ exports.res = [
url: '/guang/comment/audit',
params: [
{name: 'id', type: 'String'},
{name: 'status', type: 'Number'},
{name: 'status', type: 'Number'}
]
}, {
// 评论管理-获取筛选条件
... ... @@ -308,7 +304,7 @@ exports.res = [
url: '/guang/author/getList',
params: [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
{name: 'size', type: 'Number'}
]
}, {
// 作者管理-添加
... ... @@ -318,7 +314,7 @@ exports.res = [
params: [
{name: 'username', type: 'String'},
{name: 'avatar', type: 'String'},
{name: 'authorDesc', type: 'String'},
{name: 'authorDesc', type: 'String'}
]
}, {
// 作者管理-编辑
... ... @@ -329,7 +325,7 @@ exports.res = [
{name: 'uid', type: 'Number'},
{name: 'username', type: 'String'},
{name: 'avatar', type: 'String'},
{name: 'authorDesc', type: 'String'},
{name: 'authorDesc', type: 'String'}
]
},
{
... ... @@ -366,7 +362,7 @@ exports.res = [
{name: 'brandType', type: 'String'},
{name: 'status', type: 'String'},
{name: 'brandId', type: 'String'},
{name: 'gender', type: 'String'},
{name: 'gender', type: 'String'}
]
}, {
// Plus/Star列表-添加
... ... @@ -381,7 +377,7 @@ exports.res = [
{name: 'coverImg', type: 'String'},
{name: 'bannerImg', type: 'String'},
{name: 'bannerTitle', type: 'String'},
{name: 'orderBy', type: 'String'},
{name: 'orderBy', type: 'String'}
]
},{
// Plus/Star列表-修改
... ... @@ -397,7 +393,7 @@ exports.res = [
{name: 'coverImg', type: 'String'},
{name: 'bannerImg', type: 'String'},
{name: 'bannerTitle', type: 'String'},
{name: 'orderBy', type: 'String'},
{name: 'orderBy', type: 'String'}
]
}, {
// Plus/Star列表-编辑
... ... @@ -413,7 +409,7 @@ exports.res = [
{name: 'coverImg', type: 'String'},
{name: 'bannerImg', type: 'String'},
{name: 'bannerTitle', type: 'String'},
{name: 'orderBy', type: 'String'},
{name: 'orderBy', type: 'String'}
]
},{
... ... @@ -445,7 +441,7 @@ exports.res = [
params: [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
{name: 'status', type: 'Number'},
{name: 'status', type: 'Number'}
]
}, {
... ... @@ -456,7 +452,7 @@ exports.res = [
params: [
{name: 'categoryName', type: 'String'},
{name: 'contentCode', type: 'String'},
{name: 'contentCodeFoot', type: 'String'},
{name: 'contentCodeFoot', type: 'String'}
]
}, {
// Plus/Star分类列表-编辑&开启&关闭
... ... @@ -468,7 +464,7 @@ exports.res = [
{name: 'status', type: 'Number'},
{name: 'categoryName', type: 'String'},
{name: 'contentCode', type: 'String'},
{name: 'contentCodeFoot', type: 'String'},
{name: 'contentCodeFoot', type: 'String'}
]
},
... ...
... ... @@ -62,7 +62,7 @@
<div class="col-sm-2">
<a class="col-sm-4 btn btn-primary addBtn" data-index="[[index]]">+</a>
[[if index==0]]
<a class="col-sm-4 col-sm-offset-2 btn btn-danger delBtn" disabled="true" data-index="[[index]]">-</a>
<a class="col-sm-4 col-sm-offset-2 btn btn-danger delBtn" data-index="[[index]]">-</a>
[[else]]
<a class="col-sm-4 col-sm-offset-2 btn btn-danger delBtn" data-index="[[index]]">-</a>
[[/if]]
... ...
... ... @@ -21,13 +21,14 @@
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-heading">
<div class="panel-heading">
<a href="/guang/article/contentAdd" class="btn btn-success"><i class="fa fa-plus"></i> 添加资讯</a>
</div>
<div class="panel-body">
<div class="row">
<div class="panel-col">
<input type="text" id="articleTitle" class="form-control" placeholder="输入关键字" style="height: 39px;"/>
<input type="text" id="articleTitle" class="form-control" placeholder="输入关键字"
style="height: 39px;"/>
</div>
<div class="panel-col">
... ... @@ -69,11 +70,13 @@
</div>
<div class="panel-col2">
<input type="text" id="starttime" class="form-control panel-input hasDatepicker" name="start_time" placeholder="开始时间" value="" kl_vkbd_parsed="true">
<input type="text" id="starttime" class="form-control panel-input hasDatepicker" name="start_time"
placeholder="开始时间" value="" kl_vkbd_parsed="true">
</div>
<div class="panel-col2">
<input type="text" id="endtime" class="form-control panel-input hasDatepicker" name="end_time" placeholder="结束时间" value="" kl_vkbd_parsed="true">
<input type="text" id="endtime" class="form-control panel-input hasDatepicker" name="end_time"
placeholder="结束时间" value="" kl_vkbd_parsed="true">
</div>
<div class="panel-col">
... ... @@ -82,7 +85,6 @@
</div>
</div>
</div>
</div>
... ... @@ -101,15 +103,17 @@
<script type="text/template" id="template">
<div class="form-group">
<label class="col-sm-3 control-label">标题</label>
<div class="col-sm-9">
<p id="title">[[articleTitle]]</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">定时发布时间</label>
<div class="col-sm-9">
<input type="text" readonly="true" class="form-control hasDatepicker" name="publish_time" style="width:180px;" placeholder="yyyy-mm-dd" id="datepicker" >
<input type="text" readonly="true" class="form-control hasDatepicker" name="publish_time"
style="width:180px;" placeholder="yyyy-mm-dd hh:mm" id="datepicker" required="required">
</div>
</div>
</script>
... ...