This commit is contained in:
魏啾
2024-06-28 11:29:09 +08:00
parent 49e5ed4b5c
commit 736ff85457
5 changed files with 113 additions and 42 deletions

View File

@@ -44,6 +44,19 @@ function requestrequest(options) {
}
async function request(options) {
let networkType = ''
uni.getNetworkType({
success: (res) => {
networkType = res.networkType
}
});
if (networkType == 'none') {
uni.showToast({
title: '网络异常,请检查网络',
icon: 'none'
})
return false;
}
try {
if (options.toast) {
// #ifdef MP-WEIXIN || APP-PLUS