From d535e7750532f43056e860e516f0cb68575cf0bd Mon Sep 17 00:00:00 2001 From: devil_gong Date: Tue, 18 Dec 2018 18:32:27 +0800 Subject: [PATCH] admin --- application/admin/controller/Answer.php | 246 +++---------- application/admin/controller/Common.php | 7 +- application/admin/controller/CustomView.php | 323 ++++------------ application/admin/controller/Link.php | 114 ++---- application/admin/controller/Navigation.php | 211 ++--------- application/admin/controller/Order.php | 170 +-------- application/admin/controller/Theme.php | 75 ++-- .../admin/view/default/answer/index.html | 40 +- .../admin/view/default/customview/index.html | 66 ++-- .../view/default/customview/save_info.html | 20 +- .../admin/view/default/lib/control_nav.html | 11 - .../admin/view/default/lib/enable.html | 6 +- .../admin/view/default/lib/is_footer.html | 6 +- .../view/default/lib/is_full_screen.html | 6 +- .../admin/view/default/lib/is_header.html | 6 +- .../view/default/lib/is_new_window_open.html | 6 +- .../admin/view/default/lib/is_show.html | 6 +- .../admin/view/default/lib/user_status.html | 4 +- .../admin/view/default/link/index.html | 20 +- .../admin/view/default/navigation/index.html | 86 ++--- .../admin/view/default/navigation/nav.html | 10 +- .../admin/view/default/order/index.html | 54 +-- .../admin/view/default/theme/index.html | 12 +- application/admin/view/default/theme/nav.html | 8 +- application/index/controller/CustomView.php | 6 +- application/index/controller/Message.php | 4 +- application/index/controller/Order.php | 1 + application/index/controller/UserFavor.php | 1 + .../index/controller/UserGoodsBrowse.php | 1 + application/index/controller/UserIntegral.php | 1 + application/service/AnswerService.php | 317 ++++++++++++++++ application/service/BrandService.php | 1 - application/service/CustomViewService.php | 272 +++++++++++++- application/service/GoodsService.php | 6 +- application/service/IntegralService.php | 2 +- application/service/LinkService.php | 186 ++++++++++ application/service/MessageService.php | 24 +- application/service/NavigationService.php | 347 +++++++++++++++++- application/service/OrderService.php | 8 +- application/service/UserService.php | 2 +- .../static/index/default/images}/preview.jpg | Bin 41 files changed, 1591 insertions(+), 1101 deletions(-) delete mode 100755 application/admin/view/default/lib/control_nav.html create mode 100644 application/service/AnswerService.php create mode 100644 application/service/LinkService.php rename {application/index/view/default => public/static/index/default/images}/preview.jpg (100%) diff --git a/application/admin/controller/Answer.php b/application/admin/controller/Answer.php index ca037b2f2..b0d42fe1f 100755 --- a/application/admin/controller/Answer.php +++ b/application/admin/controller/Answer.php @@ -1,7 +1,8 @@ GetIndexWhere(); + // 条件 + $where = AnswerService::AnswerListWhere($params); - // 分页 - $number = MyC('admin_page_number'); - $page_param = array( - 'number' => $number, - 'total' => $m->where($where)->count(), - 'where' => $param, - 'url' => url('Admin/Answer/Index'), - ); - $page = new \base\Page($page_param); + // 获取总数 + $total = AnswerService::AnswerTotal($where); - // 获取列表 - $field = '*'; - $list = $this->SetDataHandle($m->where($where)->field($field)->limit($page->GetPageStarNumber(), $number)->order('id desc')->select()); + // 分页 + $page_params = array( + 'number' => $number, + 'total' => $total, + 'where' => $params, + 'page' => isset($params['page']) ? intval($params['page']) : 1, + 'url' => url('admin/order/index'), + ); + $page = new \base\Page($page_params); + $this->assign('page_html', $page->GetPageHtml()); + + // 获取列表 + $data_params = array( + 'limit_start' => $page->GetPageStarNumber(), + 'limit_number' => $number, + 'where' => $where, + ); + $data = AnswerService::AnswerList($data_params); + $this->assign('data_list', $data['data']); // 状态 $this->assign('common_is_show_list', lang('common_is_show_list')); // 参数 - $this->assign('param', $param); - - // 分页 - $this->assign('page_html', $page->GetPageHtml()); - - // 数据列表 - $this->assign('list', $list); - - // Excel地址 - $this->assign('excel_url', url('Admin/Answer/ExcelExport', $param)); - - $this->display('Index'); + $this->assign('params', $params); + return $this->fetch(); } /** - * [SetDataHandle 数据处理] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-29T21:27:15+0800 - * @param [array] $data [问答数据] - * @return [array] [处理好的数据] - */ - private function SetDataHandle($data) - { - if(!empty($data)) - { - $common_is_show_list = lang('common_is_show_list'); - $common_gender_list = lang('common_gender_list'); - $u = db('User'); - foreach($data as &$v) - { - // 用户信息 - $user = $u->where(['id'=>$v['user_id']])->field('username,nickname,mobile,gender,avatar')->find(); - $v['username'] = empty($user['username']) ? '' : $user['username']; - $v['nickname'] = empty($user['nickname']) ? '' : $user['nickname']; - $v['mobile'] = empty($user['mobile']) ? '' : $user['mobile']; - $v['avatar'] = empty($user['avatar']) ? '' : $user['avatar']; - $v['gender_text'] = isset($user['gender']) ? $common_gender_list[$user['gender']]['name'] : ''; - - // 是否显示 - $v['is_show_text'] = $common_is_show_list[$v['is_show']]['name']; - - // 创建时间 - $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']); - - // 更新时间 - $v['upd_time'] = date('Y-m-d H:i:s', $v['upd_time']); - } - } - return $data; - } - - /** - * [GetIndexWhere 问答列表条件] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-10T22:16:29+0800 - */ - private function GetIndexWhere() - { - $where = array('is_delete_time'=>0); - - // 模糊 - if(!empty($_REQUEST['keyword'])) - { - $like_keyword = array('like', '%'.I('keyword').'%'); - $where[] = array( - 'name' => $like_keyword, - 'tel' => $like_keyword, - 'content' => $like_keyword, - '_logic' => 'or', - ); - } - - // 是否更多条件 - if(I('is_more', 0) == 1) - { - // 等值 - if(I('is_show', -1) > -1) - { - $where['is_show'] = intval(I('is_show', 0)); - } - - // 表达式 - if(!empty($_REQUEST['time_start'])) - { - $where['add_time'][] = array('gt', strtotime(I('time_start'))); - } - if(!empty($_REQUEST['time_end'])) - { - $where['add_time'][] = array('lt', strtotime(I('time_end'))); - } - } - - return $where; - } - - /** - * [Delete 问答删除] + * 问答删除 * @author Devil * @blog http://gong.gg/ * @version 0.0.1 @@ -175,87 +90,41 @@ class Answer extends Common public function Delete() { // 是否ajax请求 - if(!IS_AJAX) - { - $this->error('非法访问'); - } + if(!IS_AJAX) + { + return $this->error('非法访问'); + } - // 参数处理 - $id = I('id'); - - // 删除数据 - if(!empty($id)) - { - // 问答模型 - $m = db('Answer'); - - // 问答是否存在 - $merchant = $m->where(array('id'=>$id))->getField('id'); - if(empty($merchant)) - { - $this->ajaxReturn('资源不存在或已被删除', -2); - } - - // 删除问答 - if($m->where(array('id'=>$id))->save(['is_delete_time'=>time()]) !== false) - { - $this->ajaxReturn('删除成功'); - } else { - $this->ajaxReturn('删除失败或资源不存在', -100); - } - } else { - $this->ajaxReturn('参数错误', -1); - } + // 开始处理 + $params = input(); + $params['user_type'] = 'admin'; + $ret = AnswerService::AnswerDelete($params); + return json($ret); } /** - * [Save 问答回复处理] + * 问答回复处理 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @datetime 2018-03-28T15:07:17+0800 */ - public function Save() + public function Reply() { // 是否ajax请求 if(!IS_AJAX) { - $this->error('非法访问'); + return $this->error('非法访问'); } - // 参数处理 - $id = I('id'); - $reply = I('reply'); - if(empty($id)) - { - $this->ajaxReturn('参数错误', -1); - } - if(empty($reply)) - { - $this->ajaxReturn('回复内容格式 2~230 个字符', -2); - } - - // 问答模型 - $m = db('Answer'); - - // 问答是否存在 - $temp = $m->where(array('id'=>$id))->field('id')->find(); - if(empty($temp)) - { - $this->ajaxReturn('资源不存在或已被删除', -2); - } - // 更新问答 - $data = array('reply'=>$reply, 'is_reply'=>1, 'upd_time'=>time()); - if($m->where(array('id'=>$id))->save($data) !== false) - { - $this->ajaxReturn('操作成功'); - } else { - $this->ajaxReturn('操作失败', -100); - } + // 开始处理 + $params = input(); + $ret = AnswerService::AnswerReply($params); + return json($ret); } /** - * [StatusUpdate 状态更新] + * 状态更新 * @author Devil * @blog http://gong.gg/ * @version 0.0.1 @@ -263,19 +132,16 @@ class Answer extends Common */ public function StatusUpdate() { - // 参数 - if(empty($_POST['id']) || !isset($_POST['state'])) + // 是否ajax请求 + if(!IS_AJAX) { - $this->ajaxReturn('参数错误', -1); + return $this->error('非法访问'); } - // 数据更新 - if(db('Answer')->where(array('id'=>I('id')))->save(array('is_show'=>I('state')))) - { - $this->ajaxReturn('编辑成功'); - } else { - $this->ajaxReturn('编辑失败或数据未改变', -100); - } + // 开始处理 + $params = input(); + $ret = AnswerService::AnswerStatusUpdate($params); + return json($ret); } } ?> \ No newline at end of file diff --git a/application/admin/controller/Common.php b/application/admin/controller/Common.php index 8ca1d64ee..038952f08 100755 --- a/application/admin/controller/Common.php +++ b/application/admin/controller/Common.php @@ -147,7 +147,12 @@ class Common extends Controller // 角色组权限列表校验 if(!in_array(strtolower(request()->controller().'_'.request()->action()), $this->power)) { - return $this->error('无权限'); + if(IS_AJAX) + { + exit(json_encode(DataReturn('无权限', -1000))); + } else { + return $this->error('无权限'); + } } } } diff --git a/application/admin/controller/CustomView.php b/application/admin/controller/CustomView.php index 4ec32daa6..cddc9d4f5 100755 --- a/application/admin/controller/CustomView.php +++ b/application/admin/controller/CustomView.php @@ -1,8 +1,7 @@ GetIndexWhere(); + // 条件 + $where = CustomViewService::CustomViewListWhere($params); - // 分页 - $number = MyC('admin_page_number'); - $page_param = array( - 'number' => $number, - 'total' => $m->where($where)->count(), - 'where' => $param, - 'url' => url('Admin/CustomView/Index'), - ); - $page = new \base\Page($page_param); + // 获取总数 + $total = CustomViewService::CustomViewTotal($where); - // 获取列表 - $list = $this->SetDataHandle($m->where($where)->limit($page->GetPageStarNumber(), $number)->order('id desc')->select()); + // 分页 + $page_params = array( + 'number' => $number, + 'total' => $total, + 'where' => $params, + 'page' => isset($params['page']) ? intval($params['page']) : 1, + 'url' => url('admin/customview/index'), + ); + $page = new \base\Page($page_params); + $this->assign('page_html', $page->GetPageHtml()); + + // 获取列表 + $data_params = array( + 'limit_start' => $page->GetPageStarNumber(), + 'limit_number' => $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')); @@ -76,90 +86,8 @@ class CustomView extends Common $this->assign('common_is_full_screen_list', lang('common_is_full_screen_list')); // 参数 - $this->assign('param', $param); - - // 分页 - $this->assign('page_html', $page->GetPageHtml()); - - // 数据列表 - $this->assign('list', $list); - - $this->display('Index'); - } - - /** - * [SetDataHandle 数据处理] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-29T21:27:15+0800 - * @param [array] $data [文章数据] - * @return [array] [处理好的数据] - */ - private function SetDataHandle($data) - { - if(!empty($data)) - { - foreach($data as $k=>$v) - { - // 时间 - $data[$k]['add_time'] = date('Y-m-d H:i:s', $v['add_time']); - $data[$k]['upd_time'] = date('Y-m-d H:i:s', $v['upd_time']); - - // 是否启用 - $data[$k]['is_enable_text'] = lang('common_is_enable_list')[$v['is_enable']]['name']; - } - } - return $data; - } - - /** - * [GetIndexWhere 文章列表条件] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-10T22:16:29+0800 - */ - private function GetIndexWhere() - { - $where = array(); - - // 模糊 - if(!empty($_REQUEST['keyword'])) - { - $where[] = array( - 'title' => array('like', '%'.I('keyword').'%'), - ); - } - - // 是否更多条件 - if(I('is_more', 0) == 1) - { - // 等值 - if(I('is_enable', -1) > -1) - { - $where['is_enable'] = intval(I('is_enable', 1)); - } - if(I('is_header', -1) > -1) - { - $where['is_header'] = intval(I('is_header')); - } - if(I('is_footer', -1) > -1) - { - $where['is_footer'] = intval(I('is_footer')); - } - - // 表达式 - if(!empty($_REQUEST['time_start'])) - { - $where['add_time'][] = array('gt', strtotime(I('time_start'))); - } - if(!empty($_REQUEST['time_end'])) - { - $where['add_time'][] = array('lt', strtotime(I('time_end'))); - } - } - return $where; + $this->assign('params', $params); + return $this->fetch(); } /** @@ -171,19 +99,22 @@ class CustomView extends Common */ public function SaveInfo() { + // 参数 + $params = input(); + // 数据 - if(empty($_REQUEST['id'])) + if(!empty($params['id'])) { - $data = array(); - } else { - $data = db('CustomView')->find(I('id')); - if(!empty($data['content'])) - { - // 静态资源地址处理 - $data['content'] = ResourcesService::ContentStaticReplace($data['content'], 'get'); - } + // 获取列表 + $data_params = array( + 'limit_start' => 0, + 'limit_number' => 1, + 'where' => ['id'=>intval($params['id'])], + 'field' => '*', + ); + $data = CustomViewService::CustomViewList($data_params); + $this->assign('data', empty($data['data'][0]) ? [] : $data['data'][0]); } - $this->assign('data', $data); // 是否启用 $this->assign('common_is_enable_list', lang('common_is_enable_list')); @@ -197,7 +128,7 @@ class CustomView extends Common // 是否满屏 $this->assign('common_is_full_screen_list', lang('common_is_full_screen_list')); - $this->display('SaveInfo'); + return $this->fetch(); } /** @@ -210,117 +141,15 @@ class CustomView extends Common public function Save() { // 是否ajax请求 - if(!IS_AJAX) - { - $this->error('非法访问'); - } + if(!IS_AJAX) + { + return $this->error('非法访问'); + } - // 添加 - if(empty($_POST['id'])) - { - $this->Add(); - - // 编辑 - } else { - $this->Edit(); - } - } - - /** - * [Add 添加] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-18T16:20:59+0800 - */ - private function Add() - { - // 模型 - $m = D('CustomView'); - - // 数据自动校验 - if($m->create($_POST, 1)) - { - // 额外数据处理 - $m->add_time = time(); - $m->upd_time = time(); - $m->title = I('title'); - - // 静态资源地址处理 - $m->content = ResourcesService::ContentStaticReplace($m->content, 'add'); - - // 正则匹配文章图片 - $temp_image = $this->MatchContentImage($m->content); - $m->image = json_encode($temp_image); - $m->image_count = count($temp_image); - - // 数据添加 - if($m->add()) - { - $this->ajaxReturn('新增成功'); - } else { - $this->ajaxReturn('新增失败', -100); - } - } else { - $this->ajaxReturn($m->getError(), -1); - } - } - - /** - * [Edit 编辑] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-17T22:13:40+0800 - */ - private function Edit() - { - // 模型 - $m = D('CustomView'); - - // 数据自动校验 - if($m->create($_POST, 2)) - { - // 静态资源地址处理 - $m->content = ResourcesService::ContentStaticReplace($m->content, 'add'); - - // 正则匹配文章图片 - $temp_image = $this->MatchContentImage($m->content); - $m->image = json_encode($temp_image); - $m->image_count = count($temp_image); - $m->upd_time = time(); - $m->title = I('title'); - - // 数据更新 - if($m->where(array('id'=>I('id')))->save()) - { - $this->ajaxReturn('编辑成功'); - } else { - $this->ajaxReturn('编辑失败或数据未改变', -100); - } - } else { - $this->ajaxReturn($m->getError(), -1); - } - } - - /** - * [MatchContentImage 正则匹配文章图片] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2017-01-22T18:06:53+0800 - * @param [string] $content [文章内容] - * @return [array] [文章图片数组(一维)] - */ - private function MatchContentImage($content) - { - if(!empty($content)) - { - $pattern = '//'; - preg_match_all($pattern, $content, $match); - return empty($match[1]) ? array() : $match[1]; - } - return array(); + // 开始处理 + $params = input(); + $ret = CustomViewService::CustomViewSave($params); + return json($ret); } /** @@ -333,24 +162,16 @@ class CustomView extends Common public function Delete() { // 是否ajax请求 - if(!IS_AJAX) - { - $this->error('非法访问'); - } + if(!IS_AJAX) + { + return $this->error('非法访问'); + } - // 删除数据 - if(!empty($_POST['id'])) - { - // 更新 - if(db('CustomView')->delete(I('id'))) - { - $this->ajaxReturn('删除成功'); - } else { - $this->ajaxReturn('删除失败或资源不存在', -100); - } - } else { - $this->ajaxReturn('参数错误', -1); - } + // 开始处理 + $params = input(); + $params['user_type'] = 'admin'; + $ret = CustomViewService::CustomViewDelete($params); + return json($ret); } /** @@ -362,20 +183,16 @@ class CustomView extends Common */ public function StatusUpdate() { - // 参数 - if(empty($_POST['id']) || !isset($_POST['state'])) - { - $this->ajaxReturn('参数错误', -1); - } - $field = i('field', 'is_enable'); + // 是否ajax请求 + if(!IS_AJAX) + { + return $this->error('非法访问'); + } - // 数据更新 - if(db('CustomView')->where(['id'=>I('id')])->save([$field=>intval(I('state'))])) - { - $this->ajaxReturn('编辑成功'); - } else { - $this->ajaxReturn('编辑失败或数据未改变', -100); - } + // 开始处理 + $params = input(); + $ret = CustomViewService::CustomViewStatusUpdate($params); + return json($ret); } } ?> \ No newline at end of file diff --git a/application/admin/controller/Link.php b/application/admin/controller/Link.php index b74946f6a..00cb2acb3 100755 --- a/application/admin/controller/Link.php +++ b/application/admin/controller/Link.php @@ -1,7 +1,8 @@ field(array('id', 'name', 'url', 'describe', 'sort', 'is_enable', 'is_new_window_open'))->order('sort')->select(); - $this->assign('list', $list); + $data = LinkService::LinkList(); + $this->assign('data_list', $data['data']); // 是否新窗口打开 $this->assign('common_is_new_window_open_list', lang('common_is_new_window_open_list')); @@ -49,7 +50,7 @@ class Link extends Common // 是否启用 $this->assign('common_is_enable_list', lang('common_is_enable_list')); - $this->display('Index'); + return $this->fetch(); } /** @@ -62,57 +63,15 @@ class Link extends Common public function Save() { // 是否ajax请求 - if(!IS_AJAX) - { - $this->error('非法访问'); - } + if(!IS_AJAX) + { + return $this->error('非法访问'); + } - // id为空则表示是新增 - $m = D('Link'); - - // 公共额外数据处理 - $m->sort = intval(I('sort')); - $m->describe = I('describe'); - - // 添加 - if(empty($_POST['id'])) - { - if($m->create($_POST, 1)) - { - // 额外数据处理 - $m->add_time = time(); - $m->name = I('name'); - $m->describe = I('describe'); - - // 写入数据库 - if($m->add()) - { - $this->ajaxReturn('新增成功'); - } else { - $this->ajaxReturn('新增失败', -100); - } - } - } else { - // 编辑 - if($m->create($_POST, 2)) - { - // 额外数据处理 - $m->name = I('name'); - $m->describe = I('describe'); - - // 移除 id - unset($m->id); - - // 更新数据库 - if($m->where(array('id'=>I('id')))->save()) - { - $this->ajaxReturn('编辑成功'); - } else { - $this->ajaxReturn('编辑失败或数据未改变', -100); - } - } - } - $this->ajaxReturn($m->getError(), -1); + // 开始处理 + $params = input(); + $ret = LinkService::LinkSave($params); + return json($ret); } /** @@ -124,23 +83,17 @@ class Link extends Common */ public function Delete() { - if(!IS_AJAX) - { - $this->error('非法访问'); - } + // 是否ajax请求 + if(!IS_AJAX) + { + return $this->error('非法访问'); + } - $m = D('Link'); - if($m->create($_POST, 4)) - { - if($m->delete($id)) - { - $this->ajaxReturn('删除成功'); - } else { - $this->ajaxReturn('删除失败或资源不存在', -100); - } - } else { - $this->ajaxReturn($m->getError(), -1); - } + // 开始处理 + $params = input(); + $params['user_type'] = 'admin'; + $ret = LinkService::LinkDelete($params); + return json($ret); } /** @@ -152,19 +105,16 @@ class Link extends Common */ public function StatusUpdate() { - // 参数 - if(empty($_POST['id']) || !isset($_POST['state'])) - { - $this->ajaxReturn('参数错误', -1); - } + // 是否ajax请求 + if(!IS_AJAX) + { + return $this->error('非法访问'); + } - // 数据更新 - if(db('Link')->where(array('id'=>I('id')))->save(array('is_enable'=>I('state')))) - { - $this->ajaxReturn('编辑成功'); - } else { - $this->ajaxReturn('编辑失败或数据未改变', -100); - } + // 开始处理 + $params = input(); + $ret = LinkService::LinkStatusUpdate($params); + return json($ret); } } ?> \ No newline at end of file diff --git a/application/admin/controller/Navigation.php b/application/admin/controller/Navigation.php index 20f7a651d..13305de41 100755 --- a/application/admin/controller/Navigation.php +++ b/application/admin/controller/Navigation.php @@ -1,9 +1,9 @@ Is_Power(); // 导航类型 - $this->nav_type = I('nav_type', 'header'); + $this->nav_type = input('nav_type', 'header'); } /** @@ -48,34 +48,16 @@ class Navigation extends Common public function Index() { // 获取导航列表 - $this->assign('list', $this->GetNavList()); + $this->assign('data_list', NavigationService::NavList(['nav_type'=>$this->nav_type])); // 一级分类 - $this->assign('nav_header_pid_list', db('Navigation')->field(array('id', 'name'))->where(array('is_show'=>1, 'pid'=>0, 'nav_type'=>$this->nav_type))->select()); + $this->assign('nav_header_pid_list', NavigationService::LevelOneNav(['nav_type'=>$this->nav_type])); // 获取分类和文章 $this->assign('article_list', ArticleService::ArticleCategoryList()); // 商品分类 - $field = 'id,name'; - $m = db('GoodsCategory'); - $category = $m->field($field)->where(['is_enable'=>1, 'pid'=>0])->order('sort asc')->select(); - if(!empty($category)) - { - foreach($category as &$v) - { - $two = $m->field($field)->where(['is_enable'=>1, 'pid'=>$v['id']])->order('sort asc')->select(); - if(!empty($two)) - { - foreach($two as &$vs) - { - $vs['items'] = $m->field($field)->where(['is_enable'=>1, 'pid'=>$vs['id']])->order('sort asc')->select(); - } - } - $v['items'] = $two; - } - } - $this->assign('goods_category_list', $category); + $this->assign('goods_category_list', GoodsService::GoodsCategory()); // 自定义页面 $this->assign('customview_list', db('CustomView')->field(array('id', 'title'))->where(array('is_enable'=>1))->select()); @@ -87,30 +69,7 @@ class Navigation extends Common $this->assign('common_is_show_list', lang('common_is_show_list')); $this->assign('nav_type', $this->nav_type); - - $this->display('Index'); - } - - /** - * [GetNavList 获取数据列表] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-10T22:16:29+0800 - */ - private function GetNavList() - { - $m = db('Navigation'); - $field = array('id', 'pid', 'name', 'url', 'value', 'data_type', 'sort', 'is_show', 'is_new_window_open'); - $data = NavigationService::NavDataDealWith($m->field($field)->where(array('nav_type'=>$this->nav_type, 'pid'=>0))->order('sort')->select()); - if(!empty($data)) - { - foreach($data as $k=>$v) - { - $data[$k]['item'] = NavigationService::NavDataDealWith($m->field($field)->where(array('nav_type'=>$this->nav_type, 'pid'=>$v['id']))->order('sort')->select()); - } - } - return $data; + return $this->fetch(); } /** @@ -123,111 +82,19 @@ class Navigation extends Common public function Save() { // 是否ajax请求 - if(!IS_AJAX) - { - $this->error('非法访问'); - } + if(!IS_AJAX) + { + return $this->error('非法访问'); + } - // 请求类型 - switch(I('data_type')) - { - // 自定义导航 - case 'custom': - $this->DataSave(5); - break; - - // 文章分类导航 - case 'article': - $this->DataSave(6); - break; - - // 自定义页面导航 - case 'customview': - $this->DataSave(7); - break; - - // 商品分类导航 - case 'goods_category': - $this->DataSave(8); - break; - } - $this->ajaxReturn('参数错误', -1); + // 开始处理 + $params = input(); + $params['nav_type'] = $this->nav_type; + $ret = NavigationService::NavSave($params); + return json($ret); } - /** - * [DataSave 导航数据保存] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2017-02-05T20:12:30+0800 - * @param [int] $check_type [校验类型] - */ - private function DataSave($check_type) - { - $m = D('Navigation'); - - // 数据校验 - if($m->create($_POST, $check_type)) - { - // 非自定义导航数据处理 - if(empty($_POST['name'])) - { - switch(I('data_type')) - { - // 文章分类导航 - case 'article': - $temp_name = db('Article')->where(array('id'=>I('value')))->getField('title'); - break; - - // 自定义页面导航 - case 'customview': - $temp_name = db('CustomView')->where(array('id'=>I('value')))->getField('title'); - break; - - // 商品分类导航 - case 'goods_category': - $temp_name = db('GoodsCategory')->where(array('id'=>I('value')))->getField('name'); - break; - } - // 只截取16个字符 - $m->name = mb_substr($temp_name, 0, 16, config('DEFAULT_CHARSET')); - } else { - $m->name = I('name'); - } - - // 清除缓存 - S(config('cache_common_home_nav_'.$this->nav_type.'_key', null)); - - // id为空则表示是新增 - if(empty($_POST['id'])) - { - // 额外数据处理 - $m->add_time = time(); - $m->nav_type = $this->nav_type; - - // 写入数据库 - if($m->add()) - { - $this->ajaxReturn('新增成功'); - } else { - $this->ajaxReturn('新增失败', -100); - } - } else { - // 额外数据处理 - $m->upd_time = time(); - - // 数据编辑 - if($m->where(array('id'=>I('id')))->save()) - { - $this->ajaxReturn('编辑成功'); - } else { - $this->ajaxReturn('编辑失败或数据未改变', -100); - } - } - } else { - $this->ajaxReturn($m->getError(), -1); - } - } + /** * [Delete 删除] @@ -238,26 +105,16 @@ class Navigation extends Common */ public function Delete() { + // 是否ajax请求 if(!IS_AJAX) { - $this->error('非法访问'); + return $this->error('非法访问'); } - $m = D('Navigation'); - if($m->create($_POST, 4)) - { - if($m->delete($id)) - { - // 清除缓存 - S(config('cache_common_home_nav_'.$this->nav_type.'_key', null)); - - $this->ajaxReturn('删除成功'); - } else { - $this->ajaxReturn('删除失败或资源不存在', -100); - } - } else { - $this->ajaxReturn($m->getError(), -1); - } + // 开始处理 + $params = input(); + $ret = NavigationService::NavDelete($params); + return json($ret); } /** @@ -269,22 +126,16 @@ class Navigation extends Common */ public function StatusUpdate() { - // 参数 - if(empty($_POST['id']) || !isset($_POST['state'])) + // 是否ajax请求 + if(!IS_AJAX) { - $this->ajaxReturn('参数错误', -1); + return $this->error('非法访问'); } - // 数据更新 - if(db('Navigation')->where(array('id'=>I('id')))->save(array('is_show'=>I('state')))) - { - // 清除缓存 - S(config('cache_common_home_nav_'.$this->nav_type.'_key', null)); - - $this->ajaxReturn('编辑成功'); - } else { - $this->ajaxReturn('编辑失败或数据未改变', -100); - } + // 开始处理 + $params = input(); + $ret = NavigationService::NavStatusUpdate($params); + return json($ret); } } ?> \ No newline at end of file diff --git a/application/admin/controller/Order.php b/application/admin/controller/Order.php index 9a320e3bb..4fc67a2f3 100755 --- a/application/admin/controller/Order.php +++ b/application/admin/controller/Order.php @@ -61,6 +61,7 @@ class Order extends Common 'number' => $number, 'total' => $total, 'where' => $params, + 'page' => isset($params['page']) ? intval($params['page']) : 1, 'url' => url('admin/order/index'), ); $page = new \base\Page($page_params); @@ -101,141 +102,6 @@ class Order extends Common return $this->fetch(); } - - /** - * [SetDataHandle 数据处理] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-29T21:27:15+0800 - * @param [array] $data [订单数据] - * @return [array] [处理好的数据] - */ - private function SetDataHandle($data) - { - if(!empty($data)) - { - $image_host = config('IMAGE_HOST'); - $common_order_admin_status = lang('common_order_admin_status'); - $common_order_pay_status = lang('common_order_pay_status'); - foreach($data as &$v) - { - // 确认时间 - $v['confirm_time'] = empty($v['confirm_time']) ? null : date('Y-m-d H:i:s', $v['confirm_time']); - - // 支付时间 - $v['pay_time'] = empty($v['pay_time']) ? null : date('Y-m-d H:i:s', $v['pay_time']); - - // 发货时间 - $v['delivery_time'] = empty($v['delivery_time']) ? null : date('Y-m-d H:i:s', $v['delivery_time']); - - // 完成时间 - $v['success_time'] = empty($v['success_time']) ? null : date('Y-m-d H:i:s', $v['success_time']); - - // 取消时间 - $v['cancel_time'] = empty($v['cancel_time']) ? null : date('Y-m-d H:i:s', $v['cancel_time']); - - // 创建时间 - $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']); - - // 更新时间 - $v['upd_time'] = date('Y-m-d H:i:s', $v['upd_time']); - - // 状态 - $v['status_text'] = $common_order_admin_status[$v['status']]['name']; - - // 支付状态 - $v['pay_status_text'] = $common_order_pay_status[$v['pay_status']]['name']; - - // 支付方式 - $v['payment_name'] = ($v['status'] <= 1) ? null : ResourcesService::OrderPaymentName($v['id']); - - // 快递公司 - $v['express_name'] = ResourcesService::ExpressName($v['express_id']); - - // 收件人地址 - $v['receive_province_name'] = ResourcesService::RegionName($v['receive_province']); - $v['receive_city_name'] = ResourcesService::RegionName($v['receive_city']); - $v['receive_county_name'] = ResourcesService::RegionName($v['receive_county']); - - // 商品列表 - $goods = db('OrderDetail')->where(['order_id'=>$v['id']])->select(); - if(!empty($goods)) - { - foreach($goods as &$vs) - { - $vs['attribute'] = empty($vs['attribute']) ? null : json_decode($vs['attribute'], true); - } - } - $v['goods'] = $goods; - - // 描述 - $v['describe'] = '共'.count($v['goods']).'件 合计:¥'.$v['total_price'].'元'; - } - } - return $data; - } - - /** - * [GetIndexWhere 订单列表条件] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-10T22:16:29+0800 - */ - private function GetIndexWhere() - { - $where = array( - 'is_delete_time' => 0, - ); - - // 模糊 - if(!empty($_REQUEST['keyword'])) - { - $like_keyword = array('like', '%'.I('keyword').'%'); - $where[] = array( - 'order_no' => $like_keyword, - 'receive_name' => $like_keyword, - 'receive_tel' => $like_keyword, - 'receive_address' => $like_keyword, - 'express_number' => $like_keyword, - '_logic' => 'or', - ); - } - - // 是否更多条件 - if(I('is_more', 0) == 1) - { - // 等值 - if(I('status', -1) > -1) - { - $where['status'] = intval(I('status')); - } - - if(I('express_id', -1) > -1) - { - $where['express_id'] = intval(I('express_id')); - } - - if(I('pay_status', -1) > -1) - { - $where['pay_status'] = intval(I('pay_status')); - } - - // 表达式 - if(!empty($_REQUEST['time_start'])) - { - $where['add_time'][] = array('gt', strtotime(I('time_start'))); - } - if(!empty($_REQUEST['time_end'])) - { - $where['add_time'][] = array('lt', strtotime(I('time_end'))); - } - } - - return $where; - } - /** * [Delete 订单删除] * @author Devil @@ -248,17 +114,17 @@ class Order extends Common // 是否ajax请求 if(!IS_AJAX) { - $this->error('非法访问'); + return $this->error('非法访问'); } // 删除操作 - $params = $_POST; + $params = input(); $params['user_id'] = $params['value']; $params['creator'] = $this->admin['id']; $params['creator_name'] = $this->admin['username']; $params['user_type'] = 'admin'; $ret = OrderService::OrderDelete($params); - $this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']); + return json($ret); } /** @@ -273,16 +139,16 @@ class Order extends Common // 是否ajax请求 if(!IS_AJAX) { - $this->error('非法访问'); + return $this->error('非法访问'); } // 取消操作 - $params = $_POST; + $params = input(); $params['user_id'] = $params['value']; $params['creator'] = $this->admin['id']; $params['creator_name'] = $this->admin['username']; $ret = OrderService::OrderCancel($params); - $this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']); + return json($ret); } /** @@ -297,15 +163,15 @@ class Order extends Common // 是否ajax请求 if(!IS_AJAX) { - $this->error('非法访问'); + return $this->error('非法访问'); } // 发货操作 - $params = $_POST; + $params = input(); $params['creator'] = $this->admin['id']; $params['creator_name'] = $this->admin['username']; $ret = OrderService::OrderDelivery($params); - $this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']); + return json($ret); } /** @@ -320,16 +186,16 @@ class Order extends Common // 是否ajax请求 if(!IS_AJAX) { - $this->error('非法访问'); + return $this->error('非法访问'); } // 收货操作 - $params = $_POST; + $params = input(); $params['user_id'] = $params['value']; $params['creator'] = $this->admin['id']; $params['creator_name'] = $this->admin['username']; $ret = OrderService::OrderCollect($params); - $this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']); + return json($ret); } /** @@ -344,16 +210,16 @@ class Order extends Common // 是否ajax请求 if(!IS_AJAX) { - $this->error('非法访问'); + return $this->error('非法访问'); } // 订单确认 - $params = $_POST; + $params = input(); $params['user_id'] = $params['value']; $params['creator'] = $this->admin['id']; $params['creator_name'] = $this->admin['username']; $ret = OrderService::OrderConfirm($params); - $this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']); + return json($ret); } /** @@ -366,11 +232,11 @@ class Order extends Common */ public function Pay() { - $params = $_POST; + $params = input(); $params['user'] = $this->admin; $params['user']['user_name_view'] = '管理员'.'-'.$this->admin['username']; $ret = OrderService::AdminPay($params); - $this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']); + return json($ret); } } ?> \ No newline at end of file diff --git a/application/admin/controller/Theme.php b/application/admin/controller/Theme.php index 5138f8448..d3098c141 100755 --- a/application/admin/controller/Theme.php +++ b/application/admin/controller/Theme.php @@ -1,5 +1,4 @@ Is_Power(); // 静态目录和html目录 - $this->html_path = 'Application'.DS.'Home'.DS.'View'.DS; - $this->static_path = 'Public'.DS.'Home'.DS; + $this->html_path = 'application'.DS.'index'.DS.'view'.DS; + $this->static_path = 'public'.DS.'static'.DS.'index'.DS; // 小导航 - $this->view_type = I('view_type', 'home'); + $this->view_type = input('view_type', 'home'); } /** - * [Index 列表] + * 列表 * @author Devil * @blog http://gong.gg/ * @version 0.0.1 @@ -49,28 +48,32 @@ class Theme extends Common */ public function Index() { - // 模板 - switch($this->view_type) - { - // 模板安装 - case 'upload': - $this->display('Upload'); - break; + // 模板列表 + $this->assign('data_list', $this->GetThemeList()); - // 当前模板 - default: - // 模板列表 - $this->assign('data', $this->GetThemeList()); - - // 默认主题 - $theme = S('cache_common_default_theme_data'); - $this->assign('theme', empty($theme) ? 'Default' : $theme); - - $this->display('Index'); - } + // 默认主题 + $theme = cache('cache_common_default_theme_data'); + $this->assign('theme', empty($theme) ? 'Default' : $theme); // 导航参数 $this->assign('view_type', $this->view_type); + + return $this->fetch(); + } + + /** + * 模板安装 + * @author Devil + * @blog http://gong.gg/ + * @version 0.0.1 + * @datetime 2016-12-06T21:31:53+0800 + */ + public function UploadInfo() + { + // 导航参数 + $this->assign('view_type', $this->view_type); + + return $this->fetch(); } /** @@ -83,13 +86,13 @@ class Theme extends Common */ private function GetThemeList() { - $result = array(); - $dir = 'Application'.DS.'Home'.DS.'View'.DS; + $result = []; + $dir = ROOT.$this->html_path; if(is_dir($dir)) { if($dh = opendir($dir)) { - $default_preview = 'Public'.DS.'Common'.DS.'Images'.DS.'default-preview.jpg'; + $default_preview = __MY_URL__.'static'.DS.'common'.DS.'images'.DS.'default-preview.jpg'; while(($temp_file = readdir($dh)) !== false) { $config = $dir.$temp_file.DS.'config.json'; @@ -106,13 +109,14 @@ class Theme extends Common { continue; } + $preview = ROOT.$this->static_path.$temp_file.DS.'images'.DS.'preview.jpg'; $result[] = array( 'theme' => $temp_file, - 'name' => I('data.name', '', '',$data), - 'ver' => str_replace(array(',',','), ', ', I('data.ver', '', '',$data)), - 'author' => I('data.author', '', '',$data), - 'home' => I('data.home', '', '',$data), - 'preview' => file_exists($dir.$temp_file.DS.'preview.jpg') ? $dir.$temp_file.DS.'preview.jpg' : $default_preview, + 'name' => htmlentities($data['name']), + 'ver' => str_replace(array(',',','), ', ', htmlentities($data['ver'])), + 'author' => htmlentities($data['author']), + 'home' => isset($data['home']) ? $data['home'] : '', + 'preview' => file_exists($preview) ? __MY_URL__.'static'.DS.'index'.DS.$temp_file.DS.'images'.DS.'preview.jpg' : $default_preview, ); } } @@ -158,7 +162,7 @@ class Theme extends Common } // 默认主题 - $theme = S('cache_common_default_theme_data'); + $theme = cache('cache_common_default_theme_data'); $theme = empty($theme) ? 'Default' : $theme; // 不能删除正在使用的主题 @@ -218,16 +222,16 @@ class Theme extends Common if(strpos($file, '/.') === false && strpos($file, '__') === false) { // 拼接路径 - if(strpos($file, '_Html') !== false) + if(strpos($file, '_html') !== false) { $file = $this->html_path.$file; - } else if(strpos($file, '_Static') !== false) + } else if(strpos($file, '_static') !== false) { $file = $this->static_path.$file; } else { continue; } - $file = str_replace(array('_Static/', '_Html/'), '', $file); + $file = str_replace(array('_static/', '_html/'), '', $file); // 截取文件路径 $file_path = substr($file, 0, strrpos($file, '/')); @@ -249,7 +253,6 @@ class Theme extends Common // 关闭目录项 zip_entry_close($temp_resource); } - } } $this->ajaxReturn('操作成功'); diff --git a/application/admin/view/default/answer/index.html b/application/admin/view/default/answer/index.html index eca22b4d5..94a90301b 100755 --- a/application/admin/view/default/answer/index.html +++ b/application/admin/view/default/answer/index.html @@ -4,27 +4,27 @@
-
+
- value="{{$param.keyword}}"{{/if}} /> + -
+
-
+
+ ~ - +
@@ -32,7 +32,7 @@ - @@ -46,9 +46,9 @@ - {{if !empty($list)}} - - + {{if !empty($data_list)}} + {{foreach $data_list as $v}} + @@ -125,10 +125,10 @@ {{/foreach}} @@ -154,7 +154,7 @@ - +
@@ -170,8 +170,8 @@
- {{if !empty($list)}} - {{$page_html}} + {{if !empty($data_list)}} + {{$page_html|raw}} {{/if}} diff --git a/application/admin/view/default/customview/index.html b/application/admin/view/default/customview/index.html index 575591248..1c81e3ece 100755 --- a/application/admin/view/default/customview/index.html +++ b/application/admin/view/default/customview/index.html @@ -4,39 +4,39 @@
- +
- value="{{$param.keyword}}"{{/if}} /> + -
+
-
+
+ ~ - +
@@ -44,13 +44,13 @@ -
新增 + -
用户信息
{{if !empty($v['username'])}} {{$v.username}} @@ -69,7 +69,7 @@ {{$v.content}} - {{$v.reply}} {{$v.add_time}} - {{if $v['is_reply'] eq 0)}} + {{if $v['is_reply'] eq 0}} {{/if}} - +
@@ -64,23 +64,23 @@ - {{if !empty($list)}} - - + {{if !empty($data_list)}} + {{foreach $data_list as $v}} + {{/foreach}} @@ -138,8 +138,8 @@ - {{if !empty($list)}} - {{$page_html}} + {{if !empty($data_list)}} + {{$page_html|raw}} {{/if}} diff --git a/application/admin/view/default/customview/save_info.html b/application/admin/view/default/customview/save_info.html index a111db3a2..1238afc56 100755 --- a/application/admin/view/default/customview/save_info.html +++ b/application/admin/view/default/customview/save_info.html @@ -4,31 +4,31 @@
- + - {{if empty($data['id'])}} 自定义页面添加 {{else /}} 自定义页面编辑 {{/if}} - 返回 + 返回
- value="{{$data.title}}" {{/if}} required /> +
- - - - + {{include file="lib/enable" /}} + {{include file="lib/is_header" /}} + {{include file="lib/is_footer" /}} + {{include file="lib/is_full_screen" /}}
- +
- value="{{$data.id}}"{{/if}}" /> +
diff --git a/application/admin/view/default/lib/control_nav.html b/application/admin/view/default/lib/control_nav.html deleted file mode 100755 index f7f273a96..000000000 --- a/application/admin/view/default/lib/control_nav.html +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/application/admin/view/default/lib/enable.html b/application/admin/view/default/lib/enable.html index d2bf83204..5135c45a0 100755 --- a/application/admin/view/default/lib/enable.html +++ b/application/admin/view/default/lib/enable.html @@ -2,9 +2,9 @@
- -
diff --git a/application/admin/view/default/lib/is_footer.html b/application/admin/view/default/lib/is_footer.html index 9950e4e89..a14829f2a 100755 --- a/application/admin/view/default/lib/is_footer.html +++ b/application/admin/view/default/lib/is_footer.html @@ -2,9 +2,9 @@
- -
diff --git a/application/admin/view/default/lib/is_full_screen.html b/application/admin/view/default/lib/is_full_screen.html index 7e3a90fee..413de27d7 100755 --- a/application/admin/view/default/lib/is_full_screen.html +++ b/application/admin/view/default/lib/is_full_screen.html @@ -2,9 +2,9 @@
- -
diff --git a/application/admin/view/default/lib/is_header.html b/application/admin/view/default/lib/is_header.html index ebcf4b40a..303e669eb 100755 --- a/application/admin/view/default/lib/is_header.html +++ b/application/admin/view/default/lib/is_header.html @@ -2,9 +2,9 @@
- -
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 1aa1c5894..045ec2bf7 100755 --- a/application/admin/view/default/lib/is_new_window_open.html +++ b/application/admin/view/default/lib/is_new_window_open.html @@ -2,9 +2,9 @@
- -
diff --git a/application/admin/view/default/lib/is_show.html b/application/admin/view/default/lib/is_show.html index 5be6c98c2..363792cbb 100755 --- a/application/admin/view/default/lib/is_show.html +++ b/application/admin/view/default/lib/is_show.html @@ -2,9 +2,9 @@
- -
diff --git a/application/admin/view/default/lib/user_status.html b/application/admin/view/default/lib/user_status.html index 902d5cb87..b04139582 100755 --- a/application/admin/view/default/lib/user_status.html +++ b/application/admin/view/default/lib/user_status.html @@ -2,8 +2,8 @@
diff --git a/application/admin/view/default/link/index.html b/application/admin/view/default/link/index.html index 8858f9456..b81652cde 100755 --- a/application/admin/view/default/link/index.html +++ b/application/admin/view/default/link/index.html @@ -18,21 +18,21 @@
-
+
- +
- - + {{include file="lib/is_new_window_open" /}} + {{include file="lib/enable" /}}
@@ -49,7 +49,7 @@ -
标题
- {{$v.title}} + {{$v.title}} - - + - + - + {{$v.access_count}} @@ -113,20 +113,20 @@
{{$v.access_count}}
创建时间
-
{{$v.add_time}}
+
{{$v.add_time_time}}
更新时间
-
{{$v.upd_time}}
+
{{$v.upd_time_time}}
- + - +
@@ -59,9 +59,9 @@ - {{if !empty($list)}} - - + {{if !empty($data_list)}} + {{foreach $data_list as $v}} + {{/foreach}} diff --git a/application/admin/view/default/navigation/index.html b/application/admin/view/default/navigation/index.html index cfd03340f..4c6adde7d 100755 --- a/application/admin/view/default/navigation/index.html +++ b/application/admin/view/default/navigation/index.html @@ -4,7 +4,7 @@
- + {{include file="navigation/nav" /}} @@ -17,7 +17,7 @@ -
名称
{{$v.name}} @@ -69,11 +69,11 @@ {{$v.describe}} - - +
@@ -27,9 +27,9 @@ - {{if !empty($list)}} - - + {{if !empty($data_list)}} + {{foreach $data_list as $v}} + - {{if !empty($list)}} - - + {{if !empty($data_list)}} + {{foreach $v.item as $vs}} + {{/foreach}} @@ -80,12 +80,12 @@
- +
- + + {{foreach $nav_header_pid_list as $v}} {{/foreach}} @@ -95,15 +95,15 @@
- +
- - + {{include file="lib/is_show" /}} + {{include file="lib/is_new_window_open" /}}
@@ -126,12 +126,12 @@
- +
- + + {{foreach $nav_header_pid_list as $v}} {{/foreach}} @@ -140,10 +140,10 @@
- - + {{include file="lib/is_show" /}} + {{include file="lib/is_new_window_open" /}}
@@ -184,12 +184,12 @@
- +
- + + {{foreach $nav_header_pid_list as $v}} {{/foreach}} @@ -198,7 +198,7 @@ @@ -211,8 +211,8 @@
- - + {{include file="lib/is_show" /}} + {{include file="lib/is_new_window_open" /}}
@@ -235,12 +235,12 @@
- +
- + + {{foreach $nav_header_pid_list as $v}} {{/foreach}} @@ -249,12 +249,12 @@
- - + {{include file="lib/is_show" /}} + {{include file="lib/is_new_window_open" /}}
diff --git a/application/admin/view/default/navigation/nav.html b/application/admin/view/default/navigation/nav.html index b542747a1..8d1c7e5be 100755 --- a/application/admin/view/default/navigation/nav.html +++ b/application/admin/view/default/navigation/nav.html @@ -1,8 +1,8 @@ -
    class="am-active"{{/if}} data-type="header"> - 中间导航 + \ No newline at end of file diff --git a/application/admin/view/default/order/index.html b/application/admin/view/default/order/index.html index 61b3cf22e..34faacddd 100755 --- a/application/admin/view/default/order/index.html +++ b/application/admin/view/default/order/index.html @@ -6,7 +6,7 @@
    - +
@@ -65,16 +71,16 @@ {{foreach $v.items as $vs}}
- + {{if !empty($vs.spec)}} {{foreach $vs.spec as $kss=>$vss}} - {{$vss.type}}:{{$vss.value}}{{if $kss eq count($vs.spec)-1}},{{/if}} + {{$vss.type}}:{{$vss.value}}{{if $kss neq count($vs.spec)-1}},{{/if}} {{/foreach}} {{/if}} @@ -100,14 +106,14 @@ {{/if}}
导航名称
{{$v.name}} @@ -37,16 +37,16 @@ {{:lang('common_nav_type_list')[$v['data_type']]}} - - +
@@ -54,11 +54,11 @@ {{:lang('common_nav_type_list')[$vs['data_type']]}} - - +
- {{$v.status_text}} + {{$v.status_name}} {{if $v['pay_status'] eq 1}} - {{$v.pay_status_text}} + {{$v.pay_status_name}} {{elseif $v['pay_status'] eq 2 /}} - {{$v.pay_status_text}} + {{$v.pay_status_name}} {{else /}} - {{$v.pay_status_text}} + {{$v.pay_status_name}} {{/if}} {{if $v['user_is_delete_time'] neq 0}} 用户已删除 @@ -134,16 +140,22 @@
基础信息
- {{foreach $v.goods as $vs}} + {{foreach $v.items as $vs}}
- {{$vs.attribute}} + + {{if !empty($vs.spec)}} + {{foreach $vs.spec as $kss=>$vss}} + {{$vss.type}}:{{$vss.value}}{{if $kss neq count($vs.spec)-1}},{{/if}} + {{/foreach}} + {{/if}} + {{$vs.price}}x{{$vs.buy_number}}
@@ -169,10 +181,10 @@
{{if empty($v['express_name'])}}未填写{{else /}}{{$v.express_name}}
{{$v.express_number}}{{/if}}
支付状态
-
{{if empty($v['pay_status_text'])}}未填写{{else /}}{{$v.pay_status_text}}{{/if}}
+
{{if empty($v['pay_status_name'])}}未填写{{else /}}{{$v.pay_status_name}}{{/if}}
订单状态
-
{{if empty($v['status_text'])}}未设置{{else /}}{{$v.status_text}}{{/if}}
+
{{if empty($v['status_name'])}}未设置{{else /}}{{$v.status_name}}{{/if}}
支付方式
{{if empty($v['payment_name'])}}未填写{{else /}}{{$v.payment_name}}{{/if}}
@@ -202,7 +214,7 @@
{{if empty($v['delivery_time'])}}未填写{{else /}}{{$v.delivery_time}}{{/if}}
完成时间
-
{{if empty($v['success_time'])}}未填写{{else /}}{{$v.success_time}}{{/if}}
+
{{if empty($v['collect_time'])}}未填写{{else /}}{{$v.collect_time}}{{/if}}
取消时间
{{if empty($v['cancel_time'])}}未填写{{else /}}{{$v.cancel_time}}{{/if}}
@@ -273,14 +285,14 @@ {{/foreach}} {{/if}} - + {{if empty($express_list)}}
没有快递方式
{{/if}}
- +
@@ -318,7 +330,7 @@ {{/foreach}} {{/if}} - + {{if empty($buy_payment_list)}}
没有支付方式
{{/if}}
diff --git a/application/admin/view/default/theme/index.html b/application/admin/view/default/theme/index.html index 37ddeefeb..3144da7b4 100755 --- a/application/admin/view/default/theme/index.html +++ b/application/admin/view/default/theme/index.html @@ -4,22 +4,22 @@
- + {{include file="theme/nav" /}} - -