提交 5c8a2b87 authored 作者: lihuihui's avatar lihuihui

updata

上级 3288b36c
module.exports = {
domain: 'dev.ezijing.com',
url: 'https://x-exam2.ezijing.com/api',
url: 'https://x-exam.ezijing.com/api',
isEnableToIphoneDebugger: false,
// apiBaseURL: '//demo-login.ezijing.com/',
webpack: {
......
......@@ -88,7 +88,15 @@ export default class API {
err = new Error('网络超时,请稍后重试')
} else if (res.response) {
if (res.response.data) {
res.response.data.code === 0 ? err = res.response.data : new Error(JSON.stringify(res.response))
if (res.response.data.code === 0) {
if (res.response.status === 403) {
window.location.replace(`/login/${JSON.parse(window.localStorage.getItem('examInfo')).exam_id}`)
} else {
err = res.response.data
}
} else {
JSON.stringify(res.response)
}
} else if (res.response.status === 500) {
err = new Error('error:网络超时,请稍后重试')
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论