From e1a71878d6eea80277f235cecdedd0f1a94cc6e5 Mon Sep 17 00:00:00 2001 From: liyukun <1099438829@qq.com> Date: Sat, 13 Nov 2021 23:40:28 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/AuthController.php | 16 +- app/admin/controller/Category.php | 8 +- app/admin/controller/FriendLink.php | 6 +- app/admin/controller/Invitation.php | 2 +- app/admin/controller/Message.php | 2 +- app/admin/controller/Poster.php | 6 +- app/admin/controller/Slides.php | 4 +- app/admin/controller/SystemConfig.php | 6 +- app/admin/view/category/index.html | 4 +- app/common.php | 10 +- app/common/constant/{Config.php => Data.php} | 2 +- app/common/model/DocumentCategory.php | 2 +- app/index/common.php | 72 +- app/index/controller/Article.php | 10 +- app/index/controller/Index.php | 8 +- public/install/js/validate.js | 2 - public/static/admin/js/Chart.js | 8 - public/template/default/info.json | 2 +- .../template/default/pc/article/detail.html | 4 +- .../default/pc/article/list_default.html | 4 +- .../default/pc/category/list_default.html | 46 +- public/template/default/pc/css/all.min.css | 1 + .../corepress.css => css/corepress-dark.css} | 82 +- .../default/pc/css/jquery.fancybox.min.css | 1 + .../default/pc/css/main-mobile-pro.css | 15 + .../template/default/pc/css/main-mobile.css | 484 +- public/template/default/pc/css/main-pro.css | 74 + public/template/default/pc/css/main.css | 2571 ++++- .../template/default/pc/css/nprogress.min.css | 1 + public/template/default/pc/index/index.html | 15 +- public/template/default/pc/js/TagCloud.js | 476 +- .../default/pc/js/comment-reply.min.js | 2 +- public/template/default/pc/js/wp-embed.min.js | 2 - .../pc/lib/fontawesome5/css/all.min.css | 8136 +------------- .../pc/lib/fontawesome5/css/brands.css | 10 - .../pc/lib/fontawesome5/css/fontawesome.css | 6116 ---------- .../default/pc/lib/fontawesome5/css/light.css | 11 - .../pc/lib/fontawesome5/css/regular.css | 11 - .../default/pc/lib/fontawesome5/css/solid.css | 12 - .../fontawesome5/webfonts/fa-brands-400.eot | Bin 0 -> 125320 bytes .../fontawesome5/webfonts/fa-brands-400.ttf | Bin 0 -> 125016 bytes .../fontawesome5/webfonts/fa-brands-400.woff | Bin 0 -> 84564 bytes .../fontawesome5/webfonts/fa-brands-400.woff2 | Bin 0 -> 72124 bytes .../fontawesome5/webfonts/fa-light-300.eot | Bin 0 -> 400640 bytes .../fontawesome5/webfonts/fa-light-300.svg | 9896 +++++++++++++++++ .../fontawesome5/webfonts/fa-light-300.ttf | Bin 0 -> 400360 bytes .../fontawesome5/webfonts/fa-regular-400.eot | Bin 0 -> 369480 bytes .../fontawesome5/webfonts/fa-regular-400.ttf | Bin 0 -> 369188 bytes .../fontawesome5/webfonts/fa-solid-900.eot | Bin 0 -> 313688 bytes .../fontawesome5/webfonts/fa-solid-900.ttf | Bin 0 -> 313408 bytes .../webfonts/fa-brands-400.eot | Bin 0 -> 125320 bytes public/template/default/pc/public/footer.html | 4 +- public/template/default/pc/public/head.html | 19 +- public/template/default/pc/public/header.html | 45 +- 54 files changed, 13721 insertions(+), 14487 deletions(-) rename app/common/constant/{Config.php => Data.php} (97%) create mode 100644 public/template/default/pc/css/all.min.css rename public/template/default/pc/{lib/highlight/style/corepress.css => css/corepress-dark.css} (52%) create mode 100644 public/template/default/pc/css/jquery.fancybox.min.css create mode 100644 public/template/default/pc/css/main-mobile-pro.css create mode 100644 public/template/default/pc/css/main-pro.css create mode 100644 public/template/default/pc/css/nprogress.min.css delete mode 100644 public/template/default/pc/js/wp-embed.min.js delete mode 100644 public/template/default/pc/lib/fontawesome5/css/brands.css delete mode 100644 public/template/default/pc/lib/fontawesome5/css/fontawesome.css delete mode 100644 public/template/default/pc/lib/fontawesome5/css/light.css delete mode 100644 public/template/default/pc/lib/fontawesome5/css/regular.css delete mode 100644 public/template/default/pc/lib/fontawesome5/css/solid.css create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-brands-400.eot create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-brands-400.ttf create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-brands-400.woff create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-brands-400.woff2 create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-light-300.eot create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-light-300.svg create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-light-300.ttf create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-regular-400.eot create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-regular-400.ttf create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-solid-900.eot create mode 100644 public/template/default/pc/lib/fontawesome5/webfonts/fa-solid-900.ttf create mode 100644 public/template/default/pc/lib/fontawesome5pro/webfonts/fa-brands-400.eot diff --git a/app/admin/controller/AuthController.php b/app/admin/controller/AuthController.php index c99ffd3..afd056c 100644 --- a/app/admin/controller/AuthController.php +++ b/app/admin/controller/AuthController.php @@ -3,7 +3,6 @@ namespace app\admin\controller; use app\common\model\AdminAuth; -use app\common\model\AdminRole; use think\facade\App; use think\facade\Lang; use think\facade\Session; @@ -49,12 +48,6 @@ abstract class AuthController extends SystemBasic */ protected $noNeedLogin = []; - /** - * 无需鉴权的方法,但需要登录 - * @var array - */ - protected $noNeedRight = []; - /** * 无需记录日志 * @var array @@ -89,7 +82,7 @@ abstract class AuthController extends SystemBasic */ protected function initialize() { - parent::initialize(); // TODO: Change the autogenerated stub + parent::initialize(); $this->adminInfo = Session::get("adminInfo"); $this->adminId = Session::get("adminId"); $this->module = App::getInstance()->http->getName(); @@ -97,7 +90,7 @@ abstract class AuthController extends SystemBasic $this->action = $this->request->action(); $this->auth = explode(",", $this->adminInfo['role_auth']??''); $this->nowAuthId = AdminAuth::getAuthId($this->module,$this->controller,$this->action); - $this->model = $this->buildModel($this->module,$this->request->controller()); + $this->model = $this->buildModel(); // 鉴权 $this->checkAuth(); // 多语言 @@ -154,14 +147,11 @@ abstract class AuthController extends SystemBasic /** * 生成model路径 - * @param string $module - * @param string $controller * @return object|\think\App|null */ - protected function buildModel(string $module, string $controller) + protected function buildModel() { $path = explode(".", $this->request->controller()); -// $modelPath = "app\\{$this->module}\\model"; $modelPath = "app\\common\\model"; //全部为common foreach ($path as $v) $modelPath .= "\\".$v; if (class_exists($modelPath)) return app($modelPath); diff --git a/app/admin/controller/Category.php b/app/admin/controller/Category.php index 6a73011..c1b65c4 100644 --- a/app/admin/controller/Category.php +++ b/app/admin/controller/Category.php @@ -2,7 +2,7 @@ namespace app\admin\controller; -use app\common\constant\Config; +use app\common\constant\Data; use app\common\model\DocumentCategory as aModel; use app\common\model\DocumentCategoryContent; use app\Request; @@ -88,7 +88,7 @@ class Category extends AuthController $res = DocumentCategoryContent::update(['content'=>$content],['id'=>$id]); } } - cache(Config::DATA_DOCUMENT_CATEGORY_LIST,null); + cache(Data::DATA_DOCUMENT_CATEGORY_LIST,null); return $res ? app("json")->success("操作成功",'code') : app("json")->fail("操作失败"); } @@ -102,7 +102,7 @@ class Category extends AuthController if (!$id) return app("json")->fail("参数有误,Id为空!"); $where = Util::postMore([['field',''],['value','']]); if ($where['field'] == '' || $where['value'] =='') return app("json")->fail("参数有误!"); - cache(Config::DATA_DOCUMENT_CATEGORY_LIST,null); + cache(Data::DATA_DOCUMENT_CATEGORY_LIST,null); return aModel::update([$where['field']=>$where['value']],['id'=>$id]) ? app("json")->success("操作成功",'code') : app("json")->fail("操作失败"); } @@ -179,7 +179,7 @@ class Category extends AuthController $model = new aModel(); $model->where('id',$where['id'])->delete(); $res = DocumentCategoryContent::where('id',$where['id'])->delete(); - cache(Config::DATA_DOCUMENT_CATEGORY_LIST,null); + cache(Data::DATA_DOCUMENT_CATEGORY_LIST,null); return $res ? app("json")->success("操作成功",'code') : app("json")->fail("操作失败"); } } \ No newline at end of file diff --git a/app/admin/controller/FriendLink.php b/app/admin/controller/FriendLink.php index 7420627..b2b9f5f 100644 --- a/app/admin/controller/FriendLink.php +++ b/app/admin/controller/FriendLink.php @@ -2,7 +2,7 @@ namespace app\admin\controller; -use app\common\constant\Config; +use app\common\constant\Data; use app\common\model\FriendLink as aModel; use app\admin\service\FormBuilderService as Form; use app\Request; @@ -124,7 +124,7 @@ class FriendLink extends AuthController $data['uid'] = $this->adminId; $res = aModel::update($data,['id'=>$id]); } - cache(Config::DATA_FRIEND_LINK,null);//清除缓存 + cache(Data::DATA_FRIEND_LINK,null);//清除缓存 return $res ? app("json")->success("操作成功",'code') : app("json")->fail("操作失败"); } @@ -140,7 +140,7 @@ class FriendLink extends AuthController if (!$id) return app("json")->fail("参数有误,Id为空!"); $where = Util::postMore([['field',''],['value','']]); if ($where['field'] == '' || $where['value'] =='') return app("json")->fail("参数有误!"); - cache(Config::DATA_FRIEND_LINK,null);//清除缓存 + cache(Data::DATA_FRIEND_LINK,null);//清除缓存 return aModel::update([$where['field']=>$where['value']],['id'=>$id]) ? app("json")->success("操作成功") : app("json")->fail("操作失败"); } } \ No newline at end of file diff --git a/app/admin/controller/Invitation.php b/app/admin/controller/Invitation.php index 82e1d56..d7a4ce8 100644 --- a/app/admin/controller/Invitation.php +++ b/app/admin/controller/Invitation.php @@ -19,7 +19,7 @@ class Invitation extends AuthController */ public function initialize() { - parent::initialize(); // TODO: Change the autogenerated stub + parent::initialize(); //修正因为修改model名称和原来不能对应导致的model功能异常 $this->model = new aModel(); } diff --git a/app/admin/controller/Message.php b/app/admin/controller/Message.php index 34aed63..fd6aa10 100644 --- a/app/admin/controller/Message.php +++ b/app/admin/controller/Message.php @@ -19,7 +19,7 @@ class Message extends AuthController */ public function initialize() { - parent::initialize(); // TODO: Change the autogenerated stub + parent::initialize(); //修正因为修改model名称和原来不能对应导致的model功能异常 $this->model = new aModel(); } diff --git a/app/admin/controller/Poster.php b/app/admin/controller/Poster.php index a57f346..13b538d 100644 --- a/app/admin/controller/Poster.php +++ b/app/admin/controller/Poster.php @@ -3,7 +3,7 @@ namespace app\admin\controller; use app\admin\service\FormBuilderService as Form; -use app\common\constant\Config; +use app\common\constant\Data; use app\common\model\Advert as aModel; use app\Request; use app\admin\service\UtilService as Util; @@ -23,7 +23,7 @@ class Poster extends AuthController */ public function initialize() { - parent::initialize(); // TODO: Change the autogenerated stub + parent::initialize(); //修正因为修改model名称和原来不能对应导致的model功能异常 $this->model = new aModel(); } @@ -145,7 +145,7 @@ class Poster extends AuthController }else { $res = aModel::update($data,['id'=>$id]); } - cache(Config::DATA_ADVERT.'_'.$data['type'],null);//清除缓存 + cache(Data::DATA_ADVERT.'_'.$data['type'],null);//清除缓存 return $res ? app("json")->success("操作成功",'code') : app("json")->fail("操作失败"); } } \ No newline at end of file diff --git a/app/admin/controller/Slides.php b/app/admin/controller/Slides.php index 597209f..cc50234 100644 --- a/app/admin/controller/Slides.php +++ b/app/admin/controller/Slides.php @@ -2,7 +2,7 @@ namespace app\admin\controller; -use app\common\constant\Config; +use app\common\constant\Data; use app\common\model\Slides as aModel; use app\admin\service\FormBuilderService as Form; use app\Request; @@ -121,7 +121,7 @@ class Slides extends AuthController }else { $res = aModel::update($data,['id'=>$id]); } - cache(Config::DATA_BANNER,null);//清除缓存 + cache(Data::DATA_BANNER,null);//清除缓存 return $res ? app("json")->success("操作成功",'code') : app("json")->fail("操作失败"); } } \ No newline at end of file diff --git a/app/admin/controller/SystemConfig.php b/app/admin/controller/SystemConfig.php index df93d44..f1b5208 100644 --- a/app/admin/controller/SystemConfig.php +++ b/app/admin/controller/SystemConfig.php @@ -2,7 +2,7 @@ namespace app\admin\controller; -use app\common\constant\Config; +use app\common\constant\Data; use app\common\model\SystemConfig as cModel; use app\common\model\SystemConfigTab as tModel; use app\Request; @@ -185,7 +185,7 @@ class SystemConfig extends AuthController $res = cModel::update($data,['id'=>$id]); } //修改完需要更新缓存 - cache(Config::DATA_SYSTEM_CONFIG,null);//清除缓存 + cache(Data::DATA_SYSTEM_CONFIG,null);//清除缓存 return $res ? app("json")->success("操作成功",'code') : app("json")->fail("操作失败"); } @@ -198,7 +198,7 @@ class SystemConfig extends AuthController { try { foreach ($request->param() as $k => $v) cModel::editValueByFormName($k,$v); - cache(Config::DATA_SYSTEM_CONFIG,null);//清除缓存 + cache(Data::DATA_SYSTEM_CONFIG,null);//清除缓存 return app("json")->success("操作成功"); }catch (\Exception $e) { diff --git a/app/admin/view/category/index.html b/app/admin/view/category/index.html index 51438e8..ca78824 100644 --- a/app/admin/view/category/index.html +++ b/app/admin/view/category/index.html @@ -86,7 +86,7 @@ title: '名称', }, { - field: 'display', + field: 'status', title: '是否可见', formatter: function (value, row, index) { if (value == 0) { @@ -94,7 +94,7 @@ } else if (value == 1){ is_checked = 'checked="checked"'; } - var field = "display"; + var field = "status"; result = ''; return result; }, diff --git a/app/common.php b/app/common.php index 0657415..86fb3a3 100644 --- a/app/common.php +++ b/app/common.php @@ -1,6 +1,6 @@ field(['id','pid','title','sort','display'])->order('sort asc,id asc'); + $model = $model->field(['id','pid','title','sort','status'])->order('sort asc,id asc'); if (isset($where['title']) && $where['title'] != '') $model = $model->where("title|id","like","%$where[title]%"); $data = $model->select()->toArray(); return $data ?: []; diff --git a/app/index/common.php b/app/index/common.php index 11568be..c09e91d 100644 --- a/app/index/common.php +++ b/app/index/common.php @@ -3,7 +3,7 @@ // +---------------------------------------------------------------------- use think\facade\Db; use think\Exception; -use app\common\constant\Config; +use app\common\constant\Data; use app\common\model\DocumentCategoryContent; use app\common\model\DocumentCategory; use app\common\model\Document; @@ -49,7 +49,7 @@ function get_type_content($id, $strip = false) function get_document_category_list() { //缓存文章菜单 - $documentCategory = cache(Config::DATA_DOCUMENT_CATEGORY_LIST); + $documentCategory = cache(Data::DATA_DOCUMENT_CATEGORY_LIST); if ($documentCategory === null) { $documentCategoryList = DocumentCategory::where('status', 1)->order('sort asc')->select()->toArray(); //转换,让id作为数组的键 @@ -59,7 +59,7 @@ function get_document_category_list() $item['url'] = curl($item); $documentCategory[$item['id']] = $item; } - cache(Config::DATA_DOCUMENT_CATEGORY_LIST, $documentCategory); + cache(Data::DATA_DOCUMENT_CATEGORY_LIST, $documentCategory); } return $documentCategory; } @@ -114,25 +114,37 @@ function get_document_category_by_name($name, $field = false) /** * 模板-获取文章分类 + * @param $type + * @param $typeid + * @param int $row + * @param string $where + * @param string $orderby + * @return DocumentCategory[]|array|bool|\think\Collection + * @throws Exception + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + * @author 李玉坤 + * @date 2021-11-12 21:48 */ -function tpl_get_channel($type, $typeid, $row = 100, $where = '', $orderby = '', $display = 1) +function tpl_get_channel($type, $typeid, $row = 100, $where = '', $orderby = '') { switch ($type) { case "all": //获取顶级分类 - return get_document_category_all($display); + return get_document_category_all(); break; case 'top': //获取顶级分类 - return get_document_category_by_parent(0, $row, $display); + return get_document_category_by_parent(0, $row); break; case 'son': //获取子级分类 if (!$typeid) { throw new Exception('请指定要获取的栏目分类id!'); } - return get_document_category_by_parent($typeid, $row, $display); + return get_document_category_by_parent($typeid, $row); break; case 'self': //获取同级分类 @@ -143,7 +155,7 @@ function tpl_get_channel($type, $typeid, $row = 100, $where = '', $orderby = '', if (!$dc) { return false; } - return get_document_category_by_parent($dc['pid'], $row, $display);; + return get_document_category_by_parent($dc['pid'], $row);; break; case 'find': //获取所有子孙分类,此操作读取数据库,非缓存! @@ -155,9 +167,6 @@ function tpl_get_channel($type, $typeid, $row = 100, $where = '', $orderby = '', throw new Exception('分类不存在或已删除!'); } $tempArr = DocumentCategory::where('id', 'in', $dc['child'])->where('status', 1)->limit($row); - if ($display) { - $tempArr = $tempArr->where('display', 1); - } $tempArr = $tempArr->select(); foreach ($tempArr as $key => $item) { //根据栏目类型,生成栏目url @@ -186,13 +195,8 @@ function tpl_get_channel($type, $typeid, $row = 100, $where = '', $orderby = '', //获取根分类,此操作读取数据库,非缓存! $dc = DocumentCategory::where('pid', 0)->where('status', 1) ->where("CONCAT(',',child,',') like '%,$typeid,%'")->limit($row); - if ($display) { - $dc = $dc->where('display', 1); - } $dc = $dc->find(); } - - //根据栏目类型,生成栏目url $dc['url'] = curl($dc); $tempArr = []; @@ -202,9 +206,6 @@ function tpl_get_channel($type, $typeid, $row = 100, $where = '', $orderby = '', case 'where': //根据自定义条件获取分类(where语句),此操作读取数据库,非缓存! $tempArr = DocumentCategory::where('status', 1)->where($where)->order($orderby)->limit($row); - if ($display) { - $tempArr = $tempArr->where('display', 1); - } $tempArr = $tempArr->select(); foreach ($tempArr as $key => $item) { //根据栏目类型,生成栏目url @@ -216,9 +217,6 @@ function tpl_get_channel($type, $typeid, $row = 100, $where = '', $orderby = '', case 'ids': //根据多个栏目id,逗号隔开的那种,获得栏目列表 $tempArr = DocumentCategory::where('status', 1)->where('id', 'in', $typeid)->order($orderby)->limit($row); - if ($display) { - $tempArr = $tempArr->where('display', 1); - } $tempArr = $tempArr->select(); foreach ($tempArr as $key => $item) { //根据栏目类型,生成栏目url @@ -239,7 +237,7 @@ function tpl_get_channel($type, $typeid, $row = 100, $where = '', $orderby = '', * $pid=父级id * $row=获取多少数目 */ -function get_document_category_by_parent($pid, $row, $display = 1) +function get_document_category_by_parent($pid, $row) { $documentCategoryList = get_document_category_list(); $x = 1; @@ -248,7 +246,7 @@ function get_document_category_by_parent($pid, $row, $display = 1) if ($x > $row) { break; } - if ($item['pid'] == $pid && ($display ? $item['display'] == 1 : true)) { + if ($item['pid'] == $pid) { $x = $x + 1; array_push($tempArr, $item); } @@ -256,17 +254,15 @@ function get_document_category_by_parent($pid, $row, $display = 1) return $tempArr; } -function get_document_category_all( $display = 1) +function get_document_category_all() { $documentCategoryList = get_document_category_list(); $tempArr = array(); foreach ($documentCategoryList as $item) { - if (($display ? $item['display'] == 1 : true)) { - if ($item['pid'] == 0){ - $tempArr[$item['id']] = $item; - }else{ - $tempArr[$item['pid']]['child'][] = $item; - } + if ($item['pid'] == 0){ + $tempArr[$item['id']] = $item; + }else{ + $tempArr[$item['pid']]['child'][] = $item; } } return $tempArr; @@ -537,10 +533,10 @@ function tpl_get_product_list($cid, $row, $orderby, $table = 'article', $type = */ function tpl_get_friend_link($type, $row) { - $flinkList = cache(Config::DATA_FRIEND_LINK); + $flinkList = cache(Data::DATA_FRIEND_LINK); if ($flinkList === null) { $flinkList = FriendLink::where('status', 1)->order('sort asc')->limit($row)->select(); - cache(Config::DATA_FRIEND_LINK, $flinkList); + cache(Data::DATA_FRIEND_LINK, $flinkList); } if ($type === 0) { return $flinkList; @@ -559,10 +555,10 @@ function tpl_get_friend_link($type, $row) */ function tpl_get_banner($type, $row) { - $bannerList = cache(Config::DATA_BANNER); + $bannerList = cache(Data::DATA_BANNER); if ($bannerList === null) { $bannerList = Db::name('slides')->where('status', 1)->order('sort asc')->limit($row)->select(); - cache(Config::DATA_BANNER, $bannerList); + cache(Data::DATA_BANNER, $bannerList); } if ($type === 0) { return $bannerList; @@ -617,10 +613,10 @@ if (!function_exists('web_config')) { */ function web_config(string $formName): string { - $webConfig = cache(Config::DATA_SYSTEM_CONFIG); + $webConfig = cache(Data::DATA_SYSTEM_CONFIG); if (empty($webConfig)) { $webConfig = Db::name('system_config')->where("status", 1)->column('value', 'form_name'); - cache(Config::DATA_SYSTEM_CONFIG, $webConfig); + cache(Data::DATA_SYSTEM_CONFIG, $webConfig); } return $webConfig[$formName] ?? ''; } @@ -755,7 +751,7 @@ function IsActiveNav($curr_cid = false, $cid = false) } //判断是否在同一栏目树下。 - $parent_id = cache(Config::CURR_CATEGORY_PATENT_ID); + $parent_id = cache(Data::CURR_CATEGORY_PATENT_ID); $parent_id = explode(',', $parent_id); diff --git a/app/index/controller/Article.php b/app/index/controller/Article.php index a38cd3c..4063b36 100644 --- a/app/index/controller/Article.php +++ b/app/index/controller/Article.php @@ -8,7 +8,7 @@ use app\common\model\Comment as commentModel; use app\common\model\Tag as TagModel; use app\Request; use think\facade\Log; -use app\common\constant\Config; +use app\common\constant\Data; /** * 应用入口 @@ -90,7 +90,7 @@ class Article extends Base //当前页面所属分类id $this->assign('cid',$id); //缓存当前页面栏目分类树ids - cache(Config::CURR_CATEGORY_PATENT_ID,$dc['pid']?$dc['pid'].','.$id:$id); + cache(Data::CURR_CATEGORY_PATENT_ID,$dc['pid']?$dc['pid'].','.$id:$id); //去除后缀 $listTmp = substr($listTmp,0,strpos($listTmp,'.')); return $this->fetch('category/'.$listTmp); @@ -156,7 +156,7 @@ class Article extends Base //当前页面所属分类id $this->assign('cid',$article['category_id']); //缓存当前页面栏目分类树ids - cache(Config::CURR_CATEGORY_PATENT_ID,$dc['pid']?$dc['pid'].','.$article['category_id']:$article['category_id']); + cache(Data::CURR_CATEGORY_PATENT_ID,$dc['pid']?$dc['pid'].','.$article['category_id']:$article['category_id']); //设置文章的url $article['link_str']=aurl($article); //判断后台统计配置是否开启 1 开启 @@ -228,7 +228,7 @@ class Article extends Base $this->assign('tag',$tag); //清除可能存在的栏目分类树id - cache(Config::CURR_CATEGORY_PATENT_ID,false); + cache(Data::CURR_CATEGORY_PATENT_ID,false); //模板兼容性标签 $this->assign('id',false); $this->assign('cid',false); @@ -285,7 +285,7 @@ class Article extends Base $this->assign('apeField',$apeField); $this->assign('kw',$kw); //清除可能存在的栏目分类树id - cache(Config::CURR_CATEGORY_PATENT_ID,false); + cache(Data::CURR_CATEGORY_PATENT_ID,false); //模板兼容性标签 $this->assign('id',false); $this->assign('cid',false); diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index 478c748..abcfa2b 100644 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -6,7 +6,7 @@ use app\common\model\FriendLink as friendLinkModel; use app\common\validate\MessageForm as MessageformValidate; use app\common\model\MessageForm as MessageFormModel; use app\Request; -use app\common\constant\Config; +use app\common\constant\Data; /** * 应用入口 @@ -26,7 +26,7 @@ class Index extends Base $this->urlrecord('网站首页'); } //清除可能存在的栏目分类树id - cache(Config::CURR_CATEGORY_PATENT_ID,false); + cache(Data::CURR_CATEGORY_PATENT_ID,false); //模板兼容性标签 $this->assign('id',false); $this->assign('cid',false); @@ -70,7 +70,7 @@ class Index extends Base } } else { //清除可能存在的栏目分类树id - cache(Config::CURR_CATEGORY_PATENT_ID,false); + cache(Data::CURR_CATEGORY_PATENT_ID,false); //模板兼容性标签 $this->assign('id',false); $this->assign('cid',false); @@ -110,7 +110,7 @@ class Index extends Base } } else { //清除可能存在的栏目分类树id - cache(Config::CURR_CATEGORY_PATENT_ID,false); + cache(Data::CURR_CATEGORY_PATENT_ID,false); //模板兼容性标签 $this->assign('id',false); $this->assign('cid',false); diff --git a/public/install/js/validate.js b/public/install/js/validate.js index 95f5960..3a909c1 100644 --- a/public/install/js/validate.js +++ b/public/install/js/validate.js @@ -1093,7 +1093,6 @@ $.extend($.validator, { // http://docs.jquery.com/Plugins/Validation/Methods/equalTo equalTo: function(value, element, param) { // bind to the blur event of the target in order to revalidate whenever the target field is updated - // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() { $(element).valid(); }); @@ -1149,7 +1148,6 @@ $.format = $.validator.format; // handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target ;(function($) { // only implement if not provided by jQuery core (since 1.4) - // TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) { $.each({ focus: 'focusin', diff --git a/public/static/admin/js/Chart.js b/public/static/admin/js/Chart.js index 647eaf1..e2931f0 100644 --- a/public/static/admin/js/Chart.js +++ b/public/static/admin/js/Chart.js @@ -2023,7 +2023,6 @@ module.exports = { this._config = config; // Lenient ordinal parsing accepts just a number in addition to // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. - // TODO: Remove "ordinalParse" fallback in next major release. this._dayOfMonthOrdinalParseLenient = new RegExp( (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + (/\d{1,2}/).source); @@ -2666,7 +2665,6 @@ module.exports = { this._shortMonthsParse = []; } - // TODO: add sorting // Sorting makes sure if one month (or abbr) is a prefix of another // see sorting in computeMonthsParse for (i = 0; i < 12; i++) { @@ -2706,7 +2704,6 @@ module.exports = { value = toInt(value); } else { value = mom.localeData().monthsParse(value); - // TODO: Another silent failure? if (!isNumber(value)) { return mom; } @@ -3494,7 +3491,6 @@ module.exports = { function loadLocale(name) { var oldLocale = null; - // TODO: Find a better way to register and load all the locales in Node if (!locales[name] && (typeof module !== 'undefined') && module && module.exports) { try { @@ -3774,7 +3770,6 @@ module.exports = { dow = 1; doy = 4; - // TODO: We need to take the current isoWeekYear, but that depends on // how we interpret now (local, utc, fixed offset). So create // a now version of current config (take local/utc/offset flags, and // create now). @@ -3949,7 +3944,6 @@ module.exports = { function checkWeekday(weekdayStr, parsedInput, config) { if (weekdayStr) { - // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); if (weekdayProvided !== weekdayActual) { @@ -4053,7 +4047,6 @@ module.exports = { // date from string and format string function configFromStringAndFormat(config) { - // TODO: Move this to another part of the creation flow to prevent circular deps if (config._f === hooks.ISO_8601) { configFromISO(config); return; @@ -4348,7 +4341,6 @@ module.exports = { return res; } - // TODO: Use [].sort instead? function min () { var args = [].slice.call(arguments, 0); diff --git a/public/template/default/info.json b/public/template/default/info.json index 692370b..a8e4588 100644 --- a/public/template/default/info.json +++ b/public/template/default/info.json @@ -1,6 +1,6 @@ { "title":"默认主题", - "author":"MonkeyCode", + "author":"木子的忧伤", "demo_url":"http://default.lcm.wang/", "category_list":[ { diff --git a/public/template/default/pc/article/detail.html b/public/template/default/pc/article/detail.html index 42ce01d..6ea6877 100644 --- a/public/template/default/pc/article/detail.html +++ b/public/template/default/pc/article/detail.html @@ -177,7 +177,7 @@
w6GU*HtmOQk1kN}G@$?BQ)%@I^VE9$qPy>W+0
z6%^YSE(5EuljPqQ$ej*+Czn@0GxIDuK%PN;ixY5T%tG$#Y6sE@gpRY^5^gD-H|Dlw8ms2q
zXf?ilA-Hl~5Q(K5+!8k(UPd@fttu0_Z5Hdrf<}W(71Qs~(83BCd*}s#vSFoO*6fgR
zzz(Kj;
Y6DSn)qL$DKfm9&Bxx7G2c&CCr+J#)B?;2=RPUJQ9MS0y!_{uJQ*(Y
z|4IR}ye5%}4de+cSn~Iy_150>u2SxiQm)qAlXy!pzkg5qrDA^X9=zpJZqJ^?SSsi6
z=MBZY+QY&FsnVHTE*Is`m=IG)i|22tA}}iH>tx(ncn_VCRpF;@^gXI^9Kqb&?jU;pt#X>cQ6i
zl^2xM