AuthController.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace App\Modules\Mini\Controllers;
  3. use App\Base\BaseController;
  4. use Faker\Provider\Image;
  5. class AuthController extends BaseController
  6. {
  7. public function codeToSession()
  8. {
  9. return $this->ok([
  10. "openid" => "openid",
  11. "session_key" => "session_key",
  12. "token" => "token",
  13. "name" => "",
  14. "phone" => "",
  15. ]);
  16. }
  17. public function decryptUserInfo()
  18. {
  19. return $this->ok([
  20. "token" => "token",
  21. "name" => "",
  22. "phone" => "",
  23. ]);
  24. }
  25. public function decryptPhone()
  26. {
  27. return $this->ok([
  28. "token" => "token",
  29. "name" => "",
  30. "phone" => "",
  31. ]);
  32. }
  33. public function profile()
  34. {
  35. return $this->ok([
  36. "id" => 1,
  37. "token" => "token",
  38. "name" => "用户名称",
  39. "avatar" => Image::imageUrl(),
  40. "company" => [
  41. "id" => 1,
  42. "name" => "公司名称",
  43. ],
  44. ]);
  45. }
  46. }