Skip to content

Commit

Permalink
v6.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gongfuxiang committed Apr 25, 2024
1 parent 51d6f9d commit 459469a
Show file tree
Hide file tree
Showing 1,773 changed files with 348,445 additions and 114,332 deletions.
80 changes: 41 additions & 39 deletions app/admin/controller/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,29 +194,15 @@ public function ViewInit()
$this->system_type = SystemService::SystemTypeValue();
$assign['system_type'] = $this->system_type;

// 公共参数
$assign['params'] = $this->data_request;
// 公共参数(去除多余的参数、避免给页面url地址造成污染)
$temp_params = $this->data_request;
unset($temp_params['s'], $temp_params['pluginsname'], $temp_params['pluginscontrol'], $temp_params['pluginsaction']);
$assign['params'] = $temp_params;

// 主题
$this->default_theme = 'default';
$assign['default_theme'] = $this->default_theme;

// 基础表单数据、去除数组和对象列
$form_back_params = $this->data_request;
if(!empty($form_back_params) && is_array($form_back_params))
{
foreach($form_back_params as $k=>$v)
{
if(is_array($v) || is_object($v))
{
unset($form_back_params[$k]);
}
}
unset($form_back_params['id'], $form_back_params['form_back_control'], $form_back_params['form_back_action']);
}
$this->form_back_params = $form_back_params;
$assign['form_back_params'] = $this->form_back_params;

// 当前系统操作名称
$this->module_name = RequestModule();
$this->controller_name = RequestController();
Expand All @@ -237,11 +223,6 @@ public function ViewInit()
$this->plugins_controller_name = '';
$this->plugins_action_name = '';

// 页面表单操作指定返回、方法默认index
$this->form_back_control = empty($this->data_request['form_back_control']) ? $this->controller_name : $this->data_request['form_back_control'];
$this->form_back_action = empty($this->data_request['form_back_action']) ? 'index' : $this->data_request['form_back_action'];
$this->form_back_url = MyUrl($this->module_name.'/'.$this->form_back_control.'/'.$this->form_back_action, $this->form_back_params);

// 页面唯一标记
$this->page_unique_mark = $this->module_name.'-'.$this->controller_name.'-'.$this->action_name;
} else {
Expand All @@ -250,36 +231,49 @@ public function ViewInit()
$this->plugins_controller_name = empty($this->data_request['pluginscontrol']) ? 'index' : $this->data_request['pluginscontrol'];
$this->plugins_action_name = empty($this->data_request['pluginsaction']) ? 'index' : $this->data_request['pluginsaction'];

// 页面表单操作指定返回、方法默认index
$this->form_back_control = empty($this->data_request['form_back_control']) ? $this->plugins_controller_name : $this->data_request['form_back_control'];
$this->form_back_action = empty($this->data_request['form_back_action']) ? 'index' : $this->data_request['form_back_action'];
$this->form_back_url = PluginsAdminUrl($this->plugins_module_name, $this->form_back_control, $this->form_back_action, $this->form_back_params);

// 页面唯一标记
$this->page_unique_mark = $this->module_name.'-'.$this->controller_name.'-'.$this->plugins_module_name.'-'.$this->plugins_controller_name.'-'.$this->plugins_action_name;
}
$this->plugins_mca = $this->plugins_module_name.$this->plugins_controller_name.$this->plugins_action_name;

// 页面唯一标记
$assign['page_unique_mark'] = $this->page_unique_mark;

// 当前插件操作名称
$assign['plugins_module_name'] = $this->plugins_module_name;
$assign['plugins_controller_name'] = $this->plugins_controller_name;
$assign['plugins_action_name'] = $this->plugins_action_name;
$assign['plugins_mca'] = $this->plugins_mca;

// 页面唯一标记
$assign['page_unique_mark'] = $this->page_unique_mark;

// 基础表单数据、去除数组和对象列
$form_back_params = $this->data_request;
if(!empty($form_back_params) && is_array($form_back_params))
{
foreach($form_back_params as $k=>$v)
{
if(is_array($v) || is_object($v))
{
unset($form_back_params[$k]);
}
}
unset($form_back_params['s'], $form_back_params['pluginsname'], $form_back_params['pluginscontrol'], $form_back_params['pluginsaction'], $form_back_params['id'], $form_back_params['form_back_control'], $form_back_params['form_back_action']);
}
$this->form_back_params = $form_back_params;
$assign['form_back_params'] = $this->form_back_params;
// 页面表单操作指定返回、方法默认index
if(empty($this->plugins_module_name))
{
$this->form_back_control = empty($this->data_request['form_back_control']) ? $this->controller_name : $this->data_request['form_back_control'];
$this->form_back_action = empty($this->data_request['form_back_action']) ? 'index' : $this->data_request['form_back_action'];
$this->form_back_url = MyUrl($this->module_name.'/'.$this->form_back_control.'/'.$this->form_back_action, $this->form_back_params);
} else {
$this->form_back_control = empty($this->data_request['form_back_control']) ? $this->plugins_controller_name : $this->data_request['form_back_control'];
$this->form_back_action = empty($this->data_request['form_back_action']) ? 'index' : $this->data_request['form_back_action'];
$this->form_back_url = PluginsHomeUrl($this->plugins_module_name, $this->form_back_control, $this->form_back_action, $this->form_back_params);
}
// 基础表单返回url
$assign['form_back_url'] = $this->form_back_url;

// 管理员
$assign['admin'] = $this->admin;

// 权限菜单
$assign['left_menu'] = $this->left_menu;
// 当前管理员可使用的插件
$assign['admin_plugins'] = $this->admin_plugins;

// 分页信息
$this->page = max(1, isset($this->data_request['page']) ? intval($this->data_request['page']) : 1);
$this->page_size = min(empty($this->data_request['page_size']) ? MyC('common_page_size', 10, true) : intval($this->data_request['page_size']), 1000);
Expand All @@ -288,6 +282,14 @@ public function ViewInit()
$assign['page_size'] = $this->page_size;
$assign['page_start'] = $this->page_start;

// 管理员
$assign['admin'] = $this->admin;

// 权限菜单
$assign['left_menu'] = $this->left_menu;
// 当前管理员可使用的插件
$assign['admin_plugins'] = $this->admin_plugins;

// 货币符号
$assign['currency_symbol'] = ResourcesService::CurrencyDataSymbol();

Expand Down
2 changes: 1 addition & 1 deletion app/admin/controller/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function Index()
public function GetClassVars()
{
$data = [];
$vers = get_class_vars(get_class());
$vers = get_class_vars(get_class($this));
foreach($vers as $k=>$v)
{
if(property_exists($this, $k))
Expand Down
50 changes: 30 additions & 20 deletions app/admin/form/Appcenternav.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,6 @@ public function Run($params = [])
'where_type' => 'like',
],
],
[
'label' => $lang['platform'],
'view_type' => 'field',
'view_key' => 'platform',
'view_data_key' => 'name',
'view_data' => MyConst('common_platform_type'),
'is_sort' => 1,
'width' => 165,
'search_config' => [
'form_type' => 'select',
'where_type' => 'in',
'data' => MyConst('common_platform_type'),
'data_key' => 'value',
'data_name' => 'name',
'is_multiple' => 1,
],
],
[
'label' => $lang['images_url'],
'view_type' => 'images',
Expand All @@ -94,9 +77,7 @@ public function Run($params = [])
[
'label' => $lang['event_type'],
'view_type' => 'field',
'view_key' => 'event_type',
'view_data_key' => 'name',
'view_data' => MyConst('common_app_event_type'),
'view_key' => 'event_type_name',
'grid_size' => 'sm',
'is_sort' => 1,
'search_config' => [
Expand Down Expand Up @@ -154,6 +135,21 @@ public function Run($params = [])
'is_multiple' => 1,
],
],
[
'label' => $lang['platform'],
'view_type' => 'field',
'view_key' => 'platform_text',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'select',
'form_name' => 'platform',
'where_type' => 'like',
'data' => MyConst('common_platform_type'),
'data_key' => 'value',
'data_name' => 'name',
'is_seat_select' => 1,
],
],
[
'label' => $lang['desc'],
'view_type' => 'field',
Expand Down Expand Up @@ -206,6 +202,20 @@ public function Run($params = [])
'order_by' => 'sort asc,id asc',
'is_handle_time_field' => 1,
'is_handle_annex_field' => 1,
'is_json_data_handle' => 1,
'json_config_data' => [
'platform' => [],
],
'is_fixed_name_field' => 1,
'fixed_name_data' => [
'platform' => [
'data' => MyConst('common_platform_type'),
'field' => 'platform_text',
],
'event_type' => [
'data' => MyConst('common_app_event_type'),
],
],
],
];
}
Expand Down
50 changes: 30 additions & 20 deletions app/admin/form/Apphomenav.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,6 @@ public function Run($params = [])
'where_type' => 'like',
],
],
[
'label' => $lang['platform'],
'view_type' => 'field',
'view_key' => 'platform',
'view_data_key' => 'name',
'view_data' => MyConst('common_platform_type'),
'is_sort' => 1,
'width' => 165,
'search_config' => [
'form_type' => 'select',
'where_type' => 'in',
'data' => MyConst('common_platform_type'),
'data_key' => 'value',
'data_name' => 'name',
'is_multiple' => 1,
],
],
[
'label' => $lang['images'],
'view_type' => 'module',
Expand All @@ -93,9 +76,7 @@ public function Run($params = [])
[
'label' => $lang['event_type'],
'view_type' => 'field',
'view_key' => 'event_type',
'view_data_key' => 'name',
'view_data' => MyConst('common_app_event_type'),
'view_key' => 'event_type_name',
'grid_size' => 'sm',
'is_sort' => 1,
'search_config' => [
Expand Down Expand Up @@ -153,6 +134,21 @@ public function Run($params = [])
'is_multiple' => 1,
],
],
[
'label' => $lang['platform'],
'view_type' => 'field',
'view_key' => 'platform_text',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'select',
'form_name' => 'platform',
'where_type' => 'like',
'data' => MyConst('common_platform_type'),
'data_key' => 'value',
'data_name' => 'name',
'is_seat_select' => 1,
],
],
[
'label' => $lang['sort'],
'view_type' => 'field',
Expand Down Expand Up @@ -195,6 +191,20 @@ public function Run($params = [])
'order_by' => 'sort asc,id asc',
'is_handle_time_field' => 1,
'is_handle_annex_field' => 1,
'is_json_data_handle' => 1,
'json_config_data' => [
'platform' => [],
],
'is_fixed_name_field' => 1,
'fixed_name_data' => [
'platform' => [
'data' => MyConst('common_platform_type'),
'field' => 'platform_text',
],
'event_type' => [
'data' => MyConst('common_app_event_type'),
],
],
],
];
}
Expand Down
51 changes: 31 additions & 20 deletions app/admin/form/Quicknav.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function Run($params = [])
'status_field' => 'is_enable',
'is_search' => 1,
'is_delete' => 1,
'is_middle' => 0,
'is_data_export_excel' => 1,
],
// 表单配置
Expand All @@ -65,23 +66,6 @@ public function Run($params = [])
'where_type' => 'like',
],
],
[
'label' => $lang['platform'],
'view_type' => 'field',
'view_key' => 'platform',
'view_data_key' => 'name',
'view_data' => MyConst('common_platform_type'),
'is_sort' => 1,
'width' => 165,
'search_config' => [
'form_type' => 'select',
'where_type' => 'in',
'data' => MyConst('common_platform_type'),
'data_key' => 'value',
'data_name' => 'name',
'is_multiple' => 1,
],
],
[
'label' => $lang['images'],
'view_type' => 'module',
Expand All @@ -92,9 +76,7 @@ public function Run($params = [])
[
'label' => $lang['event_type'],
'view_type' => 'field',
'view_key' => 'event_type',
'view_data_key' => 'name',
'view_data' => MyConst('common_app_event_type'),
'view_key' => 'event_type_name',
'grid_size' => 'sm',
'is_sort' => 1,
'search_config' => [
Expand Down Expand Up @@ -135,6 +117,21 @@ public function Run($params = [])
'is_multiple' => 1,
],
],
[
'label' => $lang['platform'],
'view_type' => 'field',
'view_key' => 'platform_text',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'select',
'form_name' => 'platform',
'where_type' => 'like',
'data' => MyConst('common_platform_type'),
'data_key' => 'value',
'data_name' => 'name',
'is_seat_select' => 1,
],
],
[
'label' => $lang['sort'],
'view_type' => 'field',
Expand Down Expand Up @@ -178,6 +175,20 @@ public function Run($params = [])
'order_by' => 'sort asc,id asc',
'is_handle_time_field' => 1,
'is_handle_annex_field' => 1,
'is_json_data_handle' => 1,
'json_config_data' => [
'platform' => [],
],
'is_fixed_name_field' => 1,
'fixed_name_data' => [
'platform' => [
'data' => MyConst('common_platform_type'),
'field' => 'platform_text',
],
'event_type' => [
'data' => MyConst('common_app_event_type'),
],
],
],
];
}
Expand Down
Loading

0 comments on commit 459469a

Please sign in to comment.