mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-23 03:50:56 +08:00
Merge branch 'koogua/I3IVLN' into develop
This commit is contained in:
commit
f48f0c2545
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Api\Controllers;
|
namespace App\Http\Api\Controllers;
|
||||||
|
|
||||||
use App\Services\Logic\Page\ArticleInfo as PageInfoService;
|
use App\Services\Logic\Page\PageInfo as PageInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @RoutePrefix("/api/page")
|
* @RoutePrefix("/api/page")
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Api\Controllers;
|
namespace App\Http\Api\Controllers;
|
||||||
|
|
||||||
|
use App\Services\Logic\Search\Article as ArticleSearchService;
|
||||||
use App\Services\Logic\Search\Course as CourseSearchService;
|
use App\Services\Logic\Search\Course as CourseSearchService;
|
||||||
use App\Services\Logic\Search\Group as GroupSearchService;
|
use App\Services\Logic\Search\Group as GroupSearchService;
|
||||||
use App\Services\Logic\Search\User as UserSearchService;
|
use App\Services\Logic\Search\User as UserSearchService;
|
||||||
@ -39,11 +40,14 @@ class SearchController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @return CourseSearchService|GroupSearchService|UserSearchService
|
* @return ArticleSearchService|CourseSearchService|GroupSearchService|UserSearchService
|
||||||
*/
|
*/
|
||||||
protected function getSearchService($type)
|
protected function getSearchService($type)
|
||||||
{
|
{
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
|
case 'article':
|
||||||
|
$service = new ArticleSearchService();
|
||||||
|
break;
|
||||||
case 'group':
|
case 'group':
|
||||||
$service = new GroupSearchService();
|
$service = new GroupSearchService();
|
||||||
break;
|
break;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Http\Api\Controllers;
|
namespace App\Http\Api\Controllers;
|
||||||
|
|
||||||
|
use App\Services\Logic\User\ArticleList as UserArticleListService;
|
||||||
use App\Services\Logic\User\CourseList as UserCourseListService;
|
use App\Services\Logic\User\CourseList as UserCourseListService;
|
||||||
use App\Services\Logic\User\FavoriteList as UserFavoriteListService;
|
|
||||||
use App\Services\Logic\User\FriendList as UserFriendListService;
|
use App\Services\Logic\User\FriendList as UserFriendListService;
|
||||||
use App\Services\Logic\User\GroupList as UserGroupListService;
|
use App\Services\Logic\User\GroupList as UserGroupListService;
|
||||||
use App\Services\Logic\User\UserInfo as UserInfoService;
|
use App\Services\Logic\User\UserInfo as UserInfoService;
|
||||||
@ -39,11 +39,11 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Get("/{id:[0-9]+}/favorites", name="api.user.favorites")
|
* @Get("/{id:[0-9]+}/articles", name="api.user.articles")
|
||||||
*/
|
*/
|
||||||
public function favoritesAction($id)
|
public function articlesAction($id)
|
||||||
{
|
{
|
||||||
$service = new UserFavoriteListService();
|
$service = new UserArticleListService();
|
||||||
|
|
||||||
$pager = $service->handle($id);
|
$pager = $service->handle($id);
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace App\Http\Home\Controllers;
|
namespace App\Http\Home\Controllers;
|
||||||
|
|
||||||
use App\Http\Home\Services\Index as IndexService;
|
use App\Http\Home\Services\Index as IndexService;
|
||||||
use App\Services\Logic\Page\ArticleInfo as PageInfoService;
|
use App\Services\Logic\Page\PageInfo as PageInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @RoutePrefix("/page")
|
* @RoutePrefix("/page")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user