From 1af85b7a96c11928e97f4b667c86aec62fe5527d Mon Sep 17 00:00:00 2001 From: devil Date: Tue, 16 Jun 2020 23:27:12 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=8F=8B=E6=83=85=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E8=88=AA=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Article.php | 122 ++-- application/admin/controller/Customview.php | 115 ++-- application/admin/controller/Link.php | 10 +- application/admin/controller/Navigation.php | 15 +- application/admin/form/Article.php | 184 ++++++ application/admin/form/CustomView.php | 174 ++++++ application/admin/form/Goodscomments.php | 2 +- application/admin/form/Link.php | 154 +++++ application/admin/form/Navigation.php | 150 +++++ application/admin/form/Orderaftersale.php | 2 +- application/admin/form/Role.php | 2 - application/admin/form/User.php | 5 - .../admin/view/default/article/detail.html | 72 +++ .../admin/view/default/article/index.html | 277 +-------- .../view/default/article/module/info.html | 4 + .../view/default/article/module/operate.html | 13 + .../admin/view/default/customview/detail.html | 51 ++ .../admin/view/default/customview/index.html | 218 +------ .../view/default/customview/module/info.html | 4 + .../default/customview/module/operate.html | 13 + .../view/default/customview/save_info.html | 2 +- .../admin/view/default/goods/detail.html | 10 +- .../default/goodscomments/module/images.html | 15 +- .../admin/view/default/link/detail.html | 2 + .../admin/view/default/link/index.html | 144 ++--- .../admin/view/default/link/module/info.html | 9 + .../view/default/link/module/operate.html | 9 + .../admin/view/default/link/module/url.html | 4 + .../admin/view/default/navigation/index.html | 557 ++++++++---------- .../view/default/navigation/module/info.html | 9 + .../default/navigation/module/operate.html | 9 + .../orderaftersale/module/voucher.html | 15 +- .../view/default/public/module/form.html | 8 +- application/index/controller/Article.php | 49 +- .../index/view/default/article/index.html | 2 +- application/lang/zh-cn.php | 16 +- application/service/AdminRoleService.php | 28 +- application/service/ArticleService.php | 123 +--- application/service/CustomViewService.php | 132 +---- application/service/GoodsCommentsService.php | 76 --- application/service/LinkService.php | 41 +- application/service/NavigationService.php | 194 +++--- application/service/ResourcesService.php | 21 + config/shopxo.sql | 55 +- .../admin/default/css/goodscomments.css | 5 - .../admin/default/css/orderaftersale.css | 10 +- 46 files changed, 1644 insertions(+), 1488 deletions(-) create mode 100644 application/admin/form/Article.php create mode 100644 application/admin/form/CustomView.php create mode 100644 application/admin/form/Link.php create mode 100644 application/admin/form/Navigation.php create mode 100644 application/admin/view/default/article/detail.html create mode 100644 application/admin/view/default/article/module/info.html create mode 100644 application/admin/view/default/article/module/operate.html create mode 100644 application/admin/view/default/customview/detail.html create mode 100644 application/admin/view/default/customview/module/info.html create mode 100644 application/admin/view/default/customview/module/operate.html create mode 100644 application/admin/view/default/link/detail.html create mode 100644 application/admin/view/default/link/module/info.html create mode 100644 application/admin/view/default/link/module/operate.html create mode 100644 application/admin/view/default/link/module/url.html create mode 100644 application/admin/view/default/navigation/module/info.html create mode 100644 application/admin/view/default/navigation/module/operate.html diff --git a/application/admin/controller/Article.php b/application/admin/controller/Article.php index 21c5f440b..6464e75be 100755 --- a/application/admin/controller/Article.php +++ b/application/admin/controller/Article.php @@ -50,54 +50,64 @@ class Article extends Common */ public function Index() { - // 参数 - $params = input(); + // 总数 + $total = ArticleService::ArticleTotal($this->form_where); // 分页 - $number = MyC('admin_page_number', 10, true); - - // 条件 - $where = ArticleService::ArticleListWhere($params); - - // 获取总数 - $total = ArticleService::ArticleTotal($where); - - // 分页 - $page_params = array( - 'number' => $number, - 'total' => $total, - 'where' => $params, - 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => MyUrl('admin/article/index'), - ); + $page_params = [ + 'number' => $this->page_size, + 'total' => $total, + 'where' => $this->data_request, + 'page' => $this->page, + 'url' => MyUrl('admin/article/index'), + ]; $page = new \base\Page($page_params); - $this->assign('page_html', $page->GetPageHtml()); // 获取列表 - $data_params = array( - 'm' => $page->GetPageStarNumber(), - 'n' => $number, - 'where' => $where, - 'field' => 'a.*', - ); - $data = ArticleService::ArticleList($data_params); - $this->assign('data_list', $data['data']); + $data_params = [ + 'where' => $this->form_where, + 'm' => $page->GetPageStarNumber(), + 'n' => $this->page_size, + ]; + $ret = ArticleService::ArticleList($data_params); - // 是否启用 - $this->assign('common_is_enable_list', lang('common_is_enable_list')); - - // 是否 - $this->assign('common_is_text_list', lang('common_is_text_list')); - - // 文章分类 - $article_category = ArticleService::ArticleCategoryList(['field'=>'id,name']); - $this->assign('article_category_list', $article_category['data']); - - // 参数 - $this->assign('params', $params); + // 基础参数赋值 + $this->assign('params', $this->data_request); + $this->assign('page_html', $page->GetPageHtml()); + $this->assign('data_list', $ret['data']); return $this->fetch(); } + /** + * 详情 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @datetime 2019-08-05T08:21:54+0800 + */ + public function Detail() + { + if(!empty($this->data_request['id'])) + { + // 条件 + $where = [ + ['id', '=', intval($this->data_request['id'])], + ]; + + // 获取列表 + $data_params = [ + 'm' => 0, + 'n' => 1, + 'where' => $where, + 'is_category' => 1, + ]; + $ret = ArticleService::ArticleList($data_params); + $data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0]; + $this->assign('data', $data); + } + return $this->fetch(); + } + /** * [SaveInfo 文章添加/编辑页面] * @author Devil @@ -108,7 +118,7 @@ class Article extends Common public function SaveInfo() { // 参数 - $params = input(); + $params = $this->data_request; // 数据 $data = []; @@ -118,8 +128,7 @@ class Article extends Common $data_params = array( 'm' => 0, 'n' => 1, - 'where' => ['a.id'=>intval($params['id'])], - 'field' => 'a.*', + 'where' => ['id'=>intval($params['id'])], ); $ret = ArticleService::ArticleList($data_params); $data = empty($ret['data'][0]) ? [] : $ret['data'][0]; @@ -168,7 +177,7 @@ class Article extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; return ArticleService::ArticleSave($params); } @@ -188,7 +197,7 @@ class Article extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; $params['admin'] = $this->admin; return ArticleService::ArticleDelete($params); } @@ -209,31 +218,8 @@ class Article extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; $params['admin'] = $this->admin; - $params['field'] = 'is_enable'; - return ArticleService::ArticleStatusUpdate($params); - } - - /** - * [StatusHomeRecommended 是否首页推荐状态更新] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2017-01-12T22:23:06+0800 - */ - public function StatusHomeRecommended() - { - // 是否ajax请求 - if(!IS_AJAX) - { - return $this->error('非法访问'); - } - - // 开始处理 - $params = input(); - $params['admin'] = $this->admin; - $params['field'] = 'is_home_recommended'; return ArticleService::ArticleStatusUpdate($params); } } diff --git a/application/admin/controller/Customview.php b/application/admin/controller/Customview.php index 532783a25..de81bf574 100755 --- a/application/admin/controller/Customview.php +++ b/application/admin/controller/Customview.php @@ -41,7 +41,7 @@ class CustomView extends Common } /** - * [Index 文章列表] + * [Index 列表] * @author Devil * @blog http://gong.gg/ * @version 0.0.1 @@ -49,56 +49,63 @@ class CustomView extends Common */ public function Index() { - // 参数 - $params = input(); + // 总数 + $total = CustomViewService::CustomViewTotal($this->form_where); // 分页 - $number = MyC('admin_page_number', 10, true); - - // 条件 - $where = CustomViewService::CustomViewListWhere($params); - - // 获取总数 - $total = CustomViewService::CustomViewTotal($where); - - // 分页 - $page_params = array( - 'number' => $number, - 'total' => $total, - 'where' => $params, - 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => MyUrl('admin/customview/index'), - ); + $page_params = [ + 'number' => $this->page_size, + 'total' => $total, + 'where' => $this->data_request, + 'page' => $this->page, + 'url' => MyUrl('admin/customview/index'), + ]; $page = new \base\Page($page_params); + + // 获取数据列表 + $data_params = [ + 'where' => $this->form_where, + 'm' => $page->GetPageStarNumber(), + 'n' => $this->page_size, + ]; + $ret = CustomViewService::CustomViewList($data_params); + + // 基础参数赋值 + $this->assign('params', $this->data_request); $this->assign('page_html', $page->GetPageHtml()); - - // 获取列表 - $data_params = array( - 'm' => $page->GetPageStarNumber(), - 'n' => $number, - 'where' => $where, - 'field' => '*', - ); - $data = CustomViewService::CustomViewList($data_params); - $this->assign('data_list', $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')); - - // 参数 - $this->assign('params', $params); + $this->assign('data_list', $ret['data']); return $this->fetch(); } + /** + * 详情 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @datetime 2019-08-05T08:21:54+0800 + */ + public function Detail() + { + if(!empty($this->data_request['id'])) + { + // 条件 + $where = [ + ['id', '=', intval($this->data_request['id'])], + ]; + + // 获取列表 + $data_params = [ + 'm' => 0, + 'n' => 1, + 'where' => $where, + ]; + $ret = CustomViewService::CustomViewList($data_params); + $data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0]; + $this->assign('data', $data); + } + return $this->fetch(); + } + /** * [SaveInfo 添加/编辑页面] * @author Devil @@ -109,34 +116,28 @@ class CustomView extends Common public function SaveInfo() { // 参数 - $params = input(); + $params = $this->data_request; // 数据 $data = []; if(!empty($params['id'])) { // 获取列表 - $data_params = array( + $data_params = [ 'm' => 0, 'n' => 1, 'where' => ['id'=>intval($params['id'])], 'field' => '*', - ); + ]; $ret = CustomViewService::CustomViewList($data_params); $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(); @@ -158,7 +159,7 @@ class CustomView extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; return CustomViewService::CustomViewSave($params); } @@ -178,7 +179,7 @@ class CustomView extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; $params['user_type'] = 'admin'; return CustomViewService::CustomViewDelete($params); } @@ -199,7 +200,7 @@ class CustomView extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; return CustomViewService::CustomViewStatusUpdate($params); } } diff --git a/application/admin/controller/Link.php b/application/admin/controller/Link.php index 83a469b20..2c4228168 100755 --- a/application/admin/controller/Link.php +++ b/application/admin/controller/Link.php @@ -50,8 +50,8 @@ class Link extends Common public function Index() { // 获取导航列表 - $data = LinkService::LinkList(); - $this->assign('data_list', $data['data']); + $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')); @@ -78,7 +78,7 @@ class Link extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; return LinkService::LinkSave($params); } @@ -98,7 +98,7 @@ class Link extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; $params['user_type'] = 'admin'; return LinkService::LinkDelete($params); } @@ -119,7 +119,7 @@ class Link extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; return LinkService::LinkStatusUpdate($params); } } diff --git a/application/admin/controller/Navigation.php b/application/admin/controller/Navigation.php index 424f7beb1..263a078d0 100755 --- a/application/admin/controller/Navigation.php +++ b/application/admin/controller/Navigation.php @@ -44,7 +44,7 @@ class Navigation extends Common $this->IsPower(); // 导航类型 - $this->nav_type = input('nav_type', 'header'); + $this->nav_type = empty($this->data_request['nav_type']) ? 'header' : $this->data_request['nav_type']; } /** @@ -57,7 +57,10 @@ class Navigation extends Common public function Index() { // 获取导航列表 - $this->assign('data_list', NavigationService::NavList(['nav_type'=>$this->nav_type])); + $where = $this->form_where; + $where[] = ['nav_type', '=', $this->nav_type]; + $ret = NavigationService::NavList(['where'=>$where]); + $this->assign('data_list', $ret['data']); // 一级分类 $this->assign('nav_header_pid_list', NavigationService::LevelOneNav(['nav_type'=>$this->nav_type])); @@ -98,13 +101,11 @@ class Navigation extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; $params['nav_type'] = $this->nav_type; return NavigationService::NavSave($params); } - - /** * [Delete 删除] * @author Devil @@ -121,7 +122,7 @@ class Navigation extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; return NavigationService::NavDelete($params); } @@ -141,7 +142,7 @@ class Navigation extends Common } // 开始处理 - $params = input(); + $params = $this->data_request; return NavigationService::NavStatusUpdate($params); } } diff --git a/application/admin/form/Article.php b/application/admin/form/Article.php new file mode 100644 index 000000000..5ce833bd3 --- /dev/null +++ b/application/admin/form/Article.php @@ -0,0 +1,184 @@ + [ + 'key_field' => 'id', + 'status_field' => 'is_enable', + 'is_search' => 1, + 'search_url' => MyUrl('admin/article/index'), + 'is_delete' => 1, + 'delete_url' => MyUrl('admin/article/delete'), + 'delete_key' => 'ids', + 'detail_title' => '基础信息', + ], + // 表单配置 + 'form' => [ + [ + 'view_type' => 'checkbox', + 'is_checked' => 0, + 'checked_text' => '反选', + 'not_checked_text' => '全选', + 'align' => 'center', + 'width' => 80, + ], + [ + 'label' => '标题', + 'view_type' => 'module', + 'view_key' => 'article/module/info', + 'grid_size' => 'sm', + 'search_config' => [ + 'form_type' => 'input', + 'form_name' => 'title', + 'where_type' => 'like', + ], + ], + [ + 'label' => '跳转url地址', + 'view_type' => 'field', + 'view_key' => 'jump_url', + 'grid_size' => 'sm', + 'search_config' => [ + 'form_type' => 'input', + 'where_type' => 'like', + ], + ], + [ + 'label' => '分类', + 'view_type' => 'field', + 'view_key' => 'article_category_name', + 'search_config' => [ + 'form_type' => 'select', + 'form_name' => 'article_category_id', + 'where_type' => 'in', + 'data' => $this->ArticleCategoryList(), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '是否启用', + 'view_type' => 'status', + 'view_key' => 'is_enable', + 'post_url' => MyUrl('admin/article/statusupdate'), + 'is_form_su' => 1, + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_enable_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '首页推荐', + 'view_type' => 'status', + 'view_key' => 'is_home_recommended', + 'post_url' => MyUrl('admin/article/statusupdate'), + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_text_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '图片数量', + 'view_type' => 'field', + 'view_key' => 'images_count', + 'search_config' => [ + 'form_type' => 'section', + ], + ], + [ + 'label' => '访问次数', + 'view_type' => 'field', + 'view_key' => 'access_count', + 'search_config' => [ + 'form_type' => 'section', + ], + ], + [ + 'label' => '创建时间', + 'view_type' => 'field', + 'view_key' => 'add_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '更新时间', + 'view_type' => 'field', + 'view_key' => 'upd_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '操作', + 'view_type' => 'operate', + 'view_key' => 'article/module/operate', + 'align' => 'center', + 'fixed' => 'right', + ], + ], + ]; + } + + /** + * 获取文章分类列表 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2020-06-11 + * @desc description + */ + public function ArticleCategoryList() + { + $res = ArticleService::ArticleCategoryList(['field'=>'id,name']); + return $res['data']; + } +} +?> \ No newline at end of file diff --git a/application/admin/form/CustomView.php b/application/admin/form/CustomView.php new file mode 100644 index 000000000..a00c5e2b7 --- /dev/null +++ b/application/admin/form/CustomView.php @@ -0,0 +1,174 @@ + [ + 'key_field' => 'id', + 'status_field' => 'is_enable', + 'is_search' => 1, + 'search_url' => MyUrl('admin/customview/index'), + 'is_delete' => 1, + 'delete_url' => MyUrl('admin/customview/delete'), + 'delete_key' => 'ids', + 'detail_title' => '基础信息', + ], + // 表单配置 + 'form' => [ + [ + 'view_type' => 'checkbox', + 'is_checked' => 0, + 'checked_text' => '反选', + 'not_checked_text' => '全选', + 'align' => 'center', + 'width' => 80, + ], + [ + 'label' => '标题', + 'view_type' => 'module', + 'view_key' => 'customview/module/info', + 'grid_size' => 'lg', + 'search_config' => [ + 'form_type' => 'input', + 'form_name' => 'title', + 'where_type' => 'like', + ], + ], + [ + 'label' => '是否启用', + 'view_type' => 'status', + 'view_key' => 'is_enable', + 'post_url' => MyUrl('admin/customview/statusupdate'), + 'is_form_su' => 1, + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_enable_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '是否头部', + 'view_type' => 'status', + 'view_key' => 'is_header', + 'post_url' => MyUrl('admin/customview/statusupdate'), + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_header_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '是否尾部', + 'view_type' => 'status', + 'view_key' => 'is_footer', + 'post_url' => MyUrl('admin/customview/statusupdate'), + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_footer_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '是否满屏', + 'view_type' => 'status', + 'view_key' => 'is_full_screen', + 'post_url' => MyUrl('admin/customview/statusupdate'), + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_full_screen_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '图片数量', + 'view_type' => 'field', + 'view_key' => 'images_count', + 'search_config' => [ + 'form_type' => 'section', + ], + ], + [ + 'label' => '访问次数', + 'view_type' => 'field', + 'view_key' => 'access_count', + 'search_config' => [ + 'form_type' => 'section', + ], + ], + [ + 'label' => '创建时间', + 'view_type' => 'field', + 'view_key' => 'add_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '更新时间', + 'view_type' => 'field', + 'view_key' => 'upd_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '操作', + 'view_type' => 'operate', + 'view_key' => 'customview/module/operate', + 'align' => 'center', + 'fixed' => 'right', + ], + ], + ]; + } +} +?> \ No newline at end of file diff --git a/application/admin/form/Goodscomments.php b/application/admin/form/Goodscomments.php index 67f890bc8..e934385f7 100644 --- a/application/admin/form/Goodscomments.php +++ b/application/admin/form/Goodscomments.php @@ -115,7 +115,7 @@ class Goodscomments 'label' => '评论图片', 'view_type' => 'module', 'view_key' => 'goodscomments/module/images', - 'width' => 140, + 'is_list' => 0, ], [ 'label' => '评分', diff --git a/application/admin/form/Link.php b/application/admin/form/Link.php new file mode 100644 index 000000000..ed6ead086 --- /dev/null +++ b/application/admin/form/Link.php @@ -0,0 +1,154 @@ + [ + 'key_field' => 'id', + 'status_field' => 'is_enable', + 'is_search' => 1, + 'search_url' => MyUrl('admin/link/index'), + 'is_delete' => 1, + 'delete_url' => MyUrl('admin/link/delete'), + 'delete_key' => 'ids', + ], + // 表单配置 + 'form' => [ + [ + 'view_type' => 'checkbox', + 'is_checked' => 0, + 'checked_text' => '反选', + 'not_checked_text' => '全选', + 'align' => 'center', + 'width' => 80, + ], + [ + 'label' => '名称', + 'view_type' => 'module', + 'view_key' => 'link/module/info', + 'grid_size' => 'sm', + 'search_config' => [ + 'form_type' => 'input', + 'form_name' => 'name', + 'where_type' => 'like', + ], + ], + [ + 'label' => 'url地址', + 'view_type' => 'module', + 'view_key' => 'link/module/url', + 'grid_size' => 'lg', + 'search_config' => [ + 'form_type' => 'input', + 'form_name' => 'url', + 'where_type' => 'like', + ], + ], + [ + 'label' => '描述', + 'view_type' => 'field', + 'view_key' => 'describe', + 'search_config' => [ + 'form_type' => 'input', + 'where_type' => 'like', + ], + ], + [ + 'label' => '是否启用', + 'view_type' => 'status', + 'view_key' => 'is_enable', + 'post_url' => MyUrl('admin/link/statusupdate'), + 'is_form_su' => 1, + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_enable_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '是否新窗口打开', + 'view_type' => 'status', + 'view_key' => 'is_new_window_open', + 'post_url' => MyUrl('admin/link/statusupdate'), + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_new_window_open_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '排序', + 'view_type' => 'field', + 'view_key' => 'sort', + ], + [ + 'label' => '创建时间', + 'view_type' => 'field', + 'view_key' => 'add_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '更新时间', + 'view_type' => 'field', + 'view_key' => 'upd_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '操作', + 'view_type' => 'operate', + 'view_key' => 'link/module/operate', + 'align' => 'center', + 'fixed' => 'right', + ], + ], + ]; + } +} +?> \ No newline at end of file diff --git a/application/admin/form/Navigation.php b/application/admin/form/Navigation.php new file mode 100644 index 000000000..24d6da77b --- /dev/null +++ b/application/admin/form/Navigation.php @@ -0,0 +1,150 @@ + [ + 'key_field' => 'id', + 'status_field' => 'is_show', + 'is_search' => 1, + 'search_url' => MyUrl('admin/navigation/index', ['nav_type'=>$nav_type]), + 'is_delete' => 1, + 'delete_url' => MyUrl('admin/navigation/delete'), + 'delete_key' => 'ids', + ], + // 表单配置 + 'form' => [ + [ + 'view_type' => 'checkbox', + 'is_checked' => 0, + 'checked_text' => '反选', + 'not_checked_text' => '全选', + 'align' => 'center', + 'width' => 80, + ], + [ + 'label' => '导航名称', + 'view_type' => 'module', + 'view_key' => 'navigation/module/info', + 'grid_size' => 'sm', + 'search_config' => [ + 'form_type' => 'input', + 'form_name' => 'name', + 'where_type' => 'like', + ], + ], + [ + 'label' => '导航数据类型', + 'view_type' => 'field', + 'view_key' => 'data_type_text', + 'search_config' => [ + 'form_type' => 'select', + 'form_name' => 'data_type', + 'where_type' => 'in', + 'data' => lang('common_nav_type_list'), + 'data_key' => 'value', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '状态', + 'view_type' => 'status', + 'view_key' => 'is_show', + 'post_url' => MyUrl('admin/navigation/statusupdate'), + 'is_form_su' => 1, + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_show_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '新窗口打开', + 'view_type' => 'status', + 'view_key' => 'is_new_window_open', + 'post_url' => MyUrl('admin/navigation/statusupdate'), + 'align' => 'center', + 'search_config' => [ + 'form_type' => 'select', + 'where_type' => 'in', + 'data' => lang('common_is_new_window_open_list'), + 'data_key' => 'id', + 'data_name' => 'name', + 'is_multiple' => 1, + ], + ], + [ + 'label' => '排序', + 'view_type' => 'field', + 'view_key' => 'sort', + ], + [ + 'label' => '创建时间', + 'view_type' => 'field', + 'view_key' => 'add_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '更新时间', + 'view_type' => 'field', + 'view_key' => 'upd_time', + 'search_config' => [ + 'form_type' => 'datetime', + ], + ], + [ + 'label' => '操作', + 'view_type' => 'operate', + 'view_key' => 'navigation/module/operate', + 'align' => 'center', + 'fixed' => 'right', + ], + ], + ]; + } +} +?> \ No newline at end of file diff --git a/application/admin/form/Orderaftersale.php b/application/admin/form/Orderaftersale.php index e86c4f04b..9e38ed32e 100644 --- a/application/admin/form/Orderaftersale.php +++ b/application/admin/form/Orderaftersale.php @@ -167,7 +167,7 @@ class Orderaftersale 'label' => '凭证', 'view_type' => 'module', 'view_key' => 'orderaftersale/module/voucher', - 'width' => 140, + 'is_list' => 0, ], [ 'label' => '快递公司', diff --git a/application/admin/form/Role.php b/application/admin/form/Role.php index 7bf82a722..6d4ca69e3 100644 --- a/application/admin/form/Role.php +++ b/application/admin/form/Role.php @@ -10,8 +10,6 @@ // +---------------------------------------------------------------------- namespace app\admin\form; -use app\service\AdminService; - /** * 角色管理动态表格 * @author Devil diff --git a/application/admin/form/User.php b/application/admin/form/User.php index 942bdf9d6..9be8c2058 100644 --- a/application/admin/form/User.php +++ b/application/admin/form/User.php @@ -10,11 +10,6 @@ // +---------------------------------------------------------------------- namespace app\admin\form; -use think\Db; -use app\service\GoodsService; -use app\service\RegionService; -use app\service\BrandService; - /** * 用户动态表格 * @author Devil diff --git a/application/admin/view/default/article/detail.html b/application/admin/view/default/article/detail.html new file mode 100644 index 000000000..efce29768 --- /dev/null +++ b/application/admin/view/default/article/detail.html @@ -0,0 +1,72 @@ + +{{extend name="public/module/detail" /}} + + +{{block name="detail_data"}} + + {__block__} + + +
+
详情内容
+
+ {{if !empty($data['content'])}} +
+ {{$data.content|raw}} +
+ {{else /}} +
没有相关数据
+ {{/if}} +
+
+ + +
+
详情图片
+
+ {{if !empty($data['images'])}} +
+
    + {{foreach $data.images as $ik=>$iv}} +
  • + + + +
    +
    + {{$ik+1}} + /{{:count($data['images'])}} + {{$iv}} +
    +
    +
  • + {{/foreach}} +
+
+ {{else /}} +
没有相关数据
+ {{/if}} +
+
+ + +
+
SEO信息
+
+ {{if !empty($data)}} +
+
SEO标题
+
{{$data.seo_title}}
+ +
SEO关键字
+
{{$data.seo_keywords}}
+ +
SEO描述
+
{{$data.seo_desc}}
+
+ {{else /}} +
没有相关数据
+ {{/if}} +
+
+{{/block}} \ No newline at end of file diff --git a/application/admin/view/default/article/index.html b/application/admin/view/default/article/index.html index 688da15c1..49c2f5ef8 100755 --- a/application/admin/view/default/article/index.html +++ b/application/admin/view/default/article/index.html @@ -1,270 +1,9 @@ -{{include file="public/header" /}} + +{{extend name="public/module/form" /}} - -
-
- - - - - -
- 新增 - - - {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} -
- plugins_view_admin_article_top_operate -
- {{/if}} - {{php}} - $hook_name = 'plugins_view_admin_article_top_operate'; - $hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true]); - if(!empty($hook_data) && is_array($hook_data)) - { - foreach($hook_data as $hook) - { - if(is_string($hook) || is_int($hook)) - { - echo htmlspecialchars_decode($hook); - } - } - } - {{/php}} -
- - - -
- - - - - - - - - - - - - - {{if !empty($data_list)}} - {{foreach $data_list as $v}} - - - - - - - - - - {{/foreach}} - {{/if}} - -
标题文章分类访问热度是否启用首页推荐更多操作
- {{$v.title}} - {{$v.article_category_name}}{{$v.access_count}} - - - - -

- - 查看更多 -

-
-
-
-

详情内容

- × -
-
-
-
标题
-
{{$v.title}}
- -
文章分类
-
{{$v.article_category_name}}
- -
访问次数
-
{{$v.access_count}}
- -
是否启用
-
{{$v.is_enable_text}}
- -
内容
-
-
{{$v.content|raw}}
-
- -
SEO标题
-
{{$v.seo_title}}
- -
SEO关键字
-
{{$v.seo_keywords}}
- -
SEO描述
-
{{$v.seo_desc}}
- -
创建时间
-
{{$v.add_time_time}}
- -
更新时间
-
{{$v.upd_time_time}}
-
-
-
-
-
-
- - - 编辑 - - - - - {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} -
- plugins_view_admin_article_list_operate -
- {{/if}} - {{php}} - $hook_name = 'plugins_view_admin_article_list_operate'; - $hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true, 'id'=>$v['id'], 'data'=>$v]); - if(!empty($hook_data) && is_array($hook_data)) - { - foreach($hook_data as $hook) - { - if(is_string($hook) || is_int($hook)) - { - echo htmlspecialchars_decode($hook); - } - } - } - {{/php}} -
-
- {{if empty($data_list)}} -
没有相关数据
- {{/if}} -
- - - -
- - {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} -
- plugins_view_admin_article_bottom_operate -
- {{/if}} - {{php}} - $hook_name = 'plugins_view_admin_article_bottom_operate'; - $hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true]); - if(!empty($hook_data) && is_array($hook_data)) - { - foreach($hook_data as $hook) - { - if(is_string($hook) || is_int($hook)) - { - echo htmlspecialchars_decode($hook); - } - } - } - {{/php}} -
- - - - {{if !empty($data_list)}} - {{$page_html|raw}} - {{/if}} - -
-
- - - -{{include file="public/footer" /}} - \ No newline at end of file + +{{block name="form_operate_top"}} + 新增 + + {__block__} +{{/block}} \ No newline at end of file diff --git a/application/admin/view/default/article/module/info.html b/application/admin/view/default/article/module/info.html new file mode 100644 index 000000000..35bcb7a29 --- /dev/null +++ b/application/admin/view/default/article/module/info.html @@ -0,0 +1,4 @@ + +{{if !empty($module_data)}} + {{$module_data.title}} +{{/if}} \ No newline at end of file diff --git a/application/admin/view/default/article/module/operate.html b/application/admin/view/default/article/module/operate.html new file mode 100644 index 000000000..5c01502db --- /dev/null +++ b/application/admin/view/default/article/module/operate.html @@ -0,0 +1,13 @@ + + + + + 编辑 + + \ No newline at end of file diff --git a/application/admin/view/default/customview/detail.html b/application/admin/view/default/customview/detail.html new file mode 100644 index 000000000..73d167799 --- /dev/null +++ b/application/admin/view/default/customview/detail.html @@ -0,0 +1,51 @@ + +{{extend name="public/module/detail" /}} + + +{{block name="detail_data"}} + + {__block__} + + +
+
详情内容
+
+ {{if !empty($data['content'])}} +
+ {{$data.content|raw}} +
+ {{else /}} +
没有相关数据
+ {{/if}} +
+
+ + +
+
详情图片
+
+ {{if !empty($data['images'])}} +
+
    + {{foreach $data.images as $ik=>$iv}} +
  • + + + +
    +
    + {{$ik+1}} + /{{:count($data['images'])}} + {{$iv}} +
    +
    +
  • + {{/foreach}} +
+
+ {{else /}} +
没有相关数据
+ {{/if}} +
+
+{{/block}} \ No newline at end of file diff --git a/application/admin/view/default/customview/index.html b/application/admin/view/default/customview/index.html index ec04a7d6f..315cc843b 100755 --- a/application/admin/view/default/customview/index.html +++ b/application/admin/view/default/customview/index.html @@ -1,211 +1,9 @@ -{{include file="public/header" /}} + +{{extend name="public/module/form" /}} - -
-
- - - - - -
- 新增 -
- - - -
- - - - - - - - - - - - - - - {{if !empty($data_list)}} - {{foreach $data_list as $v}} - - - - - - - - - - - {{/foreach}} - {{/if}} - -
标题是否启用是否含头部是否含尾部是否满屏访问次数更多操作
- {{$v.title}} - - - - - - - - - {{$v.access_count}} -

- - 查看更多 -

-
-
-
-

详情内容

- × -
-
-
-
标题
-
{{$v.title}}
- -
是否启用
-
{{$v.is_enable_text}}
- -
是否含头部
-
{{:lang('common_is_header_list')[$v['is_header']]['name']}}
- -
是否含尾部
-
{{:lang('common_is_footer_list')[$v['is_footer']]['name']}}
- -
是否满屏
-
{{:lang('common_is_full_screen_list')[$v['is_full_screen']]['name']}}
- -
访问次数
-
{{$v.access_count}}
- -
内容
-
-
{{$v.content|raw}}
-
- -
创建时间
-
{{$v.add_time_time}}
- -
更新时间
-
{{$v.upd_time_time}}
-
-
-
-
-
-
- - - 编辑 - - -
-
- {{if empty($data_list)}} -
没有相关数据
- {{/if}} -
- - - - {{if !empty($data_list)}} - {{$page_html|raw}} - {{/if}} - -
-
- - - -{{include file="public/footer" /}} - \ No newline at end of file + +{{block name="form_operate_top"}} + 新增 + + {__block__} +{{/block}} \ No newline at end of file diff --git a/application/admin/view/default/customview/module/info.html b/application/admin/view/default/customview/module/info.html new file mode 100644 index 000000000..da68aa439 --- /dev/null +++ b/application/admin/view/default/customview/module/info.html @@ -0,0 +1,4 @@ + +{{if !empty($module_data)}} + {{$module_data.title}} +{{/if}} \ No newline at end of file diff --git a/application/admin/view/default/customview/module/operate.html b/application/admin/view/default/customview/module/operate.html new file mode 100644 index 000000000..9d0038b09 --- /dev/null +++ b/application/admin/view/default/customview/module/operate.html @@ -0,0 +1,13 @@ + + + + + 编辑 + + \ No newline at end of file diff --git a/application/admin/view/default/customview/save_info.html b/application/admin/view/default/customview/save_info.html index ab9b01f13..99f394d20 100755 --- a/application/admin/view/default/customview/save_info.html +++ b/application/admin/view/default/customview/save_info.html @@ -41,7 +41,7 @@
- +
diff --git a/application/admin/view/default/goods/detail.html b/application/admin/view/default/goods/detail.html index 0ee3171ad..c80aaec7e 100644 --- a/application/admin/view/default/goods/detail.html +++ b/application/admin/view/default/goods/detail.html @@ -10,9 +10,13 @@
电脑端详情
-
- {{$data.content_web|raw}} -
+ {{if !empty($data['content_web'])}} +
+ {{$data.content_web|raw}} +
+ {{else /}} +
没有相关数据
+ {{/if}}
diff --git a/application/admin/view/default/goodscomments/module/images.html b/application/admin/view/default/goodscomments/module/images.html index 2ca6f7ee7..ea284eeaf 100644 --- a/application/admin/view/default/goodscomments/module/images.html +++ b/application/admin/view/default/goodscomments/module/images.html @@ -1,12 +1,19 @@ {{if !empty($module_data) and !empty($module_data['images'])}} -
+
    - {{foreach $module_data.images as $img}} + {{foreach $module_data.images as $ik=>$iv}}
  • - - + + +
    +
    + {{$ik+1}} + /{{:count($module_data['images'])}} + {{$iv}} +
    +
  • {{/foreach}}
diff --git a/application/admin/view/default/link/detail.html b/application/admin/view/default/link/detail.html new file mode 100644 index 000000000..06eeee457 --- /dev/null +++ b/application/admin/view/default/link/detail.html @@ -0,0 +1,2 @@ + +{{extend name="public/module/detail" /}} \ No newline at end of file diff --git a/application/admin/view/default/link/index.html b/application/admin/view/default/link/index.html index 5eb5b9552..6ea7312f5 100755 --- a/application/admin/view/default/link/index.html +++ b/application/admin/view/default/link/index.html @@ -1,103 +1,51 @@ -{{include file="public/header" /}} + +{{extend name="public/module/form" /}} - -
-
- -
- -
- + +{{block name="form_operate_top"}} + + + {__block__} +{{/block}} - -
- - - - - - - - - - - {{if !empty($data_list)}} - {{foreach $data_list as $v}} - - - - - - - {{/foreach}} - {{/if}} - -
名称描述状态操作
{{$v.name}} - - - - {{$v.describe}} - - -
- - -
-
- {{if empty($data_list)}} -
没有相关数据
- {{/if}} -
- - - -
-
-
-

友情链接添加

- × -
-
- -
-
- - -
-
- - -
-
- - -
- {{include file="lib/is_new_window_open" /}} - {{include file="lib/enable" /}} -
- - -
-
- - -
-
- -
+ +{{block name="form_extend"}} + +
+
+
+

友情链接添加

+ × +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+ {{include file="lib/is_new_window_open" /}} + {{include file="lib/enable" /}} +
+ + +
+
+ + +
+
+
-
-
- - - -{{include file="public/footer" /}} - \ No newline at end of file + +{{/block}} \ No newline at end of file diff --git a/application/admin/view/default/link/module/info.html b/application/admin/view/default/link/module/info.html new file mode 100644 index 000000000..3bc6f7133 --- /dev/null +++ b/application/admin/view/default/link/module/info.html @@ -0,0 +1,9 @@ + +{{if !empty($module_data)}} +
+ {{$module_data.name}} + + + +
+{{/if}} \ No newline at end of file diff --git a/application/admin/view/default/link/module/operate.html b/application/admin/view/default/link/module/operate.html new file mode 100644 index 000000000..697514734 --- /dev/null +++ b/application/admin/view/default/link/module/operate.html @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/application/admin/view/default/link/module/url.html b/application/admin/view/default/link/module/url.html new file mode 100644 index 000000000..320f56e7c --- /dev/null +++ b/application/admin/view/default/link/module/url.html @@ -0,0 +1,4 @@ + +{{if !empty($module_data['url'])}} + {{$module_data.url}} +{{/if}} \ No newline at end of file diff --git a/application/admin/view/default/navigation/index.html b/application/admin/view/default/navigation/index.html index 80b39de52..9c0266cc5 100755 --- a/application/admin/view/default/navigation/index.html +++ b/application/admin/view/default/navigation/index.html @@ -1,314 +1,251 @@ -{{include file="public/header" /}} + +{{block name="form_navigation"}} + {{include file="navigation/nav" /}} +{{/block}} + - -
-
- - {{include file="navigation/nav" /}} - + +{{extend name="public/module/form" /}} - -
- - - - -
- - - -
- - - - - - - - - - - {{if !empty($data_list)}} - {{foreach $data_list as $v}} - - - - - - - {{if !empty($v['items'])}} - {{foreach $v.items as $vs}} - - - - - - - {{/foreach}} - {{/if}} - {{/foreach}} - {{/if}} - -
导航名称导航数据类型状态操作
{{$v.name}} - - - - {{:lang('common_nav_type_list')[$v['data_type']]}} - - -
- - -
-
{{$vs.name}} - - - - {{:lang('common_nav_type_list')[$vs['data_type']]}} - - -
- - -
-
- {{if empty($data_list)}} -
没有相关数据
- {{/if}} -
- - - - - - - -
-
-
-

文章导航添加

- × -
-
- -
-
- - -
-
- - -
-
- - -
-
- - -
- {{include file="lib/is_show" /}} - {{include file="lib/is_new_window_open" /}} -
- - - - -
-
- -
-
-
- - - - - - - - - + +{{block name="form_operate_top"}} +
+ +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
-
- - -{{include file="public/footer" /}} - \ No newline at end of file + + {__block__} +{{/block}} + + +{{block name="form_extend"}} + + + + + +
+
+
+

文章导航添加

+ × +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ {{include file="lib/is_show" /}} + {{include file="lib/is_new_window_open" /}} +
+ + + + +
+
+ +
+
+
+ + + + + + + + + +{{/block}} \ No newline at end of file diff --git a/application/admin/view/default/navigation/module/info.html b/application/admin/view/default/navigation/module/info.html new file mode 100644 index 000000000..f706181f7 --- /dev/null +++ b/application/admin/view/default/navigation/module/info.html @@ -0,0 +1,9 @@ + +{{if !empty($module_data)}} +
+ {{$module_data.name}} + + + +
+{{/if}} \ No newline at end of file diff --git a/application/admin/view/default/navigation/module/operate.html b/application/admin/view/default/navigation/module/operate.html new file mode 100644 index 000000000..4b3718bcd --- /dev/null +++ b/application/admin/view/default/navigation/module/operate.html @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/application/admin/view/default/orderaftersale/module/voucher.html b/application/admin/view/default/orderaftersale/module/voucher.html index 1c31a2445..96a9ec005 100644 --- a/application/admin/view/default/orderaftersale/module/voucher.html +++ b/application/admin/view/default/orderaftersale/module/voucher.html @@ -1,12 +1,19 @@ {{if !empty($module_data) and !empty($module_data['images'])}} -
+
    - {{foreach $module_data.images as $img}} + {{foreach $module_data.images as $ik=>$iv}}
  • - - + + +
    +
    + {{$ik+1}} + /{{:count($module_data['images'])}} + {{$iv}} +
    +
  • {{/foreach}}
diff --git a/application/admin/view/default/public/module/form.html b/application/admin/view/default/public/module/form.html index 9e513ff3b..f3c53f434 100644 --- a/application/admin/view/default/public/module/form.html +++ b/application/admin/view/default/public/module/form.html @@ -46,6 +46,12 @@ {{if !empty($form_table) and !empty($form_table['base']) and !empty($form_table['form']) and is_array($form_table['base']) and is_array($form_table['form'])}}