欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

vue 点击倒计时 ajax 封装

发布时间:2024/9/5 49 豆豆
生活随笔 收集整理的这篇文章主要介绍了 vue 点击倒计时 ajax 封装 小编觉得挺不错的,现在分享给大家,帮大家做个参考.
方法:function(){var that = this;if (that.time == 0) {that.disabled = false;that.text ="点击获取";that.time =120;return;} else {that.disabled = true;that.text = that.time + "s";that.time--;}setTimeout(function () {that.setTime();}, 1000);},SendMsg:function(){var that = this;Comm.runebws("URL",data,"POST",function(result){if(result.code==0){that.setTime(); //重新开始计时}else{return}},function(e){if(e&&e.message){}else{return}},1);}

 

转载于:https://www.cnblogs.com/chen527/p/10044663.html

总结

以上是生活随笔为你收集整理的vue 点击倒计时 ajax 封装的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。