ZskkCrosResponse.php 648 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * 统一返回处理类(ajax)允许跨域
  4. *
  5. * 使用: **
  6. * use Gucci\ServerResponse;
  7. * return ServerResponse::createBySuccess("成功");
  8. * ServerResponse::createByError("断点失败了");
  9. */
  10. namespace app\api\response;
  11. use app\api\error\model\Cros;
  12. use app\api\request\ZskkDefaultRequest;
  13. use app\common\base\response\BaseResponse;
  14. use think\Config;
  15. use think\exception\HttpResponseException;
  16. use think\Response;
  17. use app\api\error\ZskkHttpDefaultError;
  18. class ZskkCrosResponse extends ZskkBaseResponse {
  19. public static function throwCors() {
  20. return new ZskkCrosResponse(Cros::instance());
  21. }
  22. }