function calcContentHeight(chaliang) {
    let contentHeight = 0
    uni.getSystemInfo({
        success(res) {
            contentHeight = res.windowHeight - 40 - chaliang
        }
    })
    return contentHeight
}
function SystemInfo(){//获取屏幕宽高
	let SystemInfo = {}
	uni.getSystemInfo({
		success(res) {
			SystemInfo.windowWidth = res.windowWidth
			SystemInfo.windowHeight = res.windowHeight
		}
	})
	return SystemInfo
}
function getRect(selector){//获取元素的信息
		return new Promise((resolve) => {
			let view = uni.createSelectorQuery().select(selector);
			view.fields({
				size: true,
				rect: true,
				scrollOffset:true
			}, (res) => {
				resolve(res);
			}).exec();
		})
	}


export default {
    calcContentHeight,
	SystemInfo,
	getRect
}