|
@@ -68,6 +68,7 @@ class openDcsApiClassAction extends openapiAction
|
|
|
$crow = $groupArr[$j];
|
|
|
if ($crow['pid'] == $row['id']) {
|
|
|
$rowArr["nav"][$pcon]["list"][] = [
|
|
|
+ "id" => $crow['id'],
|
|
|
"icon" => URL.(empty($crow['icon']) ? $row['icon'] : $crow['icon']),
|
|
|
"module"=>$row['key'],
|
|
|
"name"=>$crow['name'],
|
|
@@ -81,4 +82,26 @@ class openDcsApiClassAction extends openapiAction
|
|
|
return $rowArr;
|
|
|
}
|
|
|
|
|
|
+ public function dcs_auth_checkAction() {
|
|
|
+ $staffNum = $this->get('staff_num');
|
|
|
+ $sys_id = $this->get('sys_id');
|
|
|
+
|
|
|
+ if (empty($staffNum) || empty($sys_id)) {
|
|
|
+ $this->showreturn('', '参数错误!', 201);
|
|
|
+ }
|
|
|
+
|
|
|
+ $uInfo = m("admin")->getone("user='{$staffNum}'");
|
|
|
+
|
|
|
+ $checkAuth = m("dcs_auth")->getall("FIND_IN_SET($sys_id, `range`) and FIND_IN_SET({$uInfo['id']}, `user_ids`) ");
|
|
|
+
|
|
|
+ // 找到权限
|
|
|
+ if (!empty($checkAuth) && count($checkAuth) > 0) {
|
|
|
+ $urlInfo = m("dcs_group")->getone("id={$sys_id}");
|
|
|
+ $this->showreturn([url=>trim($urlInfo['url'])], '成功!', 200);
|
|
|
+ } else {
|
|
|
+ $this->showreturn('', '暂无权限访问,请联系管理员!', 202);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|