1234567891011121314151617181920212223242526272829 |
- function startLoading () {
- uni.showLoading({
- mask:true
- })
- }
- function endLoading () {
- uni.hideLoading()
- }
- let needLoadingRequestCount = 0
- export function showFullScreenLoading() {
- if (needLoadingRequestCount === 0) {
- startLoading()
- }
- needLoadingRequestCount++
- }
- export function tryHideFullScreenLoading() {
- if (needLoadingRequestCount <= 0) return
- needLoadingRequestCount--
- if (needLoadingRequestCount === 0) {
- endLoading()
- }
- }
|