我有这段代码:
handler = this.$http({
method: 'POST',
url: this._url,
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
data: this._encodeParams(data),
cache: false,
responseType: 'json'
}).error(function(data, status){
if (data === null && status !=200) {
console.log('error');
}
}).then(function(httpResponse) {
return httpResponse.data;
});
返回处理程序;
如果服务器关闭,我需要自动重启我的请求5次。 我在{status!= 200}时尝试使用do {},但代码不起作用。
谢谢