packages/Abp.Web.Resources.3.2.5/content/Abp/Framework/scripts/libs/angularjs/abp.ng.js
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
(function (abp, angular) {
if (!angular) {
return;
}
abp.ng = abp.ng || {};
abp.ng.http = {
defaultError: {
message: 'An error has occurred!',
details: 'Error detail not sent by server.'
},
defaultError401: {
message: 'You are not authenticated!',
details: 'You should be authenticated (sign in) in order to perform this operation.'
},
defaultError403: {
message: 'You are not authorized!',
details: 'You are not allowed to perform this operation.'
},
defaultError404: {
message: 'Resource not found!',
details: 'The resource requested could not found on the server.'
},
logError: function (error) {
abp.log.error(error);
},
showError: function (error) {
if (error.details) {
return abp.message.error(error.details, error.message || abp.ng.http.defaultError.message);
} else {
return abp.message.error(error.message || abp.ng.http.defaultError.message);
}
},
handleTargetUrl: function (targetUrl) {
if (!targetUrl) {
location.href = abp.appPath;
} else {
location.href = targetUrl;
}
},
handleNonAbpErrorResponse: function (response, defer) {
if (response.config.abpHandleError !== false) {
switch (response.status) {
case 401:
abp.ng.http.handleUnAuthorizedRequest(
abp.ng.http.showError(abp.ng.http.defaultError401),
abp.appPath
);
break;
case 403:
abp.ng.http.showError(abp.ajax.defaultError403);
后面还有 114 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
