需求是:有三个控件,每个控件被点击的时候,都需要开始时长为三分钟的倒计时。

前端代码
countDown() {
let time = 60;
let that = this;
let sendTimer = setInterval(function () {
time--;
//修改文字和按钮状态 ‘重新发送( ' + time +')’
if(time < 0){
clearInterval(sendTimer)
//修改文字和按钮状态 ‘获取验证码’
that.mailCodeSendBtnWords = '获取验证码'
that.mailCodeSendDisable = false;
}else{
//修改 '重新发送( ' + time +')'
that.mailCodeSendBtnWords = '重新发送( ' + time +')';
}
}, 1000)
}
报错内容:
数据库中获取的数据没错,我把获取的list覆盖了本来的list,更新时有数据,但是是错乱重复的 ps:不同的月份查询结果没有混在一起。





在写领券联盟特惠时,recyclerview不显示列表里的内容
public class RedPacketFragment



使用RecyclerView,循环一遍之后,从第17项开始就又重新循环,导致item重复,我直接将后面的都设置为不可见


- 1
- 2
- 3
- 4
- 5
- 6
- 8