class Loading {
	constructor() {
		this.load_arr = []
	}
	showLoading(options) {
		if (!this.load_arr.length) {
			options ? wx.showLoading({
				...options
			}) : wx.showLoading()
		}
		this.load_arr.push(true)
	}
	hideLoading(options) {
		this.load_arr.pop();
		if (!this.load_arr.length) {
			options ? wx.hideLoading({
				...options
			}) : wx.hideLoading()
		}
	}
}

module.exports = {
	Loading: Loading
}
