huwhois 2 years ago
parent
commit
196a08a48f
1 changed files with 5 additions and 7 deletions
  1. 5 7
      app/sys/controller/Article.php

+ 5 - 7
app/sys/controller/Article.php

@@ -17,12 +17,8 @@ use think\facade\Config;
 
 use app\common\model\Category as CategoryModel;
 use app\common\model\Article as ArticleModel;
-use app\common\service\FileService;
 use app\common\facade\FileUtils;
 
-/**
- * 文章管理控制器
- */
 class Article extends Base
 {
     protected $modelName = "Article";
@@ -39,10 +35,12 @@ class Article extends Base
 
         $list = ArticleModel::queryPage($params);
 
-        View::assign('category_tree', $category_tree);
+        View::assign([
+            'category_tree' => $category_tree,
+            'list' => $list,
+            'cid' => $cid
+        ]);
 
-        View::assign('list', $list);
-        View::assign('cid', $cid);
         return View::fetch();
     }