|
@@ -105,8 +105,16 @@ service.interceptors.response.use(
|
|
|
})
|
|
})
|
|
|
return Promise.resolve(str)
|
|
return Promise.resolve(str)
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
- const str = '取消操作'
|
|
|
|
|
- return Promise.reject(str)
|
|
|
|
|
|
|
+ if (error === 'cancel') {
|
|
|
|
|
+ const fn = Vue.prototype.$message.error
|
|
|
|
|
+ Vue.prototype.$message.error = () => {}
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ Vue.prototype.$message.error = fn
|
|
|
|
|
+ })
|
|
|
|
|
+ const str = '取消操作'
|
|
|
|
|
+ return Promise.reject(str)
|
|
|
|
|
+ }
|
|
|
|
|
+ return Promise.reject(error)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|