From b5df1c993a931116208002554dbb1b02336ae6b0 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Wed, 17 May 2023 16:58:14 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=91=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/system/config/SystemStorageDao.php | 2 ++ .../app/services/system/config/SystemStorageServices.php | 8 ++++++++ crmeb/crmeb/services/upload/storage/Cos.php | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/crmeb/app/dao/system/config/SystemStorageDao.php b/crmeb/app/dao/system/config/SystemStorageDao.php index 606b45780..3cf199110 100644 --- a/crmeb/app/dao/system/config/SystemStorageDao.php +++ b/crmeb/app/dao/system/config/SystemStorageDao.php @@ -74,6 +74,8 @@ class SystemStorageDao extends BaseDao $query->where('type', $where['type']); })->where('is_delete', 0)->when(isset($where['access_key']), function ($query) use ($where) { $query->where('access_key', $where['access_key']); + })->when(!empty($where['id']), function ($query) use ($where) { + $query->where('id', $where['id']); }); } } diff --git a/crmeb/app/services/system/config/SystemStorageServices.php b/crmeb/app/services/system/config/SystemStorageServices.php index 29a8b5a2f..4cea4ea9e 100644 --- a/crmeb/app/services/system/config/SystemStorageServices.php +++ b/crmeb/app/services/system/config/SystemStorageServices.php @@ -315,6 +315,11 @@ class SystemStorageServices extends BaseServices case 4:// cos 腾讯云 $upload = UploadService::init($type); $list = $upload->listbuckets(); + if (!empty($list['Name'])) { + $newList = $list; + $list = []; + $list[] = $newList; + } $config = $this->getStorageConfig($type); foreach ($list as $item) { if (!$this->dao->count(['name' => $item['Name'], 'access_key' => $config['accessKey']])) { @@ -438,6 +443,9 @@ class SystemStorageServices extends BaseServices //是否添加过域名不存在需要绑定域名 $domainList = $upload->getDomian($info->name, $info->region); $domainParse = parse_url($domain); + if (false === $domainParse) { + throw new AdminException('域名输入有误'); + } if (!in_array($domainParse['host'], $domainList)) { //绑定域名到云储存桶 $res = $upload->bindDomian($info->name, $domain, $info->region); diff --git a/crmeb/crmeb/services/upload/storage/Cos.php b/crmeb/crmeb/services/upload/storage/Cos.php index c01041944..65272084f 100644 --- a/crmeb/crmeb/services/upload/storage/Cos.php +++ b/crmeb/crmeb/services/upload/storage/Cos.php @@ -478,7 +478,9 @@ class Cos extends BaseUpload 'Type' => 'REST', 'ForcedReplacement' => 'CNAME' ]); - $res = $res->toArray(); + if (method_exists($res, 'toArray')) { + $res = $res->toArray(); + } if ($res['RequestId'] ?? null) { return true; } From 18e66bd22b18e074efcb75a40171d399ce63d59c Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 17 May 2023 17:04:28 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9D=83=E9=99=90=E8=A7=84=E5=88=99?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=87=E6=B3=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/pages/setting/systemMenus/index.vue | 3 ++- template/admin/src/pages/system/systemMenus/index.vue | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/template/admin/src/pages/setting/systemMenus/index.vue b/template/admin/src/pages/setting/systemMenus/index.vue index 5c7b9d13a..b31390a80 100644 --- a/template/admin/src/pages/setting/systemMenus/index.vue +++ b/template/admin/src/pages/setting/systemMenus/index.vue @@ -58,6 +58,7 @@ :false-value="0" @on-change="onchangeIsShow(row)" size="large" + v-if="row.auth_type == 1" > 显示 隐藏 @@ -176,7 +177,7 @@ export default { roleData: { is_show: 1, keyword: '', - auth_type: 1, + // auth_type: 1, }, defaultProps: { children: 'children', diff --git a/template/admin/src/pages/system/systemMenus/index.vue b/template/admin/src/pages/system/systemMenus/index.vue index ccffbc0d5..c2555c5b1 100644 --- a/template/admin/src/pages/system/systemMenus/index.vue +++ b/template/admin/src/pages/system/systemMenus/index.vue @@ -64,6 +64,7 @@ +