Commit 01ad20fd by pangchong

fix: 请求修复

parent f1270ea4
......@@ -3,19 +3,12 @@ import useUserStore from 'mocp/store/user'
const baseURL = 'https://hna-platform.anyremote.cn'
class ServiceLoading {
constructor() {
this.count = 0
}
open(loading) {
if (this.count < 0) {
this.count = 0
}
if (loading || loading === '') {
let loadingText = '加载中'
if (typeof loading === 'string' && loading !== '') {
loadingText = loading
}
this.count++
uni.showLoading({
title: loadingText,
mask: true
......@@ -23,11 +16,8 @@ class ServiceLoading {
}
}
close() {
this.count--
if (this.count <= 0) {
uni.hideLoading()
}
}
}
const serviceLoading = new ServiceLoading()
//请求拦截器
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment