Authored by xuhongyun

build project

... ... @@ -86,7 +86,20 @@ webpackJsonp([55],{
}, {
display: '品牌名称',
name: "brandName"
}, {
},
{
display: '封面图',
render: function (item) {
if (item.coverImg) {
return '<a class="list-img" target="_blank">' +
'<img src="' + item.coverImg + '"></a>';
} else {
return '';
}
}
},
{
display: '频道名称',
name: "categoryName"
}, {
... ...
... ... @@ -15,6 +15,11 @@ webpackJsonp([81],[
var g = new common.grid({
el: '#content-list',
usepagesize:true,
parms: function () {
return {
title: common.util.__input('title'),
};
},
columns: [
{
display: "ID",
... ... @@ -67,6 +72,10 @@ webpackJsonp([81],[
g.reload();
});
});
$("#filter-btn").click(function () {
g.reload();
});
/***/ }
]);
\ No newline at end of file
... ...
... ... @@ -44,6 +44,26 @@ webpackJsonp([82],[
},
columns: [
{
display: '',
type: 'checkbox',
render: function (item) {
var htmlContent = "";
if(iList.length == 0 ){
htmlContent = "<input type='checkbox' class='wqt_checkbox' data-index='"+item.__index+"'>";
}else{
$.each(iList,function(n,value) {
if(item.id == value){
htmlContent = "<input type='checkbox' checked='checked' class='wqt_checkbox' data-index='"+item.__index+"'>";
return false
}else{
htmlContent = "<input type='checkbox' class='wqt_checkbox'data-index='"+item.__index+"'>";
}
})
}
return htmlContent;
}
},
{
display: "ID",
name: "id"
},
... ... @@ -133,6 +153,46 @@ webpackJsonp([82],[
$(document).on("click", "#chooseFile", function () {
$("#uploadBox").click();
});
//批量删除
$(document).on("click","#batchDel",function(){
var len = iList.length;
if (len <= 0) {
common.util.__tip('请选择需要删除的数据', 'warning');
return;
}
var data = {
ids: iList.join(",")
};
common.dialog.confirm("温馨提示","你确定删除吗?",function() {
common.util.__ajax({
url: "/activityTemplate/batchDelProducts",
data: data
}, function () {
g.reload();
});
});
});
/*
*可通用于翻页勾选
* 将checkbox选中存入一个数组,勾选push,取消remove
* 进入页面判断id是否在数组中存在,如果存在,checked
*/
var iList = [];
$(document).on("change", ".wqt_checkbox,.wqt_all", function () {
var checked = $(this).prop("checked");
var index = $(this).data("index");
var val = g.rows[index];
var index_;
if(checked){
iList.push(val['id']);
}else{
index_ = $.inArray(val['id'],iList);
iList.splice(index_,1);
}
console.log("iList:"+iList);
});
/***/ }
]);
\ No newline at end of file
... ...
... ... @@ -99,7 +99,9 @@ webpackJsonp([92],[
name: "platform"
}, {
display: '显示频道',
name: "channel"
render:function(item){
return getChannelName(item.channel);
}
}, {
display: '状态',
render: function (item) {
... ... @@ -198,5 +200,17 @@ webpackJsonp([92],[
Bll.module.platform = Bll.platforms.join(',');
});
function getChannelName(channel){
if(channel=='1'){
return "男生";
}else if (channel=='2'){
return "女生";
}else if (channel=='3'){
return "潮童";
}else if (channel=='4'){
return "创意家居";
}
}
/***/ }
]);
\ No newline at end of file
... ...
... ... @@ -5,11 +5,12 @@ webpackJsonp([107],[
var $ = __webpack_require__(1),
common = __webpack_require__(2),
util = __webpack_require__(10);
datepicker = __webpack_require__(9);
new common.dropDown({el: "#subject-type"});
new common.dropDown({el: "#subject-paltform"});
new common.dropDown({el: "#subject-status"});
new common.dropDown({el: "#subject-isShow"});
var yhChannelArr = ["男生", "女生", "儿童", "创意生活"];
var g = new common.grid({
... ... @@ -18,7 +19,11 @@ webpackJsonp([107],[
return {
sort: common.util.__input('subject-type'),
plateform: common.util.__input('subject-paltform'),
status: common.util.__input('subject-status')
status: common.util.__input('subject-status'),
isShow: common.util.__input('subject-isShow'),
startTimeStr:common.util.__input('subject-startTimeStr'),
endTimeStr:common.util.__input('subject-endTimeStr'),
title:common.util.__input('subject-title'),
};
},
columns: [
... ... @@ -77,6 +82,10 @@ webpackJsonp([107],[
item.endTime = common.util.__dateFormat(new Date(item.endTime*1000), "yyyy-MM-dd hh:mm:ss");
return item.startTime + "~<br>" + item.endTime;
}},
{display: "前端展示",name:"isShow", render: function (item) {
if(item.isShow == 1) return "是";
else if(item.isShow == 0) return "否";
}},
{
display: "操作", name: "", render: function (item) {
var arr = [];
... ... @@ -91,6 +100,13 @@ webpackJsonp([107],[
]
});
/**
* 日期插件
*/
$('.hasDatepicker').fdatepicker({
format: 'yyyy-mm-dd hh:ii:ss',
pickTime: true
});
g.init('/runManage/subjectManage/subjectList');
... ...
... ... @@ -75,4 +75,6 @@ module.exports=function(app) {
/*删除商品信息接口*/
app.post("/activityTemplate/delOneProduct","activitytemplate_delOneProduct");
/*批量删除商品接口*/
app.post("/activityTemplate/batchDelProducts","activitytemplate_batchDelProducts");
}
... ...
... ... @@ -12,8 +12,8 @@ var grayroute = require("./mid/grayrouter");
/*session 配置*/
var options = {
secret: 'yohobuy.portal', //session配置
cookie: {secure: false, maxAge: 7200000},
// cookie: {secure: false, maxAge: 7200000, domain: '.yohobuy.com'},
// cookie: {secure: false, maxAge: 7200000},
cookie: {secure: false, maxAge: 7200000, domain: '.yohobuy.com'},
resave: false,
saveUninitialized: true,
rolling: true
... ... @@ -76,13 +76,13 @@ var apiCofig = {
});
}
// if(process.env.NODE_ENV==="gray"){
// options.cookie.domain = '';
// }
//
// if(process.env.NODE_ENV==="production"){
// options.cookie.domain = '.yohobuy.com';
// }
if(process.env.NODE_ENV==="gray"){
options.cookie.domain = '';
}
if(process.env.NODE_ENV==="production"){
options.cookie.domain = '.yohobuy.com';
}
app.use(session(options));
},
... ...
... ... @@ -12,7 +12,8 @@ module.exports={
params: [
{name: "status", type: "number"},
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'}
{name: 'size', type: 'Number'},
{name: 'title', type: 'string'},
]
},
addTemplate:{
... ... @@ -96,6 +97,13 @@ module.exports={
params: [
{name: "id", type: "number"}
]
},
batchDelProducts:{
title: "批量删除商品",
url: "/activityTemplate/batchDelProducts",
params: [
{name: "ids", type: "string"}
]
}
}
}
\ No newline at end of file
... ...
... ... @@ -15,7 +15,10 @@ module.exports={
{name: 'sort', type: 'string'},
{name: 'title', type: 'string'},
{name: 'plateform', type: 'string'},
{name: 'status', type: 'number'}
{name: 'status', type: 'number'},
{name: 'isShow', type: 'number'},
{name:'startTimeStr',type:'string'},
{name:'endTimeStr',type:'string'}
]
},
addSpecialActivity:{
... ... @@ -35,7 +38,8 @@ module.exports={
{name: 'webUrl', type: 'string'},
{name: 'orderNum', type: 'number'},
{name: 'yhChannel', type: 'string'},
{name: 'webCoverUrl', type: 'string'}
{name: 'webCoverUrl', type: 'string'},
{name: 'isShow',type:'number'}
]
},
updateByPrimaryKey:{
... ... @@ -56,7 +60,8 @@ module.exports={
{name: 'webUrl', type: 'string'},
{name: 'orderNum', type: 'number'},
{name: 'yhChannel', type: 'string'},
{name: 'webCoverUrl', type: 'string'}
{name: 'webCoverUrl', type: 'string'},
{name: 'isShow', type: 'number'}
]
},
deleteSpecialActivity:{
... ...
... ... @@ -5,6 +5,21 @@
<div style="margin-bottom: 20px">
<a href="/operations/activitytemplate/add" class="btn btn-success"><i class="fa fa-plus"></i> 添加活动模板</a>
</div>
<div class="panel panel-default" style="...">
<div class="panel-body">
<div class="row">
<div class="panel-col">
<input type="text" value="" id="title" placeholder="请输入模板标题"
class="form-control">
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
<a id="filter-all" href="/operations/activitytemplate/index" class="btn btn-info">全部</a>
</div>
</div>
</div>
</div>
<div class="panel">
<div class="panel-body nopadding">
<div class="basicTable_wrapper" id="content-list"></div>
... ...
... ... @@ -28,6 +28,7 @@
</div>
<a id="filter-btn" class="btn btn-info">筛选</a>
<a href="<%url%>" class="btn btn-info">全部</a>
<a id="batchDel" class="btn btn-info" style="background-color: #d9534f;border-color: #d43f3a">批量删除</a>
</div>
</div>
<div class="panel panel-primary-head" id="product-list">
... ...
... ... @@ -38,7 +38,7 @@
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
<a id="filter-all" href="/hotRankTag/index" class="btn btn-info">全部</a>
<a id="filter-all" href="/operations/hotRankTag/index" class="btn btn-info">全部</a>
</div>
</div>
</div>
... ...
... ... @@ -9,6 +9,10 @@
<div class="panel-body">
<div class="row">
<div class="panel-col">
<input type="text" id="subject-title" placeholder="标题" name="title"
class="form-control">
</div>
<div class="panel-col">
<select name="sort" id="subject-type" tabindex="-1" title="" class="select2-offscreen brandBtn-group">
<option value="" selected="">类型</option>
<option value="1">奥莱</option>
... ... @@ -36,6 +40,23 @@
</select>
</div>
<div class="panel-col">
<select name="isShow" id="subject-isShow" tabindex="-1" title=""
class="select2-offscreen brandBtn-group">
<option value="" selected="">是否展示</option>
<option value="1"></option>
<option value="0"></option>
</select>
</div>
<div class="panel-col">
<input type="text" id="subject-startTimeStr" class="form-control panel-input hasDatepicker" name="startTimeStr"
placeholder="开始时间" value="" kl_vkbd_parsed="true" readonly>
</div>
<div class="panel-col">
<input type="text" id="subject-endTimeStr" class="form-control panel-input hasDatepicker" name="endTimeStr"
placeholder="结束时间" value="" kl_vkbd_parsed="true" readonly>
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="filter-all" href="/runManage/subjectManage/index" class="btn btn-info">全部</a>
</div>
... ... @@ -67,6 +88,14 @@
<input type="hidden" id="sort" value="[[sort]]" for="radio"/>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">前端展示<font color="#f00">*</font></label>
<div class="col-sm-10">
<input name="isShow" type="radio" value="1"/>
<input name="isShow" type="radio" value="0"/>
</div>
<input type="hidden" id="isShow" value="[[isShow||'1']]" for="radio"/>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="title">标题<font color="#f00">*</font></label>
<div class="col-sm-8">
<input type="text" value="[[title]]" class="form-control" id="title" required="required"/>
... ...