AuthController.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. /**
  3. * 会员中心模块
  4. * @author wesmiler
  5. */
  6. namespace app\weixin\controller;
  7. use app\weixin\model\Member;
  8. use app\weixin\model\Wechat;
  9. use app\weixin\service\PRedis;
  10. use app\weixin\validate\MemberValidate;
  11. use think\Request;
  12. class AuthController extends BaseController
  13. {
  14. public function __construct()
  15. {
  16. parent::__construct();
  17. $needRegProfile = session('needRegProfile');
  18. if($needRegProfile == true){
  19. Wechat::redirectUrl(url('/weixin/index/entry', '', '', true));
  20. exit;
  21. }
  22. }
  23. /**
  24. * 认证
  25. * @return mixed
  26. */
  27. public function index()
  28. {
  29. return $this->fetch();
  30. }
  31. /**
  32. * VIP认证
  33. * @return mixed
  34. */
  35. public function vip()
  36. {
  37. return $this->fetch();
  38. }
  39. /**
  40. * 人工牵线
  41. * @return mixed
  42. */
  43. public function hand()
  44. {
  45. return $this->fetch();
  46. }
  47. /**
  48. * 身份证认证
  49. * @return mixed
  50. */
  51. public function idcard()
  52. {
  53. $params = input();
  54. $data = isset($params['data'])? $params['data'] : [];
  55. $bizNo = isset($data['bizNo'])? $data['bizNo'] : '';
  56. PRedis::set("caches:faceAuth:result:{$bizNo}", $params, 3600);
  57. return $this->fetch();
  58. }
  59. /**
  60. * 学历认证
  61. * @return mixed
  62. */
  63. public function education()
  64. {
  65. return $this->fetch();
  66. }
  67. /**
  68. * 职位认证
  69. * @return mixed
  70. */
  71. public function position()
  72. {
  73. return $this->fetch();
  74. }
  75. }