shenxianyan
shenxianyan
  • 发布:2018-10-20 00:33
  • 更新:2019-02-14 17:01
  • 阅读:1670

android打包下,setInterval或者setTimeout做的时间跳动累加器,卡!ios正常

分类:uni-app
beat: function() {  
    var that = this  
    var see = that.popularity_see  
    var click = that.popularity_click  
    var stop_see = false  
    var stop_click = false  
    if (see < that.popularity.see) {  
        see = see + 1  
    } else {  
        stop_see = true  
    }  
    if (click < that.popularity.click) {  
        click = click + 1  
    } else {  
        stop_click = true  
    }  
    that.setData({  
        popularity_click: click,  
        popularity_see: see  
    })  
    if (stop_click == false || stop_see == false) {  
        setTimeout(that.beat_popularity, 10)  
    }  
}  
},
2018-10-20 00:33 负责人:无 分享
已邀请:
zino

zino

同样的问题

该问题目前已经被锁定, 无法添加新回复