123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <?php
- namespace App\Http\Controllers\Share;
- use App\Http\Controllers\Controller;
- use App\Http\Controllers\Core\Auth;
- use App\Services\Share\PopularitySharehelpService;
- use Illuminate\Http\Request;
- /**
- * Class PopularitySharehelpController
- * @package App\Http\Controllers\Share
- */
- class PopularitySharehelpController extends Controller
- {
- /**
- * 人气值分享助力
- * @param int $share_uid
- * @return array
- * @throws \App\Exceptions\AlertException
- */
- public function check(int $share_uid)
- {
- $uid = Auth::auth();
- $pshs = new PopularitySharehelpService();
- $data = $pshs->check($share_uid, $uid);
- return response([
- 'code' => 200,
- 'message' => 'success',
- 'data' => $data
- ]);
- }
- /**
- * 助力页概览
- */
- public function helpOverView()
- {
- $uid = Auth::auth();
- $pshs = new PopularitySharehelpService();
- $data = $pshs->helpOverView($uid);
- return response([
- 'code' => 200,
- 'message' => 'success',
- 'data' => $data
- ]);
- }
- /**
- * 加持中的助力
- * @param Request $request
- * @return array
- */
- public function inglist(Request $request)
- {
- $uid = Auth::auth();
- $page = $request->get('page') ?? 1;
- $pages = array(
- 'limit' => 20,
- 'page' => $page
- );
- $psgs = new PopularitySharehelpService();
- $data = $psgs->inglist($uid, $pages);
- return response([
- 'code' => 200,
- 'message' => 'success',
- 'data' => $data
- ]);
- }
- /**
- * 失效的助力
- * @param Request $request
- * @return array
- */
- public function historylist(Request $request)
- {
- $uid = Auth::auth();
- $page = $request->get('page') ?? 1;
- $pages = array(
- 'limit' => 20,
- 'page' => $page
- );
- $popularityShareHelpService = new PopularitySharehelpService();
- $data = $popularityShareHelpService->historylist($uid, $pages);
- return response([
- 'code' => 200,
- 'message' => 'success',
- 'data' => $data
- ]);
- }
- }
|