VipController.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * VipController.php UTF-8
  4. * VIP
  5. *
  6. * @date : 2017/11/15 22:06
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : wuyonghong <wyh@huosdk.com>
  10. * @version : HUOSDK 8.0
  11. */
  12. namespace api\wapapp\controller\v8;
  13. use api\common\controller\ApiBaseController;
  14. class VipController extends ApiBaseController {
  15. public function __construct() {
  16. parent::__construct();
  17. }
  18. /**
  19. * VIP鉴权
  20. * http://doc.1tsdk.com/95?page_id=2396
  21. * 【域名】/v8/user/auth
  22. *
  23. */
  24. public function checkAuth() {
  25. $_mem_id = $this->mem_id;
  26. $_params = $this->request->post();
  27. if (empty($_mem_id)) {
  28. if (empty($_params['mobile']) || empty($_params['mobile_prefix'])) {
  29. $this->error(lang('check fail'));
  30. }
  31. }
  32. // $_post_class = new Member();
  33. // $_code = 200;
  34. // $_data = [];
  35. // try {
  36. // $_post_class->getDetail($_param['id']);
  37. // } catch (HuoException $he) {
  38. // $_code = $he->getCode();
  39. // $_data = $he->getData();
  40. // }
  41. // if (200 != $_code) {
  42. // $this->error(lang(config('error.'.$_code)), $_data, $_code);
  43. // }
  44. // $this->success(lang('SUCCESS'), $_data);
  45. $_rdata['is_vip'] = 1;
  46. $_rdata['need_pay'] = 1;
  47. $_rdata['url'] = '';
  48. $_rdata['lang'] = 'en';
  49. $_rdata['mem_id'] = '2';
  50. $_rdata['cp_user_token'] = '11111111';
  51. $_rdata['hs_token'] = '222222222222';
  52. $this->success(lang('SUCCESS'), $_rdata);
  53. }
  54. }