diff --git a/README.md b/README.md index 20625fc77..39e1b7aa6 100755 --- a/README.md +++ b/README.md @@ -43,9 +43,9 @@ | 开源协议 | [https://license.shopxo.net/](https://license.shopxo.net/) | 手机端 | [https://uniapp.shopxo.net/](https://uniapp.shopxo.net/) | ### 官方QQ群、答案`shopxo.net` -| 官方1群 | 官方2群 | 官方3群 | 官方多商户群 | 官方多门店群 | 官方进销存群 | 官方uniapp群 | +| 官方1群 | 官方2群 | 官方3群 | 官方4群 | 官方多商户群 | 官方多门店群 | 官方进销存群 | 官方uniapp群 | |---|---|---|---|---|---|---| -| 833531593 | 641730223 | 1127073697 | 782971010 | 281418967 | 719894308 | 679303149 | +| 833531593 | 641730223 | 1127073697 | 323523483 | 782971010 | 281418967 | 719894308 | 679303149 | ### 当前项目源代码平台 | 平台 | 地址 | diff --git a/app/admin/config/view.php b/app/admin/config/view.php index 6300c4a88..548a31596 100755 --- a/app/admin/config/view.php +++ b/app/admin/config/view.php @@ -16,7 +16,7 @@ return [ // 模板引擎类型使用Think 'type' => 'Think', // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 - 'auto_rule' => 1, + 'auto_rule' => 2, // 模板目录名 'view_dir_name' => 'view'.DS.'default', // 模板后缀 diff --git a/app/admin/controller/Admin.php b/app/admin/controller/Admin.php index c2bfd1722..10096b81d 100755 --- a/app/admin/controller/Admin.php +++ b/app/admin/controller/Admin.php @@ -105,7 +105,7 @@ class Admin extends Common { if(empty($data)) { - return $this->error(MyLang('admin.admin_no_data_tips'), MyUrl('admin/index/index')); + return ViewError(MyLang('admin.admin_no_data_tips'), MyUrl('admin/index/index')); } } diff --git a/app/admin/controller/Common.php b/app/admin/controller/Common.php index 7230a19e3..5b74c893a 100755 --- a/app/admin/controller/Common.php +++ b/app/admin/controller/Common.php @@ -38,6 +38,9 @@ class Common extends BaseController // 当前管理员可使用的插件 protected $admin_plugins; + // 当前主题 + protected $default_theme; + // 输入参数 post|get|request protected $data_post; protected $data_get; @@ -53,11 +56,13 @@ class Common extends BaseController protected $module_name; protected $controller_name; protected $action_name; + protected $mca; // 当前插件操作名称 protected $plugins_module_name; protected $plugins_controller_name; protected $plugins_action_name; + protected $plugins_mca; // 页面唯一标记 protected $page_unique_mark; @@ -193,8 +198,8 @@ class Common extends BaseController $assign['params'] = $this->data_request; // 主题 - $default_theme = 'default'; - $assign['default_theme'] = $default_theme; + $this->default_theme = 'default'; + $assign['default_theme'] = $this->default_theme; // 基础表单数据、去除数组和对象列 $form_back_params = $this->data_request; @@ -216,11 +221,13 @@ class Common extends BaseController $this->module_name = RequestModule(); $this->controller_name = RequestController(); $this->action_name = RequestAction(); + $this->mca = $this->module_name.$this->controller_name.$this->action_name; // 当前系统操作名称 $assign['module_name'] = $this->module_name; $assign['controller_name'] = $this->controller_name; $assign['action_name'] = $this->action_name; + $assign['mca'] = $this->mca; // 当前插件操作名称, 兼容插件模块名称 if(empty($this->data_request['pluginsname'])) @@ -251,11 +258,13 @@ class Common extends BaseController // 页面唯一标记 $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['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; @@ -274,20 +283,16 @@ class Common extends BaseController // 分页信息 $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); + $this->page_start = intval(($this->page-1)*$this->page_size); $assign['page'] = $this->page; $assign['page_size'] = $this->page_size; + $assign['page_start'] = $this->page_start; // 货币符号 $assign['currency_symbol'] = ResourcesService::CurrencyDataSymbol(); - // 控制器静态文件状态css,js - $module_css = $this->module_name.DS.$default_theme.DS.'css'.DS.$this->controller_name; - $module_css .= file_exists(ROOT_PATH.'static'.DS.$module_css.'.'.$this->action_name.'.css') ? '.'.$this->action_name.'.css' : '.css'; - $assign['module_css'] = file_exists(ROOT_PATH.'static'.DS.$module_css) ? $module_css : ''; - - $module_js = $this->module_name.DS.$default_theme.DS.'js'.DS.$this->controller_name; - $module_js .= file_exists(ROOT_PATH.'static'.DS.$module_js.'.'.$this->action_name.'.js') ? '.'.$this->action_name.'.js' : '.js'; - $assign['module_js'] = file_exists(ROOT_PATH.'static'.DS.$module_js) ? $module_js : ''; + // 静态文件状态css,js + $assign['static_path_data'] = ResourcesService::StaticCssOrJsPathData($this->default_theme, $this->module_name, $this->controller_name, $this->action_name); // 后台logo $assign['admin_logo'] = MyC('admin_logo'); @@ -296,8 +301,7 @@ class Common extends BaseController $assign['default_price_regex'] = MyConst('common_regex_price'); // 附件host地址 - $attachment_host = SystemBaseService::AttachmentHost(); - $assign['attachment_host'] = $attachment_host; + $assign['attachment_host'] = SystemBaseService::AttachmentHost(); // css/js引入host地址 $assign['public_host'] = MyConfig('shopxo.public_host'); @@ -326,7 +330,9 @@ class Common extends BaseController // 加载页面加载层、是否加载图片动画 $assign['is_page_loading'] = ($this->module_name.$this->controller_name.$this->action_name == 'adminindexindex') ? 0 : 1; $assign['is_page_loading_images'] = 0; - $assign['page_loading_images_url'] = $attachment_host.'/static/common/images/loading.gif'; + $assign['page_loading_images_url'] = StaticAttachmentUrl('loading.gif'); + $assign['page_loading_logo'] = AttachmentPathViewHandle(MyC('home_site_logo_square')); + $assign['page_loading_logo_border'] = StaticAttachmentUrl('loading-border.svg', 'svg'); // 是否加载附件组件 $assign['is_load_upload_editor'] = !empty($this->admin) ? 1 : 0; @@ -411,6 +417,9 @@ class Common extends BaseController $assign['multilingual_default_code'] = MultilingualService::GetUserMultilingualValue(); $assign['multilingual_data'] = (MyC('admin_use_multilingual_status') == 1) ? MultilingualService::MultilingualData() : []; + // 是否主题数据管理 + $assign['is_theme_data_admin'] = (isset($this->data_request['is_theme_data_admin']) && $this->data_request['is_theme_data_admin'] == 1) ? 1 : 0; + // 模板赋值 MyViewAssign($assign); } @@ -511,43 +520,19 @@ class Common extends BaseController } /** - * 成功提示 + * 商店账号未绑定提示 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @date 2021-07-15 * @desc description - * @param [string] $msg [提示信息、默认(操作成功)] + * @param [string] $msg [提示信息] */ - public function success($msg) + public function NotBindStoreAccountTips($msg) { - if(IS_AJAX) - { - return DataReturn($msg, 0); - } else { - MyViewAssign('msg', $msg); - return MyView('public/jump_success'); - } - } - - /** - * 错误提示 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2021-07-15 - * @desc description - * @param [string] $msg [提示信息、默认(操作失败)] - */ - public function error($msg) - { - if(IS_AJAX) - { - return DataReturn($msg, -1); - } else { - MyViewAssign('msg', $msg); - return MyView('public/jump_error'); - } + MyViewAssign('ext_html', '
'.MyLang('store_bind_account_tips').'
'); + MyViewAssign('msg', $msg); + return MyView('public/tips_error'); } /** diff --git a/app/admin/controller/Design.php b/app/admin/controller/Design.php index b37bf92df..593e98ea5 100644 --- a/app/admin/controller/Design.php +++ b/app/admin/controller/Design.php @@ -76,7 +76,7 @@ class Design extends Base $goods_category = GoodsCategoryService::GoodsCategoryAll(); // 模板数据 - $assign = [ + MyViewAssign([ // 当前数据 'layout_data' => $layout_data, 'data' => $data, @@ -97,14 +97,13 @@ class Design extends Base 'images_magic_cube_view_list_show_style' => BaseLayout::ConstData('images_magic_cube_view_list_show_style'), // 首页商品排序规则 'common_goods_order_by_type_list' => MyConst('common_goods_order_by_type_list'), - 'common_goods_order_by_rule_list' => MyConst('common_goods_order_by_rule_list'), + 'common_data_order_by_rule_list' => MyConst('common_data_order_by_rule_list'), // 加载布局样式+管理 'is_load_layout' => 1, 'is_load_layout_admin' => 1, // 编辑器文件存放地址定义 'editor_path_type' => DesignService::AttachmentPathTypeValue($data['id']), - ]; - MyViewAssign($assign); + ]); return MyView(); } diff --git a/app/admin/controller/Goods.php b/app/admin/controller/Goods.php index a3535b3f6..3c60718fe 100755 --- a/app/admin/controller/Goods.php +++ b/app/admin/controller/Goods.php @@ -88,7 +88,7 @@ class Goods extends Base $data = $this->data_detail; if(!empty($params['id']) && empty($data)) { - return $this->error(MyLang('no_data'), MyUrl('admin/goods/index')); + return ViewError(MyLang('no_data'), MyUrl('admin/goods/index')); } // 模板信息 diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index 7f2f7131c..0948ad72f 100755 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -65,6 +65,7 @@ class Index extends Common if(!empty($this->data_request['to_url'])) { $to_url = base64_decode(urldecode($this->data_request['to_url'])); + MyViewAssign('appoint_to_url', 1); } MyViewAssign('to_url', $to_url); return MyView(); diff --git a/app/admin/controller/Order.php b/app/admin/controller/Order.php index e7fce3e4c..feb3ac5c3 100755 --- a/app/admin/controller/Order.php +++ b/app/admin/controller/Order.php @@ -37,8 +37,6 @@ class Order extends Base { // 模板数据 $assign = [ - // 快递公司 - 'express_list' => ExpressService::ExpressList(), // 默认不加载视频扫码组件 'is_load_video_scan' => 1, ]; @@ -70,6 +68,21 @@ class Order extends Base return MyView(); } + /** + * 发货页面 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-09-28 + * @desc description + */ + public function DeliveryInfo() + { + // 快递公司 + MyViewAssign('express_list', ExpressService::ExpressList()); + return MyView(); + } + /** * 订单删除 * @author Devil @@ -176,6 +189,9 @@ class Order extends Base { $params = $this->data_request; $params['admin'] = $this->admin; + $params['creator'] = $this->admin['id']; + $params['creator_name'] = $this->admin['username']; + $params['user_type'] = 'admin'; return ApiService::ApiDataReturn(OrderService::OrderPaymentUnderLinePay($params)); } } diff --git a/app/admin/controller/Orderaftersale.php b/app/admin/controller/Orderaftersale.php index 52d5bbd0f..e081f1cb1 100644 --- a/app/admin/controller/Orderaftersale.php +++ b/app/admin/controller/Orderaftersale.php @@ -61,6 +61,8 @@ class Orderaftersale extends Base public function Confirm() { $params = $this->data_request; + $params['creator'] = $this->admin['id']; + $params['creator_name'] = $this->admin['username']; return ApiService::ApiDataReturn(OrderAftersaleService::AftersaleConfirm($params)); } diff --git a/app/admin/controller/Payment.php b/app/admin/controller/Payment.php index 8a9253fb7..613099b35 100755 --- a/app/admin/controller/Payment.php +++ b/app/admin/controller/Payment.php @@ -55,6 +55,14 @@ class Payment extends Base // 插件列表 $payment = PaymentService::PluginsPaymentList($this->nav_type); + // 插件更新信息 + $upgrade = PaymentService::PaymentUpgradeInfo($payment['data']); + // 是否未绑定商店账号 + if($upgrade['code'] == -300) + { + return $this->NotBindStoreAccountTips($upgrade['msg']); + } + // 模板数据 $assign = [ // 导航类型 @@ -69,12 +77,10 @@ class Payment extends Base 'common_platform_type' => MyConst('common_platform_type'), // 应用商店 'store_payment_url' => StoreService::StorePaymentUrl(), + // 支付插件更新信息 + 'upgrade_info' => $upgrade['data'], ]; - // 插件更新信息 - $upgrade = PaymentService::PaymentUpgradeInfo($payment['data']); - $assign['upgrade_info'] = $upgrade['data']; - // 数据赋值 MyViewAssign($assign); return MyView(); diff --git a/app/admin/controller/Plugins.php b/app/admin/controller/Plugins.php index 247d1a019..b4712a7b4 100755 --- a/app/admin/controller/Plugins.php +++ b/app/admin/controller/Plugins.php @@ -86,8 +86,8 @@ class Plugins extends Base $pluginscontrol = strtolower($params['data_request']['pluginscontrol']); $pluginsaction = strtolower($params['data_request']['pluginsaction']); - // 视图初始化 - $this->PluginsViewInit($pluginsname, $pluginscontrol, $pluginsaction); + // 编辑器文件存放地址定义 + MyViewAssign('editor_path_type', ResourcesService::EditorPathTypeValue('plugins_'.$pluginsname)); // 调用 $ret = PluginsService::PluginsControlCall($pluginsname, $pluginscontrol, $pluginsaction, 'admin', $params); @@ -107,7 +107,7 @@ class Plugins extends Base // 是否未绑定商店账号 if($ret['code'] == -300) { - MyViewAssign('ext_html', ''.MyLang('store_bind_account_tips').'
'); + return $this->NotBindStoreAccountTips($ret['msg']); } // 调用失败 @@ -136,57 +136,5 @@ class Plugins extends Base } return $data; } - - /** - * 视图初始化 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @datetime 2019-02-07T22:46:29+0800 - * @param [string] $plugins_name [应用名称] - * @param [string] $plugins_control [控制器名称] - * @param [string] $plugins_action [方法] - */ - public function PluginsViewInit($plugins_name, $plugins_control, $plugins_action) - { - // 模板数据 - $assign = [ - // 应用名称/控制器/方法 - 'plugins_name' => $plugins_name, - 'plugins_control' => $plugins_control, - 'plugins_action' => $plugins_action, - // 列表数据 - 'data_total' => $this->data_total, - 'data_list' => $this->data_list, - 'data' => $this->data_detail, - ]; - - // 当前操作名称 - $module_name = 'plugins'; - - // 模块组 - $group = 'admin'; - - // 控制器静态文件状态css,js - $module_css = $module_name.DS.'css'.DS.$plugins_name.DS.$group.DS.$plugins_control; - $module_css .= file_exists(ROOT_PATH.'static'.DS.$module_css.'.'.$plugins_action.'.css') ? '.'.$plugins_action.'.css' : '.css'; - $assign['module_css'] = file_exists(ROOT_PATH.'static'.DS.$module_css) ? $module_css : ''; - - $module_js = $module_name.DS.'js'.DS.$plugins_name.DS.$group.DS.$plugins_control; - $module_js .= file_exists(ROOT_PATH.'static'.DS.$module_js.'.'.$plugins_action.'.js') ? '.'.$plugins_action.'.js' : '.js'; - $assign['module_js'] = file_exists(ROOT_PATH.'static'.DS.$module_js) ? $module_js : ''; - - // 应用公共css,js - $plugins_css = $module_name.DS.'css'.DS.$plugins_name.DS.$group.DS.'common.css'; - $assign['plugins_css'] = file_exists(ROOT_PATH.'static'.DS.$plugins_css) ? $plugins_css : ''; - $plugins_js = $module_name.DS.'js'.DS.$plugins_name.DS.$group.DS.'common.js'; - $assign['plugins_js'] = file_exists(ROOT_PATH.'static'.DS.$plugins_js) ? $plugins_js : ''; - - // 编辑器文件存放地址定义 - $assign['editor_path_type'] = ResourcesService::EditorPathTypeValue('plugins_'.$plugins_name); - - // 模板赋值 - MyViewAssign($assign); - } } ?> \ No newline at end of file diff --git a/app/admin/controller/Pluginsadmin.php b/app/admin/controller/Pluginsadmin.php index b432c2cf2..4693b3a97 100755 --- a/app/admin/controller/Pluginsadmin.php +++ b/app/admin/controller/Pluginsadmin.php @@ -129,7 +129,7 @@ class Pluginsadmin extends Base { $assign['verification_msg'] = $ret['msg']; MyViewAssign($assign); - return MyView('first_step'); + return MyView('firststep'); } } @@ -137,7 +137,7 @@ class Pluginsadmin extends Base if(empty($params['plugins']) && empty($data['data'][0])) { MyViewAssign($assign); - return MyView('first_step'); + return MyView('firststep'); } else { // 编辑器文件存放地址 $assign['editor_path_type'] = ResourcesService::EditorPathTypeValue('plugins_'.$params['plugins']); @@ -147,7 +147,7 @@ class Pluginsadmin extends Base //数据赋值 MyViewAssign($assign); - return MyView('save_info'); + return MyView('saveinfo'); } } diff --git a/app/admin/controller/Site.php b/app/admin/controller/Site.php index 6a46b5464..b96832f42 100755 --- a/app/admin/controller/Site.php +++ b/app/admin/controller/Site.php @@ -129,6 +129,9 @@ class Site extends Base // 支付方式 $assign['payment_list'] = PaymentService::PaymentList(['is_enable'=>1, 'is_open_user'=>1]); + + // 默认首页列表 + $assign['site_default_index_data_list'] = SystemService::SiteDefaultIndexDataList(); break; } @@ -182,7 +185,7 @@ class Site extends Base 'common_sales_count_inc_rules_list' => MyConst('common_sales_count_inc_rules_list'), // 首页商品排序规则 'common_goods_order_by_type_list' => MyConst('common_goods_order_by_type_list'), - 'common_goods_order_by_rule_list' => MyConst('common_goods_order_by_rule_list'), + 'common_data_order_by_rule_list' => MyConst('common_data_order_by_rule_list'), // 首页楼层数据类型 'common_site_floor_data_type_list' => MyConst('common_site_floor_data_type_list'), // 搜索参数类型 diff --git a/app/admin/controller/Theme.php b/app/admin/controller/Themeadmin.php similarity index 59% rename from app/admin/controller/Theme.php rename to app/admin/controller/Themeadmin.php index 3f6661ee1..8f417751c 100755 --- a/app/admin/controller/Theme.php +++ b/app/admin/controller/Themeadmin.php @@ -12,8 +12,7 @@ namespace app\admin\controller; use app\admin\controller\Base; use app\service\ApiService; -use app\service\ThemeService; -use app\service\ConfigService; +use app\service\ThemeAdminService; use app\service\StoreService; /** @@ -23,7 +22,7 @@ use app\service\StoreService; * @version 0.0.1 * @datetime 2016-12-01T21:51:08+0800 */ -class Theme extends Base +class ThemeAdmin extends Base { private $view_type; @@ -52,38 +51,39 @@ class Theme extends Base */ public function Index() { + // 获取主题列表 + $data_list = ThemeAdminService::ThemeAdminList(); + + // 插件更新信息 + $upgrade = ThemeAdminService::ThemeAdminUpgradeInfo($data_list); + // 是否未绑定商店账号 + if($upgrade['code'] == -300) + { + return $this->NotBindStoreAccountTips($upgrade['msg']); + } + // 模板数据 - $assign = [ - // 导航参数 - 'view_type' => $this->view_type, - // 基础导航 - 'base_nav' => MyLang('theme.base_nav_list'), - // 应用商店 - 'store_theme_url' => StoreService::StoreThemeUrl(), - ]; - - // 是否默认首页 - if($this->view_type == 'index') - { + MyViewAssign([ + // 导航参数 + 'view_type' => $this->view_type, + // 基础导航 + 'base_nav' => MyLang('theme.base_nav_list'), // 默认主题 - $assign['theme'] = ThemeService::DefaultTheme(); - - // 获取主题列表 - $data_list = ThemeService::ThemeList(); - $assign['data_list'] = $data_list; - + 'theme' => ThemeAdminService::DefaultTheme(), + // 主题列表 + 'data_list' => $data_list, + // 主题数据管理url + 'admin_url_data' => ThemeAdminService::ThemeAdminDataUrl(), // 插件更新信息 - $upgrade = ThemeService::ThemeUpgradeInfo($data_list); - $assign['upgrade_info'] = $upgrade['data']; - } - - // 数据赋值 - MyViewAssign($assign); + 'upgrade_info' => $upgrade['data'], + // 应用商店 + 'store_theme_url' => StoreService::StoreThemeUrl(), + ]); return MyView($this->view_type); } /** - * 模板切换保存 + * 切换保存 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 @@ -91,7 +91,7 @@ class Theme extends Base */ public function Save() { - return ApiService::ApiDataReturn(ThemeService::ThemeSwitch($this->data_request)); + return ApiService::ApiDataReturn(ThemeAdminService::ThemeAdminSwitch($this->data_request)); } /** @@ -103,11 +103,11 @@ class Theme extends Base */ public function Delete() { - return ApiService::ApiDataReturn(ThemeService::ThemeDelete($this->data_request)); + return ApiService::ApiDataReturn(ThemeAdminService::ThemeAdminDelete($this->data_request)); } /** - * 模板上传安装 + * 上传安装 * @author Devil * @blog http://gong.gg/ * @version 0.0.1 @@ -115,11 +115,11 @@ class Theme extends Base */ public function Upload() { - return ApiService::ApiDataReturn(ThemeService::ThemeUpload($this->data_request)); + return ApiService::ApiDataReturn(ThemeAdminService::ThemeAdminUpload($this->data_request)); } /** - * 主题打包下载 + * 打包下载 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 @@ -128,7 +128,7 @@ class Theme extends Base */ public function Download() { - $ret = ThemeService::ThemeDownload($this->data_request); + $ret = ThemeAdminService::ThemeAdminDownload($this->data_request); if(isset($ret['code']) && $ret['code'] != 0) { MyViewAssign('msg', $ret['msg']); diff --git a/app/admin/controller/Themedata.php b/app/admin/controller/Themedata.php new file mode 100644 index 000000000..b47e91a80 --- /dev/null +++ b/app/admin/controller/Themedata.php @@ -0,0 +1,254 @@ +PageViewAssign(); + return MyView(); + } + + /** + * 添加/编辑页面 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2024-03-31 + * @desc description + */ + public function SaveInfo() + { + // 没有数据id则先新增 + if(empty($this->data_detail)) + { + $ret = ThemeDataService::ThemeDataSave(array_merge($this->data_request, ['is_init'=>1])); + if($ret['code'] == 0) + { + return MyRedirect(MyUrl('admin/themedata/saveinfo', ['id'=>$ret['data']])); + } else { + MyViewAssign('msg', $ret['msg']); + return MyView('public/tips_error'); + } + } + + // 当前访问页面 + $theme_type_list = MyConst('common_theme_type_list'); + $type = empty($this->data_detail['type']) ? 0 : intval($this->data_detail['type']); + $view = isset($theme_type_list[$type]) ? $theme_type_list[$type]['type'] : $theme_type_list[0]['type']; + + // 参数处理 + unset($this->data_request['id'], $this->data_request['type']); + + // 模板数据 + MyViewAssign([ + // 参数 + 'params' => $this->data_request, + // 编辑器文件存放地址定义 + 'editor_path_type' => ThemeDataService::AttachmentPathTypeValue($this->data_detail['id']), + // 主题列表 + 'theme_list' => ThemeAdminService::ThemeAdminList(), + ]); + + // 公共视图数据 + $this->PageViewAssign(); + return MyView('themedata/saveinfo/'.$view); + } + + /** + * 页面视图数据 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2024-04-02 + * @desc description + */ + public function PageViewAssign() + { + // 文章分类 + $article_category = ArticleCategoryService::ArticleCategoryList(['field'=>'id,name']); + + // 模板数据 + MyViewAssign([ + // 商品分类 + 'goods_category_list' => GoodsCategoryService::GoodsCategoryAll(), + // 品牌 + 'brand_list' => BrandService::CategoryBrand(), + // 文章分类 + 'article_category_list' => $article_category['data'], + // 静态数据 + 'common_platform_type' => MyConst('common_platform_type'), + 'common_theme_goods_type_list' => MyConst('common_theme_goods_type_list'), + 'common_theme_view_list' => MyConst('common_theme_view_list'), + 'common_theme_business_images_list' => MyConst('common_theme_business_images_list'), + 'common_theme_business_text_input_list' => MyConst('common_theme_business_text_input_list'), + 'common_theme_business_text_textarea_list' => MyConst('common_theme_business_text_textarea_list'), + // 文章排序规则 + 'common_theme_article_type_list' => MyConst('common_theme_article_type_list'), + 'common_theme_article_order_by_type_list' => MyConst('common_theme_article_order_by_type_list'), + // 商品排序规则 + 'common_goods_order_by_type_list' => MyConst('common_goods_order_by_type_list'), + 'common_data_order_by_rule_list' => MyConst('common_data_order_by_rule_list'), + ]); + } + + /** + * 保存 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2024-03-31 + * @desc description + */ + public function Save() + { + return ApiService::ApiDataReturn(ThemeDataService::ThemeDataSave($this->data_request)); + } + + /** + * 状态更新 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2024-03-31 + * @desc description + */ + public function StatusUpdate() + { + return ApiService::ApiDataReturn(ThemeDataService::ThemeDataStatusUpdate($this->data_request)); + } + + /** + * 删除 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2024-03-31 + * @desc description + */ + public function Delete() + { + return ApiService::ApiDataReturn(ThemeDataService::ThemeDataDelete($this->data_request)); + } + + /** + * 上传 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2024-03-31 + * @desc description + */ + public function Upload() + { + return ApiService::ApiDataReturn(ThemeDataService::ThemeDataUpload($this->data_request)); + } + + /** + * 打包下载 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2024-03-31 + * @desc description + */ + public function Download() + { + $ret = ThemeDataService::ThemeDataDownload($this->data_request); + if(isset($ret['code']) && $ret['code'] != 0) + { + MyViewAssign('msg', $ret['msg']); + return MyView('public/tips_error'); + } + } + + /** + * 商品搜索 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2020-11-25 + * @desc description + */ + public function GoodsSearch() + { + // 搜索数据 + $ret = ThemeDataService::GoodsSearchList($this->data_request); + if($ret['code'] == 0) + { + $ret['data']['data'] = MyView('themedata/saveinfo/public/goods_search_content', ['data'=>$ret['data']['data']]); + } + return ApiService::ApiDataReturn($ret); + } + + /** + * 文章搜索 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2020-11-25 + * @desc description + */ + public function ArticleSearch() + { + // 搜索数据 + $ret = ThemeDataService::ArticleSearchList($this->data_request); + if($ret['code'] == 0) + { + $ret['data']['data'] = MyView('themedata/saveinfo/public/article_search_content', ['data'=>$ret['data']['data']]); + } + return ApiService::ApiDataReturn($ret); + } +} +?> \ No newline at end of file diff --git a/app/admin/controller/User.php b/app/admin/controller/User.php index b1d1fe058..e331debd5 100755 --- a/app/admin/controller/User.php +++ b/app/admin/controller/User.php @@ -63,7 +63,7 @@ class User extends Base $data = $this->data_detail; if(!empty($params['id']) && empty($data)) { - return $this->error(MyLang('no_data'), MyUrl('admin/user/index')); + return ViewError(MyLang('no_data'), MyUrl('admin/user/index')); } // 模板数据 diff --git a/app/admin/form/Article.php b/app/admin/form/Article.php index 98b2c7675..0f6d10940 100644 --- a/app/admin/form/Article.php +++ b/app/admin/form/Article.php @@ -45,7 +45,6 @@ class Article 'is_search' => 1, 'is_delete' => 1, 'is_middle' => 0, - 'detail_title' => MyLang('form_table_base_detail_title'), ], // 表单配置 'form' => [ @@ -57,6 +56,26 @@ class Article 'align' => 'center', 'width' => 80, ], + [ + 'label' => $lang['id'], + 'view_type' => 'field', + 'view_key' => 'id', + 'width' => 110, + 'is_copy' => 1, + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'input', + 'where_type' => '=', + ], + ], + [ + 'label' => $lang['cover'], + 'view_type' => 'images', + 'view_key' => 'cover', + 'width' => 70, + 'images_width' => 25, + 'images_height' => 25, + ], [ 'label' => $lang['info'], 'view_type' => 'module', @@ -70,10 +89,13 @@ class Article ], ], [ - 'label' => $lang['jump_url'], + 'label' => $lang['describe'], 'view_type' => 'field', - 'view_key' => 'jump_url', + 'view_key' => 'describe', 'grid_size' => 'sm', + 'text_truncate' => 2, + 'is_popover' => 1, + 'is_sort' => 1, 'search_config' => [ 'form_type' => 'input', 'where_type' => 'like', @@ -130,6 +152,16 @@ class Article 'is_multiple' => 1, ], ], + [ + 'label' => $lang['jump_url'], + 'view_type' => 'field', + 'view_key' => 'jump_url', + 'grid_size' => 'sm', + 'search_config' => [ + 'form_type' => 'input', + 'where_type' => 'like', + ], + ], [ 'label' => $lang['images_count'], 'view_type' => 'field', diff --git a/app/admin/form/Goods.php b/app/admin/form/Goods.php index 11d3d2c11..4593141e2 100644 --- a/app/admin/form/Goods.php +++ b/app/admin/form/Goods.php @@ -49,7 +49,6 @@ class Goods 'status_field' => 'is_shelves', 'is_search' => 1, 'is_delete' => 1, - 'detail_title' => MyLang('form_table_base_detail_title'), 'is_middle' => 0, ], // 表单配置 @@ -67,6 +66,7 @@ class Goods 'view_type' => 'field', 'view_key' => 'id', 'width' => 110, + 'is_copy' => 1, 'is_sort' => 1, 'search_config' => [ 'form_type' => 'input', @@ -84,7 +84,7 @@ class Goods 'form_type' => 'input', 'form_name' => 'id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueGoodsInfo', + 'where_value_custom' => 'SystemModuleGoodsWhereHandle', 'placeholder' => $lang['info_placeholder'], ], ], @@ -301,7 +301,6 @@ class Goods 'data_handle' => 'GoodsService::GoodsDataHandle', 'is_page' => 1, 'data_params' => [ - 'is_photo' => 1, 'is_content_app' => 1, 'is_category' => 1, ], @@ -312,29 +311,6 @@ class Goods ]; } - /** - * 商品信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-30 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueGoodsInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取商品 id - $ids = Db::name('Goods')->alias('g')->join('goods_spec_base gb', 'g.id=gb.goods_id')->where('g.title|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords|gb.coding|gb.barcode', 'like', '%'.$value.'%')->column('g.id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } - /** * 商品分类条件处理 * @author Devil diff --git a/app/admin/form/Goodsbrowse.php b/app/admin/form/Goodsbrowse.php index a3a6dc00f..2899537e9 100644 --- a/app/admin/form/Goodsbrowse.php +++ b/app/admin/form/Goodsbrowse.php @@ -65,7 +65,7 @@ class GoodsBrowse 'form_type' => 'input', 'form_name' => 'b.user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['user_placeholder'], ], ], @@ -126,7 +126,7 @@ class GoodsBrowse // 数据配置 'data' => [ 'table_obj' => Db::name('GoodsBrowse')->alias('b')->join('goods g', 'g.id=b.goods_id'), - 'select_field' => 'b.*, g.title, g.original_price, g.price, g.min_price, g.images', + 'select_field' => 'b.*, g.title, g.original_price, g.price, g.min_price, g.images, g.inventory_unit', 'order_by' => 'b.id desc', 'detail_dkey' => 'b.id', 'data_handle' => 'GoodsBrowseService::GoodsBrowseListHandle', @@ -138,28 +138,5 @@ class GoodsBrowse ], ]; } - - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-30 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } } ?> \ No newline at end of file diff --git a/app/admin/form/Goodscart.php b/app/admin/form/Goodscart.php index cab6c6686..bb4ec4a16 100644 --- a/app/admin/form/Goodscart.php +++ b/app/admin/form/Goodscart.php @@ -65,7 +65,7 @@ class GoodsCart 'form_type' => 'input', 'form_name' => 'c.user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['user_placeholder'], ], ], @@ -138,28 +138,5 @@ class GoodsCart ], ]; } - - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-30 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } } ?> \ No newline at end of file diff --git a/app/admin/form/Goodscomments.php b/app/admin/form/Goodscomments.php index 6715366a2..cdb1c4781 100644 --- a/app/admin/form/Goodscomments.php +++ b/app/admin/form/Goodscomments.php @@ -66,7 +66,7 @@ class GoodsComments 'form_type' => 'input', 'form_name' => 'user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => '请输入用户名/昵称/手机/邮箱', ], ], @@ -145,8 +145,8 @@ class GoodsComments ], [ 'label' => $lang['images'], - 'view_type' => 'module', - 'view_key' => 'goodscomments/module/images', + 'view_type' => 'many_images', + 'view_key' => 'images', ], [ 'label' => $lang['is_show'], @@ -251,29 +251,6 @@ class GoodsComments ]; } - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-08 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } - /** * 商品信息条件处理 * @author Devil diff --git a/app/admin/form/Goodsfavor.php b/app/admin/form/Goodsfavor.php index 90223dfd5..714de60c2 100644 --- a/app/admin/form/Goodsfavor.php +++ b/app/admin/form/Goodsfavor.php @@ -67,7 +67,7 @@ class GoodsFavor 'form_type' => 'input', 'form_name' => 'f.user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['user_placeholder'], ], ], @@ -128,7 +128,7 @@ class GoodsFavor // 数据配置 'data' => [ 'table_obj' => Db::name('GoodsFavor')->alias('f')->join('goods g', 'g.id=f.goods_id'), - 'select_field' => 'f.*, g.title, g.original_price, g.price, g.min_price, g.images', + 'select_field' => 'f.*, g.title, g.original_price, g.price, g.min_price, g.images, g.inventory_unit', 'order_by' => 'f.id desc', 'detail_dkey' => 'f.id', 'data_handle' => 'GoodsFavorService::GoodsFavorListHandle', @@ -140,28 +140,5 @@ class GoodsFavor ], ]; } - - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-30 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } } ?> \ No newline at end of file diff --git a/app/admin/form/Goodsparamstemplate.php b/app/admin/form/Goodsparamstemplate.php index 5bead3f0c..607b5abdc 100644 --- a/app/admin/form/Goodsparamstemplate.php +++ b/app/admin/form/Goodsparamstemplate.php @@ -63,7 +63,6 @@ class GoodsParamsTemplate 'is_search' => 1, 'is_delete' => 1, 'is_middle' => 0, - 'detail_title' => MyLang('form_table_base_detail_title'), ], // 表单配置 'form' => [ diff --git a/app/admin/form/Integrallog.php b/app/admin/form/Integrallog.php index 95397fb09..8c07b8cfb 100644 --- a/app/admin/form/Integrallog.php +++ b/app/admin/form/Integrallog.php @@ -10,8 +10,6 @@ // +---------------------------------------------------------------------- namespace app\admin\form; -use think\facade\Db; - /** * 积分日志动态表格 * @author Devil @@ -56,7 +54,7 @@ class IntegralLog 'form_type' => 'input', 'form_name' => 'user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['user_placeholder'], ], ], @@ -155,28 +153,5 @@ class IntegralLog ], ]; } - - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-27 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } } ?> \ No newline at end of file diff --git a/app/admin/form/Message.php b/app/admin/form/Message.php index d49881d3f..6e52ab253 100644 --- a/app/admin/form/Message.php +++ b/app/admin/form/Message.php @@ -67,7 +67,7 @@ class Message 'form_type' => 'input', 'form_name' => 'user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['user_placeholder'], ], ], @@ -227,29 +227,6 @@ class Message return (count($value) == 2) ? null : 0; } - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-26 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } - /** * 业务类型 * @author Devil diff --git a/app/admin/form/Navigation.php b/app/admin/form/Navigation.php index 3c5a1d277..4b4c0677b 100644 --- a/app/admin/form/Navigation.php +++ b/app/admin/form/Navigation.php @@ -35,7 +35,13 @@ class Navigation public function Run($params = []) { // 导航类型 - $nav_type = empty($params['nav_type']) ? 'header' : trim($params['nav_type']); + $search_params = ['type' => empty($params['type']) ? 'header' : trim($params['type'])]; + + // 是否主题管理 + if(isset($params['is_theme_data_admin']) && $params['is_theme_data_admin'] == 1) + { + $search_params['is_theme_data_admin'] = 1; + } // 配置信息 $lang = MyLang('navigation.form_table'); @@ -45,7 +51,7 @@ class Navigation 'key_field' => 'id', 'status_field' => 'is_show', 'is_search' => 1, - 'search_url' => MyUrl('admin/navigation/index', ['nav_type'=>$nav_type]), + 'search_url' => MyUrl('admin/navigation/index', $search_params), 'is_delete' => 1, ], // 表单配置 diff --git a/app/admin/form/Order.php b/app/admin/form/Order.php index 257eaa72f..cd4261608 100644 --- a/app/admin/form/Order.php +++ b/app/admin/form/Order.php @@ -12,7 +12,6 @@ namespace app\admin\form; use think\facade\Db; use app\service\PaymentService; -use app\service\ExpressService; /** * 订单动态表格 @@ -47,7 +46,6 @@ class Order 'base' => [ 'key_field' => 'id', 'is_search' => 1, - 'detail_title' => MyLang('form_table_base_detail_title'), 'is_middle' => 0, ], // 表单配置 @@ -76,7 +74,7 @@ class Order 'form_type' => 'input', 'form_name' => 'user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['user_placeholder'], ], ], @@ -298,28 +296,17 @@ class Order ], ], [ - 'label' => $lang['express_name'], - 'view_type' => 'field', - 'view_key' => 'express_name', - 'is_sort' => 1, + 'label' => $lang['express'], + 'view_type' => 'module', + 'view_key' => 'order/module/express', + 'grid_size' => 'sm', + 'is_detail' => 0, 'search_config' => [ - 'form_type' => 'select', - 'form_name' => 'express_id', - 'data' => ExpressService::ExpressList(), - 'where_type' => 'in', - 'data_key' => 'id', - 'data_name' => 'name', - 'is_multiple' => 1, - ], - ], - [ - 'label' => $lang['express_number'], - 'view_type' => 'field', - 'view_key' => 'express_number', - 'is_sort' => 1, - 'search_config' => [ - 'form_type' => 'input', - 'where_type' => 'like', + 'form_type' => 'input', + 'form_name' => 'id', + 'where_type_custom' => 'in', + 'where_value_custom' => 'WhereExpressInfo', + 'placeholder' => $lang['express_placeholder'], ], ], [ @@ -429,6 +416,7 @@ class Order 'data' => [ 'table_name' => 'Order', 'data_handle' => 'OrderService::OrderListHandle', + 'detail_action' => ['detail', 'saveinfo', 'deliveryinfo'], 'detail_where' => [ ['is_delete_time', '=', 0], ], @@ -556,29 +544,6 @@ class Order return $value; } - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-08 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } - /** * 基础条件处理 * @author Devil @@ -607,5 +572,27 @@ class Order } return $value; } + + /** + * 快递条件处理 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2020-06-08 + * @desc description + * @param [string] $value [条件值] + * @param [array] $params [输入参数] + */ + public function WhereExpressInfo($value, $params = []) + { + if(!empty($value)) + { + // 订单ID + $ids = Db::name('OrderExpress')->where(['express_number'=>$value])->column('order_id'); + // 避免空条件造成无效的错觉 + return empty($ids) ? [0] : $ids; + } + return $value; + } } ?> \ No newline at end of file diff --git a/app/admin/form/Orderaftersale.php b/app/admin/form/Orderaftersale.php index e491fdec5..10d13328a 100644 --- a/app/admin/form/Orderaftersale.php +++ b/app/admin/form/Orderaftersale.php @@ -72,7 +72,7 @@ class OrderAftersale 'form_type' => 'input', 'form_name' => 'user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['user_placeholder'], ], ], @@ -169,8 +169,8 @@ class OrderAftersale ], [ 'label' => $lang['voucher'], - 'view_type' => 'module', - 'view_key' => 'orderaftersale/module/voucher', + 'view_type' => 'many_images', + 'view_key' => 'images', ], [ 'label' => $lang['express_name'], @@ -289,29 +289,6 @@ class OrderAftersale ]; } - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-08 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } - /** * 基础条件处理 * @author Devil diff --git a/app/admin/form/Paylog.php b/app/admin/form/Paylog.php index 216484aad..f876fa7f0 100644 --- a/app/admin/form/Paylog.php +++ b/app/admin/form/Paylog.php @@ -85,7 +85,7 @@ class PayLog 'form_type' => 'input', 'form_name' => 'user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['user_placeholder'], ], ], @@ -261,29 +261,6 @@ class PayLog ]; } - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-26 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } - /** * 支付方式类型 * @author Devil diff --git a/app/admin/form/Refundlog.php b/app/admin/form/Refundlog.php index 5bfc04eb1..69c49bfd6 100644 --- a/app/admin/form/Refundlog.php +++ b/app/admin/form/Refundlog.php @@ -57,7 +57,7 @@ class RefundLog 'form_type' => 'input', 'form_name' => 'user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['user_placeholder'], ], ], @@ -201,29 +201,6 @@ class RefundLog ]; } - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-27 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } - /** * 支付方式类型 * @author Devil diff --git a/app/admin/form/Role.php b/app/admin/form/Role.php index 019c34ac3..139450418 100644 --- a/app/admin/form/Role.php +++ b/app/admin/form/Role.php @@ -42,7 +42,6 @@ class Role 'status_field' => 'is_enable', 'is_search' => 1, 'is_delete' => 1, - 'detail_title' => MyLang('form_table_base_detail_title'), ], // 表单配置 'form' => [ diff --git a/app/admin/form/Themedata.php b/app/admin/form/Themedata.php new file mode 100644 index 000000000..7fd0e6ac9 --- /dev/null +++ b/app/admin/form/Themedata.php @@ -0,0 +1,212 @@ +theme_list = empty($res) ? [] : array_column($res, 'name', 'theme'); + } + + /** + * 入口 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2020-06-26 + * @desc description + * @param [array] $params [输入参数] + */ + public function Run($params = []) + { + $lang = MyLang('themedata.form_table'); + return [ + // 基础配置 + 'base' => [ + 'key_field' => 'id', + 'status_field' => 'is_enable', + 'is_search' => 1, + 'is_delete' => 1, + 'is_middle' => 0, + ], + // 表单配置 + 'form' => [ + [ + 'view_type' => 'checkbox', + 'is_checked' => 0, + 'checked_text' => MyLang('reverse_select_title'), + 'not_checked_text' => MyLang('select_all_title'), + 'align' => 'center', + 'width' => 80, + ], + [ + 'label' => $lang['unique'], + 'view_type' => 'field', + 'view_key' => 'unique', + 'width' => 300, + 'is_copy' => 1, + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'input', + ], + ], + [ + 'label' => $lang['name'], + 'view_type' => 'field', + 'view_key' => 'name', + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'input', + 'where_type' => 'like', + ], + ], + [ + 'label' => $lang['type'], + 'view_type' => 'field', + 'view_key' => 'type_name', + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'select', + 'form_name' => 'type', + 'where_type' => 'in', + 'data' => MyConst('common_theme_type_list'), + 'data_key' => 'value', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => $lang['theme'], + 'view_type' => 'field', + 'view_key' => 'theme_name', + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'select', + 'form_name' => 'theme', + 'where_type' => 'in', + 'data' => $this->theme_list, + 'is_multiple' => 1, + ], + ], + [ + 'label' => $lang['is_enable'], + 'view_type' => 'status', + 'view_key' => 'is_enable', + 'post_url' => MyUrl('admin/themedata/statusupdate'), + 'is_form_su' => 1, + 'align' => 'center', + 'is_sort' => 1, + 'width' => 130, + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => MyConst('common_is_text_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => $lang['view'], + 'view_type' => 'field', + 'view_key' => 'view_name', + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'select', + 'form_name' => 'view', + 'where_type' => 'in', + 'data' => MyConst('common_theme_view_list'), + 'data_key' => 'value', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => $lang['add_time'], + 'view_type' => 'field', + 'view_key' => 'add_time', + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => $lang['upd_time'], + 'view_type' => 'field', + 'view_key' => 'upd_time', + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => MyLang('operate_title'), + 'view_type' => 'operate', + 'view_key' => 'themedata/module/operate', + 'align' => 'center', + 'fixed' => 'right', + 'width' => 120, + ], + ], + // 数据配置 + 'data' => [ + 'table_name' => 'ThemeData', + 'data_handle' => 'ThemeDataService::ThemeDataListHandle', + 'is_page' => 1, + 'is_handle_time_field' => 1, + 'is_json_data_handle' => 1, + 'json_config_data' => [ + 'data' => [] + ], + 'is_fixed_name_field' => 1, + 'fixed_name_data' => [ + 'type' => [ + 'data' => MyConst('common_theme_type_list'), + ], + 'theme' => [ + 'data' => $this->theme_list, + ], + 'view' => [ + 'data' => MyConst('common_theme_view_list'), + ], + ], + ], + ]; + } +} +?> \ No newline at end of file diff --git a/app/admin/form/User.php b/app/admin/form/User.php index abc42a4fc..56eea8961 100644 --- a/app/admin/form/User.php +++ b/app/admin/form/User.php @@ -62,6 +62,7 @@ class User 'view_type' => 'field', 'view_key' => 'id', 'width' => 105, + 'is_copy' => 1, 'is_sort' => 1, 'search_config' => [ 'form_type' => 'input', @@ -72,7 +73,7 @@ class User 'label' => $lang['number_code'], 'view_type' => 'qrcode', 'view_key' => 'number_code', - 'width' => 115, + 'width' => 150, 'is_sort' => 1, 'search_config' => [ 'form_type' => 'input', @@ -272,7 +273,7 @@ class User 'form_type' => 'input', 'form_name' => 'referrer', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['referrer_placeholder'], ], ], @@ -362,29 +363,6 @@ class User return $value; } - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-08 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } - /** * 系统类型列表 * @author Devil diff --git a/app/admin/form/Useraddress.php b/app/admin/form/Useraddress.php index d84045f3a..2f1dc1f37 100644 --- a/app/admin/form/Useraddress.php +++ b/app/admin/form/Useraddress.php @@ -10,7 +10,6 @@ // +---------------------------------------------------------------------- namespace app\admin\form; -use think\facade\Db; use app\service\RegionService; /** @@ -67,7 +66,7 @@ class UserAddress 'form_type' => 'input', 'form_name' => 'user_id', 'where_type_custom' => 'in', - 'where_value_custom' => 'WhereValueUserInfo', + 'where_value_custom' => 'SystemModuleUserWhereHandle', 'placeholder' => $lang['user_placeholder'], ], ], @@ -214,29 +213,6 @@ class UserAddress ]; } - /** - * 用户信息条件处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2020-06-30 - * @desc description - * @param [string] $value [条件值] - * @param [array] $params [输入参数] - */ - public function WhereValueUserInfo($value, $params = []) - { - if(!empty($value)) - { - // 获取用户 id - $ids = Db::name('User')->where('number_code|username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id'); - - // 避免空条件造成无效的错觉 - return empty($ids) ? [0] : $ids; - } - return $value; - } - /** * 获取地区省份数据 * @author Devil diff --git a/app/admin/form/Warehousegoods.php b/app/admin/form/Warehousegoods.php index 16fd3f854..b6749e64f 100644 --- a/app/admin/form/Warehousegoods.php +++ b/app/admin/form/Warehousegoods.php @@ -46,7 +46,6 @@ class WarehouseGoods 'status_field' => 'is_enable', 'is_search' => 1, 'is_delete' => 1, - 'detail_title' => MyLang('form_table_base_detail_title'), 'is_middle' => 0, ], // 表单配置 diff --git a/app/admin/lang/cht.php b/app/admin/lang/cht.php index ace0fda79..d7375fc79 100644 --- a/app/admin/lang/cht.php +++ b/app/admin/lang/cht.php @@ -307,11 +307,14 @@ return [ 'detail_images_title' => '詳情圖片', // 动态表格 'form_table' => [ + 'id' => '檔案ID', + 'cover' => '封面', 'info' => '標題', - 'jump_url' => '跳轉url地址', + 'describe' => '描述', 'article_category_name' => '分類', 'is_enable' => '是否啟用', 'is_home_recommended' => '首頁推薦', + 'jump_url' => '跳轉url地址', 'images_count' => '圖片數量', 'access_count' => '訪問次數', 'add_time' => '創建時間', @@ -737,7 +740,6 @@ return [ // 页面公共 'page_common' => [ 'order_id_empty' => '訂單id有誤', - 'express_choice_tips' => '請選擇快遞管道', 'payment_choice_tips' => '請選擇支付方式', ], // 页面基础 @@ -745,8 +747,12 @@ return [ 'form_payment_title' => '支付操作', 'form_item_take' => '取貨碼', 'form_item_take_message' => '請填寫4位數取貨碼', + 'form_item_express_add_name' => '添加快遞', + 'form_item_express_choice_win_name' => '選擇快遞', + 'form_item_express_id' => '快遞管道', 'form_item_express_number' => '快遞單號', - 'form_item_express_number_message' => '請填寫快遞單號', + 'form_item_note' => '備註資訊', + 'form_item_note_message' => '備註資訊最多200個字', // 地址 'detail_user_address_title' => '收貨地址', 'detail_user_address_name' => '收件人', @@ -794,8 +800,8 @@ return [ 'payment_name' => '支付方式', 'user_note' => '用戶備註', 'extension' => '擴展資訊', - 'express_name' => '快遞公司', - 'express_number' => '快遞單號', + 'express' => '快遞資訊', + 'express_placeholder' => '請輸入快遞單號', 'aftersale' => '最新售後', 'is_comments' => '用戶是否評論', 'confirm_time' => '確認時間', @@ -815,6 +821,13 @@ return [ 'refund_price' => '退款金額', 'returned_quantity' => '退貨數量', ], + // 快递表格 + 'form_table_express' => [ + 'name' => '快遞公司', + 'number' => '快遞單號', + 'note' => '快遞備註', + 'time' => '發貨時間', + ], ], // 订单售后 @@ -912,7 +925,7 @@ return [ ], // 主题管理 - 'theme' => [ + 'themeadmin' => [ 'base_nav_list' => [ ['name' => '當前主題', 'type' => 'index'], ['name' => '主題安裝', 'type' => 'upload'], @@ -924,6 +937,26 @@ return [ 'form_theme_upload_tips' => '上傳一個zip壓縮格式的主題安裝包', ], + // 主题数据 + 'themedata' => [ + 'base_nav_title' => '主題數據', + 'upload_list_tips' => [ + '1.選擇已下載的主題數據zip包', + '2.導入將自動新增一條數據', + ], + // 动态表格 + 'form_table' => [ + 'unique' => '唯一標識', + 'name' => '名稱', + 'type' => '資料類型', + 'theme' => '主題', + 'view' => '頁面', + 'is_enable' => '是否啟用', + 'add_time' => '添加時間', + 'upd_time' => '更新時間', + ], + ], + // 用户中心导航 'appcenternav' => [ 'base_nav_title' => '手機用戶中心導航', @@ -1434,11 +1467,17 @@ return [ 'link_delete' => '友情連結删除', 'link_statusupdate' => '友情連結狀態更新', 'link_detail' => '友情連結詳情', - 'theme_index' => '主題管理', - 'theme_save' => '主題管理添加/編輯', - 'theme_upload' => '主題上傳安裝', - 'theme_delete' => '主題删除', - 'theme_download' => '主題下載', + 'themeadmin_index' => '主題管理', + 'themeadmin_save' => '主題管理添加/編輯', + 'themeadmin_upload' => '主題上傳安裝', + 'themeadmin_delete' => '主題删除', + 'themeadmin_download' => '主題下載', + 'themedata_index' => '主題數據', + 'themedata_saveinfo' => '主題數據添加/編輯頁面', + 'themedata_save' => '主題數據添加/編輯', + 'themedata_upload' => '主題數據上傳', + 'themedata_delete' => '主題數據删除', + 'themedata_download' => '主題數據下載', 'slide_index' => '首頁輪播', 'slide_saveinfo' => '輪播添加/編輯頁面', 'slide_save' => '輪播添加/編輯', diff --git a/app/admin/lang/en.php b/app/admin/lang/en.php index 3d1750776..ff399842c 100644 --- a/app/admin/lang/en.php +++ b/app/admin/lang/en.php @@ -302,13 +302,19 @@ return [ // 文章 'article' => [ + 'base_nav_title' => 'Article', + 'detail_content_title' => 'DetailContent', + 'detail_images_title' => 'DetailImages', // 动态表格 'form_table' => [ + 'id' => 'ArticleID', + 'cover' => 'Cover', 'info' => 'Title', - 'jump_url' => 'Jump Url', + 'describe' => 'Describe', 'article_category_name' => 'Category', 'is_enable' => 'Enable or not', 'is_home_recommended' => 'HomePage recommend', + 'jump_url' => 'Jump Url', 'images_count' => 'Images Count', 'access_count' => 'Access Count', 'add_time' => 'Creation Time', @@ -752,7 +758,6 @@ return [ // 页面公共 'page_common' => [ 'order_id_empty' => 'Wrong order ID', - 'express_choice_tips' => 'Please select express delivery method', 'payment_choice_tips' => 'Please select payment method', ], // 页面基础 @@ -760,8 +765,12 @@ return [ 'form_payment_title' => 'Payment Operation', 'form_item_take' => 'Take Code', 'form_item_take_message' => 'Please fill in the 4-digit pickup code', + 'form_item_express_add_name' => 'Add express delivery', + 'form_item_express_choice_win_name' => 'Choose express delivery', + 'form_item_express_id' => 'Express delivery method', 'form_item_express_number' => 'Express Number', - 'form_item_express_number_message' => 'Please fill in the express bill number', + 'form_item_note' => 'memo', + 'form_item_note_message' => 'Note information can be up to 200 characters long', // 地址 'detail_user_address_title' => 'Shipping Address', 'detail_user_address_name' => 'Receiving Name', @@ -809,8 +818,8 @@ return [ 'payment_name' => 'Payment Type', 'user_note' => 'User Note', 'extension' => 'Extendeds Info', - 'express_name' => 'Express Name', - 'express_number' => 'Express Number', + 'express' => 'Express Info', + 'express_placeholder' => 'Please enter Express Number', 'aftersale' => 'New Aftersale', 'is_comments' => 'Whether the user comment', 'confirm_time' => 'Confirm Time', @@ -830,6 +839,13 @@ return [ 'refund_price' => 'RefundAmount', 'returned_quantity' => 'RefundNumber', ], + // 快递表格 + 'form_table_express' => [ + 'name' => 'express company', + 'number' => 'express number', + 'note' => 'express note', + 'time' => 'delivery time', + ], ], // 订单售后 @@ -927,7 +943,7 @@ return [ ], // 主题管理 - 'theme' => [ + 'themeadmin' => [ 'base_nav_list' => [ ['name' => 'Current Theme', 'type' => 'index'], ['name' => 'Theme Install', 'type' => 'upload'], @@ -939,6 +955,26 @@ return [ 'form_theme_upload_tips' => 'Upload a zip compressed theme installation package', ], + // 主题数据 + 'themedata' => [ + 'base_nav_title' => 'Theme data', + 'upload_list_tips' => [ + '1. Select the downloaded theme data zip package', + '2. Importing will automatically add a new piece of data', + ], + // 动态表格 + 'form_table' => [ + 'unique' => 'Unique', + 'name' => 'Name', + 'type' => 'Data type', + 'theme' => 'Theme', + 'view' => 'Page', + 'is_enable' => 'Enable or not', + 'add_time' => 'Add time', + 'upd_time' => 'Update time', + ], + ], + // 用户中心导航 'appcenternav' => [ 'base_nav_title' => 'Mobile User Center Navigation', @@ -1449,11 +1485,17 @@ return [ 'link_delete' => 'Link delete', 'link_statusupdate' => 'Link status update', 'link_detail' => 'Link details', - 'theme_index' => 'Theme admin', - 'theme_save' => 'Topic admin add/edit', - 'theme_upload' => 'Theme upload and installation', - 'theme_delete' => 'Subject delete', - 'theme_download' => 'Theme download', + 'themeadmin_index' => 'Theme admin', + 'themeadmin_save' => 'Theme admin add/edit', + 'themeadmin_upload' => 'Theme upload and installation', + 'themeadmin_delete' => 'Theme delete', + 'themeadmin_download' => 'Theme download', + 'themedata_index' => 'Theme data', + 'themedata_saveinfo' => 'Theme data add/edit page', + 'themedata_save' => 'Theme data add/edit', + 'themedata_upload' => 'Theme data upload', + 'themedata_delete' => 'Theme data delete', + 'themedata_download' => 'Theme data download', 'slide_index' => 'HomePage Slide', 'slide_saveinfo' => 'Carousel add/edit page', 'slide_save' => 'Carousel add/edit', diff --git a/app/admin/lang/spa.php b/app/admin/lang/spa.php index ee5c3eca3..785619ae4 100644 --- a/app/admin/lang/spa.php +++ b/app/admin/lang/spa.php @@ -307,11 +307,14 @@ return [ 'detail_images_title' => 'Detalles de la imagen', // 动态表格 'form_table' => [ + 'id' => 'ID del artículo', + 'cover' => 'Portada', 'info' => 'Título', - 'jump_url' => 'Dirección de la dirección de la dirección de salto', + 'describe' => 'Descripción', 'article_category_name' => 'Clasificación', 'is_enable' => 'Si habilitar', 'is_home_recommended' => 'Recomendación de la página de inicio', + 'jump_url' => 'Dirección de la dirección de la dirección de salto', 'images_count' => 'Número de imágenes', 'access_count' => 'Número de visitas', 'add_time' => 'Tiempo de creación', @@ -737,7 +740,6 @@ return [ // 页面公共 'page_common' => [ 'order_id_empty' => 'El ID del pedido es incorrecto', - 'express_choice_tips' => 'Por favor, elija el método de mensajería.', 'payment_choice_tips' => 'Por favor, elija el método de pago.', ], // 页面基础 @@ -745,8 +747,12 @@ return [ 'form_payment_title' => 'Operaciones de pago', 'form_item_take' => 'Código de recogida', 'form_item_take_message' => 'Por favor, rellene el Código de recogida de 4 dígitos.', + 'form_item_express_add_name' => 'Añadir mensajería', + 'form_item_express_choice_win_name' => 'Selección de mensajería', + 'form_item_express_id' => 'Método de mensajería', 'form_item_express_number' => 'Número de la lista de mensajería', - 'form_item_express_number_message' => 'Por favor, rellene el número de formulario de mensajería.', + 'form_item_note' => 'Nota información', + 'form_item_note_message' => 'La información de la nota tiene un máximo de 200 caracteres', // 地址 'detail_user_address_title' => 'Dirección de recepción', 'detail_user_address_name' => 'Destinatarios', @@ -794,8 +800,8 @@ return [ 'payment_name' => 'Método de pago', 'user_note' => 'Nota del usuario', 'extension' => 'Información extendida', - 'express_name' => 'Empresa de mensajería', - 'express_number' => 'Número de la lista de mensajería', + 'express' => 'Información de mensajería', + 'express_placeholder' => 'Introduzca su Número de la lista de mensajería', 'aftersale' => 'Último post - venta', 'is_comments' => 'Si el usuario comenta', 'confirm_time' => 'Tiempo de confirmación', @@ -815,6 +821,13 @@ return [ 'refund_price' => 'Importe del reembolso', 'returned_quantity' => 'Número de devoluciones', ], + // 快递表格 + 'form_table_express' => [ + 'name' => 'Empresa de mensajería', + 'number' => 'Número de la lista de mensajería', + 'note' => 'Nota de mensajería', + 'time' => 'Tiempo de envío', + ], ], // 订单售后 @@ -912,7 +925,7 @@ return [ ], // 主题管理 - 'theme' => [ + 'themeadmin' => [ 'base_nav_list' => [ ['name' => 'Temas actuales', 'type' => 'index'], ['name' => 'Instalación temática', 'type' => 'upload'], @@ -924,6 +937,26 @@ return [ 'form_theme_upload_tips' => 'Cargar un paquete de instalación de temas en formato zip comprimido', ], + // 主题数据 + 'themedata' => [ + 'base_nav_title' => 'Datos temáticos', + 'upload_list_tips' => [ + '1. seleccione el paquete zip de datos temáticos descargado', + '2. la importación agregará automáticamente un nuevo dato', + ], + // 动态表格 + 'form_table' => [ + 'unique' => 'Identificación única', + 'name' => 'Nombre', + 'type' => 'Tipo de datos', + 'theme' => 'Tema', + 'view' => 'Página', + 'is_enable' => 'Si habilitar', + 'add_time' => 'añadir tiempo', + 'upd_time' => 'tiempo de actualización', + ], + ], + // 用户中心导航 'appcenternav' => [ 'base_nav_title' => 'Navegación del Centro de usuarios móviles', @@ -1434,11 +1467,17 @@ return [ 'link_delete' => 'Eliminar enlaces de amistad', 'link_statusupdate' => 'Actualización del Estado del enlace de amistad', 'link_detail' => 'Detalles del enlace amistoso', - 'theme_index' => 'Gestión temática', - 'theme_save' => 'Gestión temática añadir / editar', - 'theme_upload' => 'Instalación de carga de temas', - 'theme_delete' => 'Eliminación del tema', - 'theme_download' => 'Descarga del tema', + 'themeadmin_index' => 'Gestión temática', + 'themeadmin_save' => 'Gestión temática añadir / editar', + 'themeadmin_upload' => 'Instalación de carga de temas', + 'themeadmin_delete' => 'Eliminación del tema', + 'themeadmin_download' => 'Descarga del tema', + 'themedata_index' => 'Datos temáticos', + 'themedata_saveinfo' => 'Página de adición / edición de datos temáticos', + 'themedata_save' => 'Añadir / editar datos temáticos', + 'themedata_upload' => 'Carga de datos temáticos', + 'themedata_delete' => 'Eliminación de datos temáticos', + 'themedata_download' => 'Descarga de datos temáticos', 'slide_index' => 'Rotación de la página de inicio', 'slide_saveinfo' => 'Página de adición / edición de la rotación', 'slide_save' => 'Añadir / editar a la rotación', diff --git a/app/admin/lang/zh.php b/app/admin/lang/zh.php index 7bbee2550..bc300f529 100755 --- a/app/admin/lang/zh.php +++ b/app/admin/lang/zh.php @@ -307,11 +307,14 @@ return [ 'detail_images_title' => '详情图片', // 动态表格 'form_table' => [ + 'id' => '文章ID', + 'cover' => '封面', 'info' => '标题', - 'jump_url' => '跳转url地址', + 'describe' => '描述', 'article_category_name' => '分类', 'is_enable' => '是否启用', 'is_home_recommended' => '首页推荐', + 'jump_url' => '跳转url地址', 'images_count' => '图片数量', 'access_count' => '访问次数', 'add_time' => '创建时间', @@ -738,7 +741,6 @@ return [ // 页面公共 'page_common' => [ 'order_id_empty' => '订单id有误', - 'express_choice_tips' => '请选择快递方式', 'payment_choice_tips' => '请选择支付方式', ], // 页面基础 @@ -746,8 +748,12 @@ return [ 'form_payment_title' => '支付操作', 'form_item_take' => '取货码', 'form_item_take_message' => '请填写4位数取货码', + 'form_item_express_add_name' => '添加快递', + 'form_item_express_choice_win_name' => '选择快递', + 'form_item_express_id' => '快递方式', 'form_item_express_number' => '快递单号', - 'form_item_express_number_message' => '请填写快递单号', + 'form_item_note' => '备注信息', + 'form_item_note_message' => '备注信息最多200个字符', // 地址 'detail_user_address_title' => '收货地址', 'detail_user_address_name' => '收件人', @@ -795,8 +801,8 @@ return [ 'payment_name' => '支付方式', 'user_note' => '用户备注', 'extension' => '扩展信息', - 'express_name' => '快递公司', - 'express_number' => '快递单号', + 'express' => '快递信息', + 'express_placeholder' => '请输入快递单号', 'aftersale' => '最新售后', 'is_comments' => '用户是否评论', 'confirm_time' => '确认时间', @@ -816,6 +822,13 @@ return [ 'refund_price' => '退款金额', 'returned_quantity' => '退货数量', ], + // 快递表格 + 'form_table_express' => [ + 'name' => '快递公司', + 'number' => '快递单号', + 'note' => '快递备注', + 'time' => '发货时间', + ], ], // 订单售后 @@ -913,7 +926,7 @@ return [ ], // 主题管理 - 'theme' => [ + 'themeadmin' => [ 'base_nav_list' => [ ['name' => '当前主题', 'type' => 'index'], ['name' => '主题安装', 'type' => 'upload'], @@ -925,6 +938,26 @@ return [ 'form_theme_upload_tips' => '上传一个zip压缩格式的主题安装包', ], + // 主题数据 + 'themedata' => [ + 'base_nav_title' => '主题数据', + 'upload_list_tips' => [ + '1. 选择已下载的主题数据zip包', + '2. 导入将自动新增一条数据', + ], + // 动态表格 + 'form_table' => [ + 'unique' => '唯一标识', + 'name' => '名称', + 'type' => '数据类型', + 'theme' => '主题', + 'view' => '页面', + 'is_enable' => '是否启用', + 'add_time' => '添加时间', + 'upd_time' => '更新时间', + ], + ], + // 用户中心导航 'appcenternav' => [ 'base_nav_title' => '手机用户中心导航', @@ -1435,11 +1468,20 @@ return [ 'link_delete' => '友情链接删除', 'link_statusupdate' => '友情链接状态更新', 'link_detail' => '友情链接详情', - 'theme_index' => '主题管理', - 'theme_save' => '主题管理添加/编辑', - 'theme_upload' => '主题上传安装', - 'theme_delete' => '主题删除', - 'theme_download' => '主题下载', + 'themeadmin_index' => '主题管理', + 'themeadmin_save' => '主题管理添加/编辑', + 'themeadmin_upload' => '主题上传安装', + 'themeadmin_delete' => '主题删除', + 'themeadmin_download' => '主题下载', + 'themedata_index' => '主题数据', + 'themedata_saveinfo' => '主题数据添加/编辑页面', + 'themedata_save' => '主题数据添加/编辑', + 'themedata_upload' => '主题数据上传', + 'themedata_delete' => '主题数据删除', + 'themedata_download' => '主题数据下载', + 'themedata_detail' => '主题数据详情', + 'themedata_goodssearch' => '主题数据商品搜索', + 'themedata_articlesearch' => '主题数据文章搜索', 'slide_index' => '首页轮播', 'slide_saveinfo' => '轮播添加/编辑页面', 'slide_save' => '轮播添加/编辑', diff --git a/app/admin/view/default/admin/detail.html b/app/admin/view/default/admin/detail.html index 06eeee457..156754ed8 100644 --- a/app/admin/view/default/admin/detail.html +++ b/app/admin/view/default/admin/detail.html @@ -1,2 +1,2 @@ -{{extend name="public/module/detail" /}} \ No newline at end of file +{{extend name="../../../module/view/detail" /}} \ No newline at end of file diff --git a/app/admin/view/default/admin/index.html b/app/admin/view/default/admin/index.html index 103e73ba9..b3511702f 100755 --- a/app/admin/view/default/admin/index.html +++ b/app/admin/view/default/admin/index.html @@ -1,12 +1,16 @@ -{{extend name="public/module/form" /}} +{{extend name="../../../module/view/form" /}} {{block name="form_operate_top"}} - - - - + + {{if AdminIsPower('admin', 'saveinfo')}} + + + + + {{/if}} + {__block__} {{/block}} diff --git a/app/admin/view/default/admin/login_info.html b/app/admin/view/default/admin/logininfo.html similarity index 95% rename from app/admin/view/default/admin/login_info.html rename to app/admin/view/default/admin/logininfo.html index a7ae143eb..9d30ad42a 100755 --- a/app/admin/view/default/admin/login_info.html +++ b/app/admin/view/default/admin/logininfo.html @@ -1,4 +1,4 @@ -{{include file="public/header" /}} +{{:ModuleInclude('public/header')}}{{:MyLang('admin.login_welcome_title')}}
-{{:MyLang('common.admin_browser_title')}}
+{{:MyLang('common.admin_browser_title')}}