PrivateUserService.php 530 B

123456789101112131415161718192021
  1. <?php
  2. namespace app\services\ThirdParty\Taobao;
  3. use think\exception\ValidateException;
  4. class PrivateUserService extends TaobaoService
  5. {
  6. public function getInvitecodeSc($params)
  7. {
  8. $req = new \TbkScInvitecodeGetRequest();
  9. $this->batchSetProperties($req, $params);
  10. $req->setRelationApp('common');
  11. $req->setCodeType(3);
  12. $res = $this->execute($req);
  13. if (!$res) {
  14. throw new ValidateException('网络错误,请稍后重试');
  15. }
  16. return $res;
  17. }
  18. }