后台管理升级完成

This commit is contained in:
devil_gong
2018-12-24 17:40:42 +08:00
parent def2a12fa1
commit f78bc4fed3
18 changed files with 137 additions and 380 deletions

View File

@ -90,6 +90,12 @@ class AdminPowerService
'is_checked' => 1,
'error_msg' => '图标格式 0~30 个字符之间',
],
[
'checked_type' => 'in',
'key_name' => 'is_show',
'checked_data' => [0,1],
'error_msg' => '是否显示范围值有误',
],
];
$ret = params_checked($params, $p);
if($ret !== true)
@ -105,6 +111,7 @@ class AdminPowerService
'name' => $params['name'],
'control' => $params['control'],
'action' => $params['action'],
'is_show' => isset($params['is_show']) ? intval($params['is_show']) : 0,
];
if(empty($params['id']))
{

View File

@ -2,6 +2,7 @@
namespace app\service;
use think\Db;
use app\service\ResourcesService;
/**
* 配置服务层
@ -43,6 +44,14 @@ class ConfigService
return DataReturn('参数不能为空', -1);
}
// 附件
$data_fields = ['home_site_logo', 'home_site_logo_wap', 'home_site_desktop_icon'];
$attachment = ResourcesService::AttachmentParams($params, $data_fields);
foreach($attachment['data'] as $k=>$v)
{
$params[$k] = $v;
}
// 循环保存数据
$success = 0;