前端获取http状态码400的返回值实例
编程学习 2021-07-05 11:30www.dzhlxh.cn编程入门
狼蚁网站SEO优化长沙网络推广就为大家带来一篇前端获取http状态码400的返回值实例。长沙网络推广觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随长沙网络推广过来看看吧
如下所示:
axios.get("/check_mobile_and_sent_code",{withCredentials:true,params:{mobile:formInline.mobile}}).then(res=>{ console.log(res); //if(res.result==true){ if (!this.timer) { this.count = this.TIME_COUNT; this.show = false; this.timer = setInterval(() => { if (this.count > 0 && this.count <= this.TIME_COUNT) { this.count--; } else { this.show = true; clearInterval(this.timer); this.timer = null; } }, 1000) } /