From c8a0be0e43ec3d393f57f0754ee38599791a86e8 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Wed, 28 Jun 2023 09:40:38 +0800 Subject: [PATCH] 2022.6.28 --- common/http.interceptor.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/common/http.interceptor.js b/common/http.interceptor.js index fd582cf..24fd54d 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -45,20 +45,22 @@ const install = (Vue, vm) => { let pathname = window.location.pathname; window.location.href = origin + pathname; }, 1500) + } else { + uni.showToast({ + icon: "none", + title: res?.data?.errmsg + }) } return false; } else { - uni.showToast({ - icon: "none", - title: res?.data?.errmsg - }) + return res.data; } } else { - uni.showToast({ - icon: "none", - title: res.statusCode - }) + // uni.showToast({ + // icon: "none", + // title: res.statusCode + // }) return false; }