| 12345678910111213141516171819202122232425 |
- 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
- }
|