diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php
index bfe155bea..2a497da0f 100644
--- a/Application/Admin/Controller/TestResourceController.class.php
+++ b/Application/Admin/Controller/TestResourceController.class.php
@@ -32,14 +32,14 @@ class TestResourceController extends ThinkController
$map['tab_test_resource.role_name']=['like','%'.I('role_name').'%'];
}
if(!empty(I('user_account'))){
- $map['tab_test_resource.user_account']=I('user_account');
+ $map['tab_test_resource.user_account']=['like','%'.I('user_account').'%'];
}
if(!empty(I('promote_name'))){
- $map['tab_test_resource.promote_account']=I('promote_name');
+ $map['tab_test_resource.promote_account']=['like','%'.I('promote_name').'%'];
}
$data = M('test_resource','tab_')
- ->field('tab_test_resource.id,tab_test_resource.user_id,tab_test_resource.game_name,tab_test_resource.server_name,tab_test_resource.user_account,tab_test_resource.promote_account,tab_test_resource.role_name,tab_test_resource.create_time,device_number,check_status')
+ ->field('tab_test_resource.id,tab_test_resource.user_id,tab_test_resource.game_name,tab_test_resource.server_name,tab_test_resource.user_account,tab_test_resource.promote_account,tab_test_resource.role_name,tab_test_resource.create_time,device_number,lock_status as check_status')
->join('left join tab_user as user on tab_test_resource.user_id = user.id')
->where($map)
->page($page,$row)
@@ -73,7 +73,7 @@ class TestResourceController extends ThinkController
}
$data = [
- 'check_status' => 0
+ 'lock_status' => 0
];
$isFreeze = M('user','tab_')->where("id=".$supportId)->save($data);
@@ -92,7 +92,7 @@ class TestResourceController extends ThinkController
}
$data = [
- 'check_status' => 1
+ 'lock_status' => 1
];
$isFreeze = M('user','tab_')->where("id=".$supportId)->save($data);
@@ -198,10 +198,13 @@ class TestResourceController extends ThinkController
try {
$arrUserId = array_column($data,'id');
$logId = implode(',',$arrUserId);
-
- $logRead = M('protect_log_read','tab_')
- ->where("log_id IN({$logId}) and promote_id = {$promote_id}")
- ->select();
+ if ($logId) {
+ $logRead = M('protect_log_read','tab_')
+ ->where("log_id IN({$logId})")
+ ->select();
+ } else {
+ $logRead = [];
+ }
$upsetData = array_column($logRead,'log_id');
@@ -348,9 +351,9 @@ class TestResourceController extends ThinkController
for ($i=0; $i < $count ; $i++) {
$i_account=I('user_account')[$i];
if (!empty($i_account)) {
- $user=M('user', 'tab_')->field('promote_id,password,phone')->where(['account'=>$i_account])->find();
- $promote = $this->get_all_promote();
- if (!in_array($user['promote_id'], $promote)) {
+ $user=M('user', 'tab_')->field('promote_id,promote_account,password,phone')->where(['account'=>$i_account])->find();
+// $promote = $this->get_all_promote();
+ if (!$user) {
M('test_resource', 'tab_')->rollback();//回滚
$this->error($i_account.'账号不存在');
}
@@ -409,14 +412,14 @@ class TestResourceController extends ThinkController
$data['apply_resource']=I('apply_resource')[$i];
$data['apply_remark']=I('apply_remark')[$i];
- $data['apply_name']=$_SESSION['onethink_home']['promote_auth']['account'];
- $data['apply_id']=$_SESSION['onethink_home']['promote_auth']['pid'];
+ $data['apply_name']=$user['promote_account'];
+ $data['apply_id']=$user['promote_id'];
// $data['promote_id']=session("promote_auth.pid");
// $data['promote_account']=session("promote_auth.account");
- $data['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid'];
- $data['promote_account']=$_SESSION['onethink_home']['promote_auth']['account'];
+ $data['promote_id']=$user['promote_id'];
+ $data['promote_account']=$user['promote_account'];
$data['create_time']=time();
$data['apply_type']=0;
@@ -528,10 +531,10 @@ class TestResourceController extends ThinkController
// $this->ajaxReturn(['status'=>0,'msg'=>'扶持申请额度不足,最大额度:'.$max_quota]);
// }
- if($support['promote_id'] !=$_SESSION['onethink_home']['promote_auth']['pid'] || empty($support) ){
- M('test_resource','tab_')->rollback();//回滚
- $this->error('申请失败');
- }
+// if($support['promote_id'] !=$_SESSION['onethink_home']['promote_auth']['pid'] || empty($support) ){
+// M('test_resource','tab_')->rollback();//回滚
+// $this->error('申请失败');
+// }
$data['game_id']=$support['game_id'];
$data['game_name']=$support['game_name'];
@@ -547,13 +550,13 @@ class TestResourceController extends ThinkController
$data['apply_resource']=I('apply_resource');
$data['apply_remark']=I('apply_remark');
- $data['apply_name']=$_SESSION['onethink_home']['promote_auth']['account'];
- $data['apply_id']=$_SESSION['onethink_home']['promote_auth']['pid'];
+ $data['apply_name']=$support['promote_account'];
+ $data['apply_id']=$support['promote_id'];
// $data['promote_id']=session("promote_auth.pid");
// $data['promote_account']=session("promote_auth.account");
- $data['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid'];
- $data['promote_account']=$_SESSION['onethink_home']['promote_auth']['account'];
+ $data['promote_id']=$support['promote_id'];
+ $data['promote_account']=$support['promote_account'];
$data['create_time']=time();
$data['apply_type']=1;
@@ -604,7 +607,7 @@ class TestResourceController extends ThinkController
unset($_REQUEST['start']);unset($_REQUEST['end']);
}
- $map['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid'];
+// $map['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid'];
$data=M('test_resource','tab_')->where($map)->order('id desc')->page($page,$row)->select();
$count=M('test_resource','tab_')->field('id')->where($map)->select();
$count = count($count);
diff --git a/Application/Admin/View/TestResource/supportNumberList.html b/Application/Admin/View/TestResource/supportNumberList.html
index 1e3f0ecd0..5dc4165db 100644
--- a/Application/Admin/View/TestResource/supportNumberList.html
+++ b/Application/Admin/View/TestResource/supportNumberList.html
@@ -183,14 +183,14 @@
$('.froze-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
- layer.confirm('是否确认冻结帐号?', {icon: 3, title:'提示'}, function(index){
+ layer.confirm('是否确认冻结帐号?', {icon: 3, title:'提示',skin:'textColor'}, function(index){
$.ajax({
url: "{:U('TestResource/freezeSupport')}",
data: {support_id: id},
type: 'post',
dataType: 'json',
success: function(response) {
- layer.msg(response.msg, {time: 1000}, function() {
+ layer.msg(response.msg, {time: 1000,skin:'msgClolor'}, function() {
window.location.href = window.location.href
})
}
@@ -202,14 +202,14 @@
$('.unfroze-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
- layer.confirm('是否确认启用帐号?', {icon: 3, title:'提示'}, function(index){
+ layer.confirm('是否确认启用帐号?', {icon: 3, title:'提示',skin:'textColor'}, function(index){
$.ajax({
url: "{:U('TestResource/unfreezeSupport')}",
data: {support_id: id},
type: 'post',
dataType: 'json',
success: function(response) {
- layer.msg(response.msg, {time: 1000}, function() {
+ layer.msg(response.msg, {time: 1000,skin:'msgClolor'}, function() {
window.location.href = window.location.href
})
}
@@ -222,7 +222,7 @@
click: function() {
var id = $(this).attr('data-id')
console.log(id);
- layer.confirm('是否确认重置账号密码?', {icon: 3, title:'提示'}, function(index){
+ layer.confirm('是否确认重置账号密码?', {icon: 3, title:'提示',skin:'textColor'}, function(index){
$.ajax({
url: "{:U('TestResource/rechangePassward')}",
data: {support_id: id},
@@ -230,7 +230,7 @@
dataType: 'json',
success: function(response) {
console.log(response)
- layer.confirm(response.msg, {icon: 3, title:'提示'}, function() {
+ layer.confirm(response.msg, {icon: 3, title:'提示',skin:'textColor'}, function() {
window.location.href = window.location.href
})
}
@@ -333,6 +333,10 @@
+