人脸管理
This commit is contained in:
1 parent
1886bc7cfb
commit
dbaf426930
8 files changed
+637
-391
No files matched your search
@@ -73,16 +73,9 @@ http.interceptors.request.use(
|
||||
|
||||
http.interceptors.response.use(
|
||||
async (response) => {
|
||||
response.config &&
|
||||
response.config.custom &&
|
||||
response.config.custom.showLoading &&
|
||||
closeLoading();
|
||||
response.config && response.config.custom && response.config.custom.showLoading && closeLoading();
|
||||
if (response.data.code !== 0) {
|
||||
if (
|
||||
response.config &&
|
||||
response.config.custom &&
|
||||
response.config.custom.showError
|
||||
) {
|
||||
if (response.config && response.config.custom && response.config.custom.showError) {
|
||||
switch (response.data.code) {
|
||||
case 401:
|
||||
setTimeout(() => {
|
||||
@@ -118,10 +111,7 @@ http.interceptors.response.use(
|
||||
}
|
||||
const tokenKey = constant.storageConstant.TOKEN;
|
||||
const tokenStorage = uni.getStorageSync(tokenKey);
|
||||
if (
|
||||
!isEmpty(tokenStorage) &&
|
||||
response.config.url != "/sys/auth/refresh-token"
|
||||
) {
|
||||
if (!isEmpty(tokenStorage) && response.config.url != "/sys/auth/refresh-token") {
|
||||
const { refreshToken, expiresTime } = tokenStorage;
|
||||
const now = new Date().getTime();
|
||||
const remain = expiresTime - now;
|
||||
|
||||
Reference in new issue
Block a user