| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace App\Http\Controllers\Admin;
- use App\Services\Common\ArticleService;
- /**
- * 文章
- * Class ArticleController
- * @package App\Http\Controllers\Admin
- */
- class ArticleController extends Backend
- {
- public function __construct()
- {
- parent::__construct();
- $this->service = new ArticleService();
- }
- /**
- * 获取列表
- * @return array|mixed
- */
- public function index()
- {
- $pageSize = request()->post('limit', 15);
- $params = request()->all();
- $list = ArticleService::make()->getDataList($params, $pageSize);
- $message = array(
- "msg" => '操作成功',
- "code" => 0,
- "data" => isset($list['list'])? $list['list']:[],
- "count" => isset($list['total'])? $list['total']:0,
- );
- return $message;
- }
- /**
- * 发布广告
- * @return array|mixed
- */
- public function edit()
- {
- return ArticleService::make()->edit();
- }
- }
|