Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

This commit is contained in:
From-wh 2023-05-17 17:08:02 +08:00
commit dd59daabda
8 changed files with 52 additions and 14 deletions

View File

@ -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);

View File

@ -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');
}
}

View File

@ -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,

View File

@ -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']);
});
}
}

View File

@ -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);

View File

@ -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;
}

View File

@ -58,6 +58,7 @@
:false-value="0"
@on-change="onchangeIsShow(row)"
size="large"
v-if="row.auth_type == 1"
>
<span slot="open">显示</span>
<span slot="close">隐藏</span>
@ -176,7 +177,7 @@ export default {
roleData: {
is_show: 1,
keyword: '',
auth_type: 1,
// auth_type: 1,
},
defaultProps: {
children: 'children',

View File

@ -64,6 +64,7 @@
</i-switch>
</template>
</vxe-table-column>
<vxe-table-column field="mark" title="备注" min-width="120"></vxe-table-column>
<vxe-table-column field="date" title="操作" align="right" width="250" fixed="right">
<template v-slot="{ row }">
<span>