123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <?php
- namespace App\Http\Controllers\User;
- use App\Http\Controllers\Controller;
- use App\Http\Controllers\Core\Auth;
- use App\Services\User\SignService;
- use Illuminate\Http\Request;
- /**
- * Class SignController
- * @package App\Http\Controllers\User
- */
- class SignController extends Controller
- {
- /**
- * 今日签到情况
- */
- public function today()
- {
- $uid = Auth::auth();
- $ss = new SignService();
- $data = $ss->today($uid);
- return response([
- 'code' => 200,
- 'message' => 'success',
- 'data' => $data
- ]);
- }
- /**
- * 签到
- * @throws \App\Exceptions\AlertException
- */
- public function sign(Request $request)
- {
- $uid = Auth::auth();
- $platform = $request->header('platform');
- $signService = new SignService();
- $signService->sign($uid, $platform);
- return response([
- 'code' => 200,
- 'message' => 'success'
- ]);
- }
- /**
- * 领取小花奖励
- * @throws \App\Exceptions\AlertException
- */
- public function rewardFlower()
- {
- $uid = Auth::auth();
- $signService = new SignService();
- $flower = $signService->rewardFlower($uid);
- return response([
- 'code' => 200,
- 'message' => 'success',
- 'data' => compact("flower")
- ]);
- }
- /**
- * 领取人气值奖励
- * @throws \App\Exceptions\AlertException
- */
- public function rewardPopularity()
- {
- $uid = Auth::auth();
- $signService = new SignService();
- $popularity = $signService->rewardPopularity($uid);
- return response([
- 'code' => 200,
- 'message' => 'success',
- 'data' => compact("popularity")
- ]);
- }
- /**
- * 领取解锁次数
- * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response
- * @throws \App\Exceptions\AlertException
- * @throws \Tymon\JWTAuth\Exceptions\JWTException
- */
- public function rewardUnLookCard()
- {
- $uid = Auth::auth();
- $signService = new SignService();
- $signService->rewardUnLookCard($uid);
- return response([
- 'code' => 200,
- 'message' => 'OK'
- ]);
- }
- /**
- * 领取72h卡券满减券
- * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response
- * @throws \App\Exceptions\AlertException
- * @throws \Tymon\JWTAuth\Exceptions\JWTException
- */
- public function rewardCouponSuperVip()
- {
- $uid = Auth::auth();
- $signService = new SignService();
- $couponSuperVip = $signService->rewardCouponSuperVip($uid);
- return response([
- 'code' => 200,
- 'message' => 'success',
- 'data' => compact("couponSuperVip")
- ]);
- }
- /**
- * 72小时折扣券
- * @throws \App\Exceptions\AlertException
- */
- public function rewardCoupon72Dis()
- {
- $uid = Auth::auth();
- $signService = new SignService();
- $coupon72dis = $signService->rewardCoupon72Dis($uid);
- return response([
- 'code' => 200,
- 'message' => 'success',
- 'data' => compact("coupon72dis")
- ]);
- }
- /**
- * 72h报名入场券
- * @throws \App\Exceptions\AlertException
- */
- public function rewardCoupon72Pair()
- {
- $uid = Auth::auth();
- $signService = new SignService();
- $coupon72pair = $signService->rewardCoupon72Pair($uid);
- return response([
- 'code' => 200,
- 'message' => 'success',
- 'data' => compact("coupon72pair")
- ]);
- }
- }
|