测试资源修改

master
zhengyongxing 5 years ago
parent a9ce0585cc
commit 727b335b45

@ -118,10 +118,12 @@ class TestResourceController extends ThinkController
$id =I('id','');
} else {
$this->error('请选择资源后再进行操作');
$this->ajaxReturn(['status'=>0, 'msg'=> '请选择资源后再进行操作']);
}
if (!I('status','')&&I('status','')!='0') {
$this->error('请选择状态后在进行操作');
$this->ajaxReturn(['status'=>0, 'msg'=> '请选择状态后在进行操作']);
// $this->error('请选择状态后在进行操作');
}
// $resourceData = M('test_resource','tab_')
@ -161,11 +163,13 @@ class TestResourceController extends ThinkController
if ($isFreeze) {
$this->success('操作成功',U('supportNumberList'));
// $this->success('操作成功',U('supportNumberList'));
$this->ajaxReturn(['status'=>1, 'msg'=> '操作成功']);
} else {
$this->error('操作失败',U('supportNumberList'));
$this->ajaxReturn(['status'=>1, 'msg'=> '操作失败']);
// $this->error('操作失败',U('supportNumberList'));
}

@ -234,7 +234,7 @@
layer.msg('请选择要操作的数据',{skin:'textColor'});
return false;
}
var url = "{:U('batchFreeze','','')}" + '/id/' + param + '/status/0';
var url = "{:U('batchFreeze','','')}";
layer.confirm('是否冻结选中推广员下的资源账号?', {
title:'冻结资源账号',
@ -242,8 +242,22 @@
skin:'textColor',
btn: ['冻结','取消'] //按钮
}, function(){
window.location.href = url;
$.ajax({
type: "POST",
url: url,
data: {id:param,status:0},
dataType: 'json',
async: false,
success:function(data){
if(data.status==1){
layer.msg(data.msg,{time: 1000,skin:'msgClolor'});
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
// window.location.href = url;
}, function(){
layer.close();
@ -264,7 +278,7 @@
layer.msg('请选择要操作的数据',{skin:'textColor'});
return false;
}
var url = "{:U('batchFreeze','','')}" + '/id/' + param + '/status/1';
var url = "{:U('batchFreeze','','')}";
layer.confirm('是否冻结选中推广员下的资源账号?', {
title:'冻结资源账号',
@ -273,7 +287,21 @@
btn: ['冻结','取消'] //按钮
}, function(){
window.location.href = url;
$.ajax({
type: "POST",
url: url,
data: {id:param,status:1},
dataType: 'json',
async: false,
success:function(data){
if(data.status==1){
layer.msg(data.msg,{time: 1000,skin:'msgClolor'});
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
}, function(){
layer.close();

Loading…
Cancel
Save