|
|
|
@ -34,7 +34,6 @@ async function request(method, params, type = 'GET') {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
uni.request(http).then(res => {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
console.log(res)
|
|
|
|
|
let newData = res[1].data; // if (newdata.code == 403) {
|
|
|
|
|
if (newData == -1) {
|
|
|
|
|
//如果错误码为 -1 提示
|
|
|
|
@ -43,7 +42,7 @@ async function request(method, params, type = 'GET') {
|
|
|
|
|
icon: 'none'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (newData.code !== 200) {
|
|
|
|
|
if (![200, 0].includes(newData.code)) {
|
|
|
|
|
if (newData.code === 401) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: newData.message,
|
|
|
|
|