细节优化
Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
parent
e617ba289c
commit
bc6d90e546
@ -30,7 +30,7 @@ class Organization extends BasicApi
|
|||||||
$organizationList = [];
|
$organizationList = [];
|
||||||
if ($list) {
|
if ($list) {
|
||||||
foreach ($list as $item) {
|
foreach ($list as $item) {
|
||||||
$organization = $this->model->where(['code' => $item['organization_code']])->field('id', true)->find()->toArray();
|
$organization = $this->model->where(['code' => $item['organization_code']])->field('id', true)->find();
|
||||||
if ($organization) {
|
if ($organization) {
|
||||||
$organizationList[] = $organization;
|
$organizationList[] = $organization;
|
||||||
}
|
}
|
||||||
|
@ -71,9 +71,10 @@ class Auth
|
|||||||
if (!empty($access['is_auth']) && !auth($node, 'project')) {
|
if (!empty($access['is_auth']) && !auth($node, 'project')) {
|
||||||
return json(['code' => 403, 'msg' => '无权限操作资源,访问被拒绝']);
|
return json(['code' => 403, 'msg' => '无权限操作资源,访问被拒绝']);
|
||||||
}
|
}
|
||||||
|
|
||||||
//第三资源初始化
|
//第三资源初始化
|
||||||
$storageConfig = config('storage.');
|
$storageConfig = config('storage.');
|
||||||
|
if ($storageConfig['init']) {
|
||||||
|
unset($storageConfig['init']);
|
||||||
if ($storageConfig) {
|
if ($storageConfig) {
|
||||||
foreach ($storageConfig as $key => $config) {
|
foreach ($storageConfig as $key => $config) {
|
||||||
if ($key == 'qiniu' || $key == 'oss') {
|
if ($key == 'qiniu' || $key == 'oss') {
|
||||||
@ -85,6 +86,7 @@ class Auth
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
'init' => false,
|
||||||
'storage_type' => 'local', //local:本地,qiniu:七牛,oss:阿里云oss
|
'storage_type' => 'local', //local:本地,qiniu:七牛,oss:阿里云oss
|
||||||
'storage_local_exts' => 'png,jpg,rar,doc,icon,mp4,zip,gif,jpeg,bmp,webp,mp4,m3u8,rmvb,avi,swf,3gp,mkv,flv,txt,docx,pages,epub,pdf,numbers,csv,xls,xlsx,keynote,ppt,pptx,mp3,wav,wma,ogg,aac,flac;', //支持上传的文件格式
|
'storage_local_exts' => 'png,jpg,rar,doc,icon,mp4,zip,gif,jpeg,bmp,webp,mp4,m3u8,rmvb,avi,swf,3gp,mkv,flv,txt,docx,pages,epub,pdf,numbers,csv,xls,xlsx,keynote,ppt,pptx,mp3,wav,wma,ogg,aac,flac;', //支持上传的文件格式
|
||||||
// 可用的第三方资源配置
|
// 可用的第三方资源配置
|
||||||
|
Loading…
x
Reference in New Issue
Block a user