插件调用优化

This commit is contained in:
Devil 2021-08-06 15:33:35 +08:00
parent ca4f2dddab
commit d430ec929b
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ class Plugins extends Common
// ajax 返回的都是数组、使用统一api返回处理
if(IS_AJAX)
{
return ApiService::ApiDataReturn($ret['data']);
return ApiService::ApiDataReturn(($ret['code'] == 0) ? $ret['data'] : $ret);
}
if($ret['code'] == 0)

View File

@ -89,7 +89,7 @@ class Plugins extends Common
// ajax 返回的都是数组、使用统一api返回处理
if(IS_AJAX)
{
return ApiService::ApiDataReturn($ret['data']);
return ApiService::ApiDataReturn(($ret['code'] == 0) ? $ret['data'] : $ret);
}
if($ret['code'] == 0)