| @@ -96,15 +96,15 @@ export function get(url, params) { | |||
| }) | |||
| .then(res => { | |||
| if (res.data.status === 1) { | |||
| Message.error("意外错误!"); | |||
| reject("意外错误"); | |||
| return; | |||
| } | |||
| if (res.data.status === 101) { | |||
| Message.error("非法请求!"); | |||
| reject("非法请求"); | |||
| return; | |||
| } | |||
| if (res.data.status === 103) { | |||
| Message.error("权限不足!"); | |||
| reject("权限不足"); | |||
| if (location.pathname.indexOf("independent-product") > -1) { | |||
| location.href = "/page/managerIndex.action"; | |||
| } | |||
| @@ -115,7 +115,7 @@ export function get(url, params) { | |||
| return; | |||
| } | |||
| if (res.data.status === 113) { | |||
| Message.error("请求过于频繁!"); | |||
| reject("请求过于频繁"); | |||
| return; | |||
| } | |||
| resolve(res); | |||
| @@ -137,15 +137,18 @@ export function post(url, params) { | |||
| .post(url, params) | |||
| .then(res => { | |||
| if (res.data.status === 1) { | |||
| Message.error("意外错误!"); | |||
| // Message.error("意外错误!"); | |||
| reject("意外错误"); | |||
| return; | |||
| } | |||
| if (res.data.status === 101) { | |||
| Message.error("非法请求!"); | |||
| // Message.error("非法请求!"); | |||
| reject("非法请求"); | |||
| return; | |||
| } | |||
| if (res.data.status === 103) { | |||
| Message.error("权限不足!"); | |||
| // Message.error("权限不足!"); | |||
| reject("权限不足"); | |||
| return; | |||
| } | |||
| if (res.data.status === 110) { | |||
| @@ -153,7 +156,8 @@ export function post(url, params) { | |||
| return; | |||
| } | |||
| if (res.data.status === 113) { | |||
| Message.error("请求过于频繁!"); | |||
| // Message.error("请求过于频繁!"); | |||
| reject("请求过于频繁"); | |||
| return; | |||
| } | |||
| resolve(res); | |||