细节优化
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 = [];
|
||||
if ($list) {
|
||||
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) {
|
||||
$organizationList[] = $organization;
|
||||
}
|
||||
|
@ -71,17 +71,19 @@ class Auth
|
||||
if (!empty($access['is_auth']) && !auth($node, 'project')) {
|
||||
return json(['code' => 403, 'msg' => '无权限操作资源,访问被拒绝']);
|
||||
}
|
||||
|
||||
//第三资源初始化
|
||||
$storageConfig = config('storage.');
|
||||
if ($storageConfig) {
|
||||
foreach ($storageConfig as $key => $config) {
|
||||
if ($key == 'qiniu' || $key == 'oss') {
|
||||
foreach ($config as $itemKey => $item) {
|
||||
sysconf($itemKey, $item);
|
||||
if ($storageConfig['init']) {
|
||||
unset($storageConfig['init']);
|
||||
if ($storageConfig) {
|
||||
foreach ($storageConfig as $key => $config) {
|
||||
if ($key == 'qiniu' || $key == 'oss') {
|
||||
foreach ($config as $itemKey => $item) {
|
||||
sysconf($itemKey, $item);
|
||||
}
|
||||
} else {
|
||||
sysconf($key, $config);
|
||||
}
|
||||
} else {
|
||||
sysconf($key, $config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'init' => false,
|
||||
'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;', //支持上传的文件格式
|
||||
// 可用的第三方资源配置
|
||||
|
Loading…
x
Reference in New Issue
Block a user