axios要求タイムアウト時間の設定
import axios from 'axios';
axios.defaults.timeout = 500
axios.interceptors.response.use(response => {
return response
}, err => {
if(err.message == 'timeout of 5000ms exceeded'){
return {code : 10,message:' '}
}else{
return {code :500, message:' , '}
}
})
this.$store.dispatch(formData).then(res=>{
if(res.code == 200){
console.log(' ')
}
}).catch(err=>{
alert(err.message)
})