Commit c105c75c authored by zhoujun's avatar zhoujun

回归测试

parent 18b7df84
......@@ -95,7 +95,7 @@ class AdminController extends Controller
return $query->where('updated_at','<',$endTime);
})->when($status == 0, function ($query) use ($status) {
return $query->orderBy('status','ASC');
})->orderBy('updated_at','DESC')->select('id', 'uid', 'loacl_url','img_url', 'status','is_upload', 'updated_at')->paginate($pageNum);
})->orderBy('updated_at','DESC')->select('id', 'uid','role_id','role', 'loacl_url','img_url', 'status','is_upload', 'updated_at')->paginate($pageNum);
if($startTime != '') $paginateAppends['startTime'] = $startTime;
if($endTime != '') $paginateAppends['endTime'] = $endTime;
if($userName != '') $paginateAppends['user'] = $userName;
......
......@@ -293,7 +293,7 @@ class CardController extends Controller
$tableName = 'wx_card_role_'.$serverId;
$role = DB::connection('wx_mysql')->table($tableName)->where('uid',$userId)->where('role_id',$roleId)->select('id')->first();
$img = $this->getUpdateImg($result['data'],$userId,$role->id,$serverId);
$img = $this->getUpdateImg($result['data'],$userId,$role->id,$serverId,$roleId);
if($img) return $this->jsonReturn(0, '上传成功');
Cache::forget($userId.':card:upload:image');
return $this->jsonReturn(10060, '上传失败');
......@@ -306,7 +306,7 @@ class CardController extends Controller
* @date 2021/06/01
* @author live
*/
public function getUpdateImg($data,$userId,$roleId,$serverId)
public function getUpdateImg($data,$userId,$roleId,$serverId,$role='')
{
$img = WxUserImg::where('uid',$userId)->where('role_id',$roleId)->where('server_id',$serverId)->first();
if($img){
......@@ -321,6 +321,7 @@ class CardController extends Controller
$row->uid = $userId;
$row->role_id = $roleId;
$row->server_id = $serverId;
$row->role = $role;
$row->loacl_url = $data['url'];
$row->img_url = $data['yunUrl'];
$row->status = 0;
......
......@@ -43,6 +43,7 @@
<th>操作 <input type="checkbox" value="all" onclick="return imgCheck(this);"/><label class="ml-sm">全选</label><button type="button" class="btn btn-success" onclick="return setAllStatus();">审核</button></th>
<th>编号</th>
<th>用户名</th>
<th>角色</th>
<th>审核</th>
<th>状态</th>
<th>图片</th>
......@@ -56,6 +57,7 @@
<td> <input type="checkbox" name="ids[]" value="{{ $li->id }}" class="imgIDCheckbox" /></td>
<td>{{ @$li->id }}</td>
<td>{{ $USER_INFO[$li->uid] ?? '' }}</td>
<td>{{ $li->role ?? '' }}</td>
<td>
@if($li->status == 0)
<button type="button" class="btn btn-success" onclick="return setStatus({{ $li->id }});">审核</button>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment