uniapp不能像jquery那樣$,要獲取對(duì)象這么做脸侥,注意滾動(dòng)條高度要是一直設(shè)置成一樣的畏纲,是不會(huì)賦值的扇住,所以
parseInt(that.historyHeight) == tmp ? tmp - 1 : tmp;
//獲取歷史記錄滾動(dòng)條高度,用于每次下拉定位到最新的數(shù)據(jù)(底部)
let historycontainer = uni.createSelectorQuery().select(".historycontainer");
historycontainer.boundingClientRect(function(data) {
var tmp = parseInt(data.height - data.bottom - data.top) // 獲取滾動(dòng)條高度
that.historyHeight = parseInt(that.historyHeight) == tmp ? tmp - 1 : tmp;
}).exec()