|
|
@@ -4,10 +4,9 @@ namespace App\Http\Controllers\Api\v1;
|
|
|
|
|
|
use App\Http\Controllers\Api\webApp;
|
|
|
use App\Services\Api\ArticleService;
|
|
|
-use App\Services\ConfigService;
|
|
|
|
|
|
/**
|
|
|
- * 司文章管理
|
|
|
+ * 文章管理
|
|
|
* Class ArticleController
|
|
|
* @package App\Http\Controllers\Api
|
|
|
*/
|
|
|
@@ -44,37 +43,6 @@ class ArticleController extends webApp
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- /**
|
|
|
- * 客服推荐数据
|
|
|
- */
|
|
|
- public function customRecommend()
|
|
|
- {
|
|
|
- $cateList = ArticleService::make()->getCateList(2);
|
|
|
- $cateId = isset($cateList[0])? $cateList[0]['id'] : 0;
|
|
|
- $datas = [
|
|
|
- 'category'=> $cateList,
|
|
|
- 'recommend'=> ArticleService::make()->getCustomRecommend($cateId),
|
|
|
- ];
|
|
|
- return message(1010, true, $datas);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 客服咨询数据
|
|
|
- */
|
|
|
- public function custom()
|
|
|
- {
|
|
|
- $type = request()->post('type',0);
|
|
|
- $keyword = request()->post('keyword','');
|
|
|
- $num = request()->post('num',6);
|
|
|
- $datas = ArticleService::make()->getCustomRecommend($type, $num, $keyword, $type==0?true:false);
|
|
|
- if($datas){
|
|
|
- return message(1010, true, $datas);
|
|
|
- }else{
|
|
|
- return message(1009, false);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 单页数据
|
|
|
*/
|