需要定义一个 let that = this; 要不然下面 直接使用this.style.footViewHeight 会报错
updated() {
//
let that = this;
let view = uni.createSelectorQuery().select(".b-fixed-bottom");
view.boundingClientRect(function(data) {
//获取固定尾部的高度=data.height
that.style.footViewHeight = data.height
}).exec();
//
const res = uni.getSystemInfoSync(); //获取手机可使用窗口高度 api为获取系统信息同步接口
this.style.pageHeight = res.windowHeight;
this.style.contentViewHeight = res.windowHeight - (uni.getSystemInfoSync().screenWidth / 750) * 100 - that.style.footViewHeight; //像素 因为给出的是像素高度 然后我们用的是upx 所以换算一下
this.scrollToBottom(); //创建后调用回到底部方法
}