添加页面及完善二级页面
This commit is contained in:
@@ -3,7 +3,15 @@
|
||||
* YangXB 2021.11.24
|
||||
* */
|
||||
import { base, http } from './config';
|
||||
import { getStorage, goIndexPage, isArray, setStorage, toArray, toastError } from './util';
|
||||
import {
|
||||
getCurrentPage,
|
||||
getStorage,
|
||||
goIndexPage,
|
||||
isArray,
|
||||
setStorage,
|
||||
toArray,
|
||||
toastError,
|
||||
} from './util';
|
||||
/**
|
||||
* 请求
|
||||
*/
|
||||
@@ -50,10 +58,11 @@ const request = (url: string, options: any, config = { showLoading: true, showEr
|
||||
});
|
||||
}
|
||||
if (request.data.err_code == 110000) {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = getCurrentPage();
|
||||
console.log(currentPage);
|
||||
if (
|
||||
!['pages/index/index', 'pages/processEntry/processEntry', 'pages/my/my'].includes(
|
||||
pages[pages.length - 1].route,
|
||||
currentPage.route,
|
||||
)
|
||||
) {
|
||||
goIndexPage();
|
||||
@@ -182,7 +191,7 @@ export const loginStatusPage = (that: WechatMiniprogram.Page.Instance<any, any>)
|
||||
})
|
||||
.catch((err) => {
|
||||
that.setData({ isLogin: false, loading: false });
|
||||
reject();
|
||||
reject(err);
|
||||
console.log('调用登录状态请求失败', err);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user