|
@ -89,6 +89,8 @@ function service(options = {}) { |
|
|
message = '接口' + message.substr(message.length - 3) + '异常' |
|
|
message = '接口' + message.substr(message.length - 3) + '异常' |
|
|
} else if (message.includes('get lock')) { |
|
|
} else if (message.includes('get lock')) { |
|
|
message = '接口' + "数据库死锁" |
|
|
message = '接口' + "数据库死锁" |
|
|
|
|
|
}else if(message.includes('statusCode:-1')){ |
|
|
|
|
|
message = "当前设备无网络,请检查网络后重试" |
|
|
} |
|
|
} |
|
|
reject("系统异常:" + message); |
|
|
reject("系统异常:" + message); |
|
|
console.log("系统异常", message) |
|
|
console.log("系统异常", message) |
|
@ -99,7 +101,7 @@ function service(options = {}) { |
|
|
const networkType = res.networkType; |
|
|
const networkType = res.networkType; |
|
|
console.log("网络类型", networkType) |
|
|
console.log("网络类型", networkType) |
|
|
if (networkType == "none") { |
|
|
if (networkType == "none") { |
|
|
reject("当前无网络"); |
|
|
reject("当前设备无网络,请检查网络后重试"); |
|
|
} else { |
|
|
} else { |
|
|
uni.request(options); |
|
|
uni.request(options); |
|
|
} |
|
|
} |
|
|