ZxcZxc123 2 years ago
parent
commit
399f9c88e4
2 changed files with 13 additions and 12 deletions
  1. 1 0
      app/model/api/EducationModel.php
  2. 12 12
      app/system/route/educationController.php

+ 1 - 0
app/model/api/EducationModel.php

@@ -37,6 +37,7 @@ class EducationModel extends Model
                 $items [$item ['pid']] ['children'] [$item ['id']] = &$items [$item ['id']];
             } else {
                 $tree [$item ['id']] = &$items [$item ['id']];
+                $tree [$item ['id']] ['children'] = array();
             }
         }
 

+ 12 - 12
app/system/route/educationController.php

@@ -14,20 +14,20 @@ use think\facade\Route;
 
 //@基础数据
 Route::group('educationController', function () {
-//    //@获取初始数据
-//    Route::rule('init', 'Index/init');
-//    //@获取地区
-//    Route::rule('getArea','Index/getArea');
-//    //@获取快单礼包
-//    Route::rule('express','Index/express');
-//    //@首页基础数据
-//    Route::rule('getIndex', 'Index/getIndex');
-//    //@订单统计
-//    Route::rule('getOrderTotal','Index/getOrderTotal');
-//    //@获取提现方式
-//    Route::rule('getTxType', 'Index/getTxType');
     //获取分类列表
     Route::rule('getCateList','educationController/getCateList');
+    //获取所有文章列表
+    Route::rule('gteArticleList','educationController/gteArticleList');
+    //获取顶级分类
+    Route::rule('getTopCate','educationController/getTopCate');
+    //获取指定分类的子分类 ID 列表
+    Route::rule('getSubcatesByTopCate','educationController/getSubcatesByTopCate');
+    //修改分类
+    Route::rule('editCate','educationController/editCate');
+    //增加一个分类
+    Route::rule('cateadd','educationController/cateadd');
+    //删除分类
+    Route::rule();
 
 
 })->middleware([