MayCurController.php 1002 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Service\MayCurServerService;
  4. use Illuminate\Http\Request;
  5. class MayCurController extends BaseController
  6. {
  7. public function getToken(Request $request){
  8. list($bool, $data) = (new MayCurServerService())->getToken();
  9. if($bool){
  10. return $this->json_return(200,'',$data);
  11. }else{
  12. return $this->json_return(201,$data);
  13. }
  14. }
  15. public function reimburse(Request $request){
  16. list($bool, $data) = (new MayCurServerService())->reimburse($request->all());
  17. if($bool){
  18. return $this->json_return(200,'',$data);
  19. }else{
  20. return $this->json_return(201,$data);
  21. }
  22. }
  23. public function loan(Request $request){
  24. list($bool, $data) = (new MayCurServerService())->loan($request->all());
  25. if($bool){
  26. return $this->json_return(200,'',$data);
  27. }else{
  28. return $this->json_return(201,$data);
  29. }
  30. }
  31. }