User.php 624 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | 用户管理
  5. |--------------------------------------------------------------------------
  6. */
  7. namespace Youzan\Src;
  8. use Dever;
  9. use Main\Lib\Wechat;
  10. use Main\Lib\Core;
  11. class User
  12. {
  13. # 注册客户
  14. public function reg()
  15. {
  16. $project_id = Dever::input('project_id');
  17. $param['mobile'] = Dever::input('mobile');
  18. $param['customer_create'] = array
  19. (
  20. 'name' => $param['mobile'],
  21. );
  22. $param['customer_create'] = json_encode($param['customer_create']);
  23. $wechat = new Wechat($project_id);
  24. return $wechat->curl('reg', $param);
  25. }
  26. }