api 统一返回处理

This commit is contained in:
Devil
2021-07-20 23:45:54 +08:00
parent 698b57fb40
commit b88841d902
26 changed files with 520 additions and 486 deletions

View File

@ -10,6 +10,8 @@
// +----------------------------------------------------------------------
namespace app\api\controller;
use app\service\ApiService;
/**
* 空控制器响应
* @author Devil
@ -32,13 +34,7 @@ class Error extends Common
*/
public function __call($method, $args)
{
if(IS_AJAX)
{
return DataReturn(RequestController().' 控制器不存在', -1000);
} else {
MyViewAssign('msg', RequestController().' 控制器不存在');
return MyView('public/tips_error');
}
return ApiService::ApiDataReturn(DataReturn(RequestController().' 控制器不存在', -1000));
}
}
?>