提交 a067381f authored 作者: lihuihui's avatar lihuihui

fix: 修改bug

上级 6b11fd88
...@@ -31,8 +31,8 @@ export default { ...@@ -31,8 +31,8 @@ export default {
methods: { methods: {
downImg() { downImg() {
this.data.forEach((item, index) => { this.data.forEach((item, index) => {
setTimeout(() => {
window.open(item.url) window.open(item.url)
setTimeout(() => {
}, index * 1000) }, index * 1000)
}) })
} }
......
...@@ -30,14 +30,21 @@ httpRequest.interceptors.response.use( ...@@ -30,14 +30,21 @@ httpRequest.interceptors.response.use(
function (response) { function (response) {
const { data, config } = response const { data, config } = response
if (config.url.indexOf('education/certificate') !== -1) { if (config.url.indexOf('education/certificate') !== -1) {
if (data.code) { if (data.code === 0) {
return data return data
} else { } else {
Message.error(data.msg || data.message) Message.error(data.msg || data.message)
return Promise.reject(data) return Promise.reject(data)
} }
} } else {
if (data.code === 0) {
return data return data
} else {
Message.error(data.msg || data.message)
return Promise.reject(data)
}
}
// return data
}, },
function (error) { function (error) {
if (error.response) { if (error.response) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论