This commit is contained in:
2024-02-04 11:31:30 +08:00
parent cf39946c0b
commit 2ba9d8bba9
8 changed files with 143 additions and 90 deletions

View File

@@ -42,7 +42,7 @@ const request = (options, noLoading) => {
}
Object.assign(_opts, options)
let _token = token.getToken()
console.log("token",_token)
console.log("token", _token)
let _baseUrl = config.baseUrl
let _tokenName = config.tokenName
if (_tokenName) {
@@ -92,10 +92,13 @@ const request = (options, noLoading) => {
});
} else {
if (_opts.showFailMessage) {
console.log("data.msg>>>>>", data.msg);
uni.showToast({
title: data.msg,
icon: 'none',
duration: 2000,
duration: 5000,
})
}
}
@@ -157,7 +160,9 @@ const request = (options, noLoading) => {
},
complete() {
if (_opts.showLoading) {
uni.hideLoading()
console.log("showLoading>>>>>", _opts.showLoading);
uni.hideLoading()
}
}
})