微信小程序,延时执行js函数的问题
fight:function(e){that=this;that.setData({buttondisabled:true,loading:true}),setTimeo...
fight:function(e){ that = this; that.setData({ buttondisabled: true, loading: true }), setTimeout(function () { that.setData({ buttondisplay: 'none', playerdisplay: 'block', }, 9000) }) }
展开
2个回答
展开全部
fight:function(e){
that = this;
that.setData({
buttondisabled: true,
loading: true
}); //<--这里是分号不是逗号
setTimeout(function(){
that.setData({
buttondisplay: 'none',
playerdisplay: 'block'
}) //这里的错误不太好描述,自己看了
}, 9000);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询