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 @@
+
From 3f402b8d1991d03279c3b7e9701df973a0435fa1 Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Wed, 17 May 2023 17:04:48 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8D=87=E7=BA=A7?=
=?UTF-8?q?=E7=A8=8B=E5=BA=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/adminapi/controller/Login.php | 3 --
.../adminapi/controller/UpgradeController.php | 36 ++++++++++++++++++-
2 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/crmeb/app/adminapi/controller/Login.php b/crmeb/app/adminapi/controller/Login.php
index e3e9d877a..ca0846102 100644
--- a/crmeb/app/adminapi/controller/Login.php
+++ b/crmeb/app/adminapi/controller/Login.php
@@ -95,7 +95,6 @@ class Login extends AuthController
['captchaType', '']
], true);
-
if ($captchaVerification != '') {
try {
aj_captcha_check_two($captchaType, $captchaVerification);
@@ -118,8 +117,6 @@ class Login extends AuthController
}
$this->validate(['account' => $account, 'pwd' => $password], \app\adminapi\validate\setting\SystemAdminValidata::class, 'get');
-
-
$result = $this->services->login($account, $password, 'admin', $key);
if (!$result) {
$num = CacheService::get('login_captcha', 1);
diff --git a/crmeb/app/adminapi/controller/UpgradeController.php b/crmeb/app/adminapi/controller/UpgradeController.php
index c3a9d31b7..6cb9891e7 100644
--- a/crmeb/app/adminapi/controller/UpgradeController.php
+++ b/crmeb/app/adminapi/controller/UpgradeController.php
@@ -14295,7 +14295,41 @@ SQL
'code' => 500,
'type' => -1,
'table' => "system_menus",
- 'sql' => "truncate table `@table`"
+ 'sql' => "DROP TABLE `@table`"
+ ],
+ [
+ 'code' => 500,
+ 'type' => 1,
+ 'table' => "system_menus",
+ 'findSql' => "select * from information_schema.tables where table_name ='@table'",
+ 'sql' => "CREATE TABLE `@table` (
+ `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
+ `pid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '父级id',
+ `icon` varchar(16) NOT NULL DEFAULT '' COMMENT '图标',
+ `menu_name` varchar(32) NOT NULL DEFAULT '' COMMENT '按钮名',
+ `module` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '模块名',
+ `controller` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '控制器',
+ `action` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '方法名',
+ `api_url` varchar(100) NOT NULL DEFAULT '' COMMENT 'api接口地址',
+ `methods` varchar(10) NOT NULL DEFAULT '' COMMENT '提交方式POST GET PUT DELETE',
+ `params` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '[]' COMMENT '参数',
+ `sort` tinyint(3) NOT NULL DEFAULT '1' COMMENT '排序',
+ `is_show` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否为隐藏菜单0=隐藏菜单,1=显示菜单',
+ `is_show_path` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为隐藏菜单供前台使用',
+ `access` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '子管理员是否可用',
+ `menu_path` varchar(128) NOT NULL DEFAULT '' COMMENT '路由名称 前端使用',
+ `path` varchar(255) NOT NULL DEFAULT '' COMMENT '路径',
+ `auth_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为菜单 1菜单 2功能',
+ `header` varchar(50) NOT NULL DEFAULT '' COMMENT '顶部菜单标示',
+ `is_header` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否顶部菜单1是0否',
+ `unique_auth` varchar(150) NOT NULL DEFAULT '' COMMENT '前台唯一标识',
+ `is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
+ `mark` varchar(500) NOT NULL DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE,
+ KEY `pid` (`pid`) USING BTREE,
+ KEY `is_show` (`is_show`) USING BTREE,
+ KEY `access` (`access`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=2473 DEFAULT CHARSET=utf8 COMMENT='菜单表'"
],
[
'code' => 500,
From 79d490d0b73482a53f903826e1f7a79d0feb2af6 Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Wed, 17 May 2023 17:05:16 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96test?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/adminapi/controller/Test.php | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/crmeb/app/adminapi/controller/Test.php b/crmeb/app/adminapi/controller/Test.php
index 217fe65eb..9d0b051e4 100644
--- a/crmeb/app/adminapi/controller/Test.php
+++ b/crmeb/app/adminapi/controller/Test.php
@@ -6,18 +6,11 @@
namespace app\adminapi\controller;
-use crmeb\services\easywechat\orderShipping\MiniOrderService;
-
class Test
{
public function index()
{
- $ship_list = [
- [
- 'item_desc' => '蓝牙音乐手表 | Jeep智能表蓝牙'
- ]
- ];
- MiniOrderService::shippingByTradeNo('cp179280225803173888', 3, $ship_list, 'oZEAhsy60rrq96hE86LmBb9v_Kes');
+
}
}