wip
This commit is contained in:
@@ -19,12 +19,12 @@ class Utill extends BaseController
|
||||
# session中获取当前登录是否是管理员
|
||||
$isAdmin = Session::get('user_info.role') === 'admin' ? true : false; // 后续用来判断
|
||||
if (!$isAdmin) {
|
||||
return json(['code' => 403, 'msg' => '权限不足', 'data' => []]);
|
||||
return $this->error('权限不足', [], 403);
|
||||
}
|
||||
$data = $UtillService->getExportData($range);
|
||||
return json(['code' => 200, 'msg' => '查询成功', 'data' => $data]);
|
||||
return $this->success('查询成功', $data);
|
||||
} catch (\Exception $e) {
|
||||
return json(['code' => 500, 'msg' => '查询失败', 'data' => []]);
|
||||
return $this->error('查询失败', [], 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user