From 19e3b265b21dfb549c15e60ab8e59dca9d2d154e Mon Sep 17 00:00:00 2001 From: devil Date: Fri, 21 Aug 2020 10:22:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Customview.php | 7 --- application/admin/controller/Link.php | 7 --- application/admin/controller/Navigation.php | 6 -- application/admin/form/Customview.php | 6 +- application/admin/form/Link.php | 2 +- application/admin/form/Navigation.php | 2 +- application/admin/form/Order.php | 56 +++++++++++++++++++ .../admin/view/default/lib/is_footer.html | 2 +- .../view/default/lib/is_full_screen.html | 2 +- .../admin/view/default/lib/is_header.html | 2 +- .../view/default/lib/is_new_window_open.html | 2 +- .../default/order/module/is_comments.html | 2 + application/index/controller/Order.php | 3 + application/index/form/Order.php | 16 ++++-- .../view/default/lib/is_new_window_open.html | 2 +- .../default/order/module/is_comments.html | 4 +- .../view/default/public/goods_category.html | 2 +- application/lang/zh-cn.php | 55 ------------------ public/static/index/default/css/common.css | 11 ++-- 19 files changed, 91 insertions(+), 98 deletions(-) create mode 100644 application/admin/view/default/order/module/is_comments.html diff --git a/application/admin/controller/Customview.php b/application/admin/controller/Customview.php index de81bf574..9ec480955 100755 --- a/application/admin/controller/Customview.php +++ b/application/admin/controller/Customview.php @@ -133,13 +133,6 @@ class CustomView extends Common $data = empty($ret['data'][0]) ? [] : $ret['data'][0]; } $this->assign('data', $data); - - // 静态资源 - $this->assign('common_is_enable_list', lang('common_is_enable_list')); - $this->assign('common_is_header_list', lang('common_is_header_list')); - $this->assign('common_is_footer_list', lang('common_is_footer_list')); - $this->assign('common_is_full_screen_list', lang('common_is_full_screen_list')); - return $this->fetch(); } diff --git a/application/admin/controller/Link.php b/application/admin/controller/Link.php index 5e9b1b97f..1cc2321e2 100755 --- a/application/admin/controller/Link.php +++ b/application/admin/controller/Link.php @@ -52,13 +52,6 @@ class Link extends Common // 获取导航列表 $ret = LinkService::LinkList(['where'=>$this->form_where]); $this->assign('data_list', $ret['data']); - - // 是否新窗口打开 - $this->assign('common_is_new_window_open_list', lang('common_is_new_window_open_list')); - - // 是否启用 - $this->assign('common_is_enable_list', lang('common_is_enable_list')); - return $this->fetch(); } diff --git a/application/admin/controller/Navigation.php b/application/admin/controller/Navigation.php index 263a078d0..b1e81a45c 100755 --- a/application/admin/controller/Navigation.php +++ b/application/admin/controller/Navigation.php @@ -75,12 +75,6 @@ class Navigation extends Common // 自定义页面 $this->assign('customview_list', db('CustomView')->field(array('id', 'title'))->where(array('is_enable'=>1))->select()); - // 是否新窗口打开 - $this->assign('common_is_new_window_open_list', lang('common_is_new_window_open_list')); - - // 是否显示 - $this->assign('common_is_show_list', lang('common_is_show_list')); - $this->assign('nav_type', $this->nav_type); return $this->fetch(); } diff --git a/application/admin/form/Customview.php b/application/admin/form/Customview.php index 60249f696..deac7e87b 100644 --- a/application/admin/form/Customview.php +++ b/application/admin/form/Customview.php @@ -92,7 +92,7 @@ class Customview 'search_config' => [ 'form_type' => 'select', 'where_type' => 'in', - 'data' => lang('common_is_header_list'), + 'data' => lang('common_is_text_list'), 'data_key' => 'id', 'data_name' => 'name', 'is_multiple' => 1, @@ -107,7 +107,7 @@ class Customview 'search_config' => [ 'form_type' => 'select', 'where_type' => 'in', - 'data' => lang('common_is_footer_list'), + 'data' => lang('common_is_text_list'), 'data_key' => 'id', 'data_name' => 'name', 'is_multiple' => 1, @@ -122,7 +122,7 @@ class Customview 'search_config' => [ 'form_type' => 'select', 'where_type' => 'in', - 'data' => lang('common_is_full_screen_list'), + 'data' => lang('common_is_text_list'), 'data_key' => 'id', 'data_name' => 'name', 'is_multiple' => 1, diff --git a/application/admin/form/Link.php b/application/admin/form/Link.php index ed6ead086..948d9ddb4 100644 --- a/application/admin/form/Link.php +++ b/application/admin/form/Link.php @@ -113,7 +113,7 @@ class Link 'search_config' => [ 'form_type' => 'select', 'where_type' => 'in', - 'data' => lang('common_is_new_window_open_list'), + 'data' => lang('common_is_text_list'), 'data_key' => 'id', 'data_name' => 'name', 'is_multiple' => 1, diff --git a/application/admin/form/Navigation.php b/application/admin/form/Navigation.php index 35f1bcfa6..815aa16a1 100644 --- a/application/admin/form/Navigation.php +++ b/application/admin/form/Navigation.php @@ -110,7 +110,7 @@ class Navigation 'search_config' => [ 'form_type' => 'select', 'where_type' => 'in', - 'data' => lang('common_is_new_window_open_list'), + 'data' => lang('common_is_text_list'), 'data_key' => 'id', 'data_name' => 'name', 'is_multiple' => 1, diff --git a/application/admin/form/Order.php b/application/admin/form/Order.php index 67e1803ee..a9b63296f 100644 --- a/application/admin/form/Order.php +++ b/application/admin/form/Order.php @@ -313,6 +313,22 @@ class Order 'view_key' => 'order/module/aftersale', 'grid_size' => 'sm', ], + [ + 'label' => '用户是否评论', + 'view_type' => 'module', + 'view_key' => 'order/module/is_comments', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'form_name' => 'user_is_comments', + 'data' => lang('common_is_text_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'where_type_custom' => 'WhereTypyUserIsComments', + 'where_value_custom' => 'WhereValueUserIsComments', + 'is_multiple' => 1, + ], + ], [ 'label' => '确认时间', 'view_type' => 'field', @@ -388,6 +404,46 @@ class Order ]; } + /** + * 评论条件符号处理 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2020-06-08 + * @desc description + * @param [string] $form_key [表单数据key] + * @param [array] $params [输入参数] + */ + public function WhereTypyUserIsComments($form_key, $params = []) + { + if(isset($params[$form_key])) + { + // 条件值是 0,1 + // 解析成数组,都存在则返回null,则1 >, 0 = + $value = explode(',', urldecode($params[$form_key])); + if(count($value) == 1) + { + return in_array(1, $value) ? '>' : '='; + } + } + return null; + } + + /** + * 评论条件值处理 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2020-06-08 + * @desc description + * @param [string] $form_key [表单数据key] + * @param [array] $params [输入参数] + */ + public function WhereValueUserIsComments($value, $params = []) + { + return (count($value) == 2) ? null : 0; + } + /** * 订单仓库列表 * @author Devil diff --git a/application/admin/view/default/lib/is_footer.html b/application/admin/view/default/lib/is_footer.html index 62689d439..0eed5b089 100755 --- a/application/admin/view/default/lib/is_footer.html +++ b/application/admin/view/default/lib/is_footer.html @@ -2,7 +2,7 @@
- {{foreach :lang('common_is_footer_list') as $v}} + {{foreach :lang('common_is_text_list') as $v}} diff --git a/application/admin/view/default/lib/is_full_screen.html b/application/admin/view/default/lib/is_full_screen.html index 23f09c4a4..eb760022e 100755 --- a/application/admin/view/default/lib/is_full_screen.html +++ b/application/admin/view/default/lib/is_full_screen.html @@ -2,7 +2,7 @@
- {{foreach :lang('common_is_full_screen_list') as $v}} + {{foreach :lang('common_is_text_list') as $v}} diff --git a/application/admin/view/default/lib/is_header.html b/application/admin/view/default/lib/is_header.html index dcaddd65a..be7f2885d 100755 --- a/application/admin/view/default/lib/is_header.html +++ b/application/admin/view/default/lib/is_header.html @@ -2,7 +2,7 @@
- {{foreach :lang('common_is_header_list') as $v}} + {{foreach :lang('common_is_text_list') as $v}} diff --git a/application/admin/view/default/lib/is_new_window_open.html b/application/admin/view/default/lib/is_new_window_open.html index dbca28f09..6f4047f4d 100755 --- a/application/admin/view/default/lib/is_new_window_open.html +++ b/application/admin/view/default/lib/is_new_window_open.html @@ -2,7 +2,7 @@
- {{foreach :lang('common_is_new_window_open_list') as $v}} + {{foreach :lang('common_is_text_list') as $v}} diff --git a/application/admin/view/default/order/module/is_comments.html b/application/admin/view/default/order/module/is_comments.html new file mode 100644 index 000000000..73da05d85 --- /dev/null +++ b/application/admin/view/default/order/module/is_comments.html @@ -0,0 +1,2 @@ + +{{if !empty($module_data) and isset($module_data['user_is_comments']) and $module_data['user_is_comments'] gt 1}}已{{else /}}未{{/if}}评论 \ No newline at end of file diff --git a/application/index/controller/Order.php b/application/index/controller/Order.php index 192f82a9d..9ed83778d 100755 --- a/application/index/controller/Order.php +++ b/application/index/controller/Order.php @@ -139,6 +139,9 @@ class Order extends Common $this->assign('referer_url', empty($_SERVER['HTTP_REFERER']) ? MyUrl('index/order/index') : $_SERVER['HTTP_REFERER']); $this->assign('data', $data); + // 浏览器名称 + $this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('订单评论', 1)); + // 编辑器文件存放地址 $this->assign('editor_path_type', 'order_comments-'.$this->user['id'].'-'.$data['id']); return $this->fetch(); diff --git a/application/index/form/Order.php b/application/index/form/Order.php index 32554f0a8..e0eed4995 100644 --- a/application/index/form/Order.php +++ b/application/index/form/Order.php @@ -307,7 +307,7 @@ class Order ], ], [ - 'label' => '是否评价', + 'label' => '是否评论', 'view_type' => 'module', 'view_key' => 'order/module/is_comments', 'search_config' => [ @@ -398,7 +398,7 @@ class Order } /** - * 取货码条件处理 + * 评论条件符号处理 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 @@ -407,17 +407,23 @@ class Order * @param [string] $form_key [表单数据key] * @param [array] $params [输入参数] */ - public function WhereTypyUserIsComments($form_key, $params) + public function WhereTypyUserIsComments($form_key, $params = []) { if(isset($params[$form_key])) { - return ($params[$form_key] == 0) ? '=' : '>'; + // 条件值是 0,1 + // 解析成数组,都存在则返回null,则1 >, 0 = + $value = explode(',', urldecode($params[$form_key])); + if(count($value) == 1) + { + return in_array(1, $value) ? '>' : '='; + } } return null; } /** - * 取货码条件处理 + * 评论条件值处理 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 diff --git a/application/index/view/default/lib/is_new_window_open.html b/application/index/view/default/lib/is_new_window_open.html index 3a8b3f880..ed1ffded3 100755 --- a/application/index/view/default/lib/is_new_window_open.html +++ b/application/index/view/default/lib/is_new_window_open.html @@ -2,7 +2,7 @@
- + diff --git a/application/index/view/default/order/module/is_comments.html b/application/index/view/default/order/module/is_comments.html index 53a87908c..73da05d85 100644 --- a/application/index/view/default/order/module/is_comments.html +++ b/application/index/view/default/order/module/is_comments.html @@ -1,2 +1,2 @@ - -{{if !empty($module_data) and isset($module_data['user_is_comments']) and $module_data['user_is_comments'] gt 1}}已{{else /}}未{{/if}}评价 \ No newline at end of file + +{{if !empty($module_data) and isset($module_data['user_is_comments']) and $module_data['user_is_comments'] gt 1}}已{{else /}}未{{/if}}评论 \ No newline at end of file diff --git a/application/index/view/default/public/goods_category.html b/application/index/view/default/public/goods_category.html index bdcb01474..493d3914b 100755 --- a/application/index/view/default/public/goods_category.html +++ b/application/index/view/default/public/goods_category.html @@ -31,7 +31,7 @@