Authored by liuyue

vip积分翻倍

... ... @@ -180,7 +180,9 @@ grid.prototype={
//发送请求
},
success: function (res) {
console.log(res);
var data = res.data.data;
p.callback && (data = p.callback(res.data));//data.data,data.data1
g.__pagination({total:data.totalPage,page:data.page});
g.__bodyClomun(data.list);
... ...
... ... @@ -98,7 +98,6 @@ var edit=require('../common/edit');
},
dataType: 'json'
}).then(function(data) {
console.log(data);
data = data.data;
if (data.code == "200") {
var badcode = [];
... ... @@ -142,6 +141,7 @@ var edit=require('../common/edit');
option.error=function(res){
e.$tip("提交失败");
}
console.log(option.data);
callback&&callback(option.data);
});
};
... ...
... ... @@ -25,6 +25,17 @@ e.on("bind",function(){
});
e.init();
e.on("validate",function(){
var title=$.trim($("#title").val());
if(/[~#^$@%&!*]/gi.test(title)) {
return "名称不能包含特殊字符";
}
return true;
});
//提交
var submit=function(callback){
e.submit($("#basicForm").attr("action"),function(option){
... ... @@ -43,9 +54,8 @@ var submit=function(callback){
e.$tip("提交失败");
}
option.data.startTime = new Date(option.data.startTime.replace('-',',')).getTime() / 1000;
option.data.endTime = new Date(option.data.endTime.replace('-',',')).getTime() / 1000;
option.data.startTime = new Date(option.data.startTime.replace(/-/g,'/')).getTime() / 1000;
option.data.endTime = new Date(option.data.endTime.replace(/-/g,'/')).getTime() / 1000;
console.log(option.data);
callback&&callback(option.data);
});
... ...
... ... @@ -6,7 +6,8 @@ var g = new common.grid({
el: '#basicTable',
parms: function(){
return {
type: 1
type: 1,
status: 1
};
},
columns:[
... ... @@ -39,9 +40,15 @@ var g = new common.grid({
}
}}
]
],
callback: function(data) {
if (data.activity.data.list.length > 0) {
$('#add-btn').addClass('disabled');
}
return data.vipList.data;
}
});
/*g.init($("#gridurl").val());*/
g.init($("#gridurl").val());
$('#basicTable').on('click', '.end-btn', function() {
var activeId = $(this).data('id');
... ... @@ -57,11 +64,3 @@ $('#basicTable').on('click', '.end-btn', function() {
});
});
common.util.__ajax({
url: $("#gridurl").val(),
data:{
status: 1
}
}, function(res){
console.log(res);
}, true);
\ No newline at end of file
... ...
... ... @@ -4,8 +4,8 @@ exports.domain = require('../config/common.js').domain;
//营销管理路由配置
exports.res = [
{route: '/-p-l-a-t-f-o-r-m/3',method:"GET"}//此模块上线将此删除
/*{
//{route: '/-p-l-a-t-f-o-r-m/3',method:"GET"}//此模块上线将此删除
{
//营销码管理 -> 页面渲染
route: '/market/coupon/index',
method: 'GET',
... ... @@ -393,7 +393,7 @@ exports.res = [
method: 'POST',
//url: '/activity/queryActivityList',
apis: {
data: {
vipList: {
url:'/activity/queryActivityList',
params: [
{
... ... @@ -411,10 +411,10 @@ exports.res = [
],
isJsonRaw: true
},
data2: {
activity: {
url: '/activity/queryActivityList',
params:[
{name: 'status', type: 'Number'}
{name: 'status', type: 'Number',def: 0}
],
isJsonRaw: true
}
... ... @@ -467,5 +467,5 @@ exports.res = [
type: 'Number'
}
]
}*/
}
]
\ No newline at end of file
... ...
... ... @@ -9,7 +9,7 @@
<div class="form-group">
<label for="title" class="col-sm-2 control-label">促销活动名称<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" id="title" placeholder="促销活动名称,支持中英文、数字,建议20个字以内" class="form-control" required maxlength="15" value="{{name}}">
<input type="text" id="title" placeholder="促销活动名称,支持中英文、数字,建议20个字以内" class="form-control" required maxlength="20" value="{{name}}">
</div>
</div>
<div class="form-group">
... ...