From ff0c2871100a652a6a7520ad64f130c7418e960d Mon Sep 17 00:00:00 2001 From: TianYu <332368756@qq.com> Date: Thu, 8 Jun 2023 16:42:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-app/App.vue | 1 + yudao-ui-app/api/api.js | 4 +++- yudao-ui-app/libs/login.js | 8 ++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/yudao-ui-app/App.vue b/yudao-ui-app/App.vue index 1f295eb28..52b921d3e 100644 --- a/yudao-ui-app/App.vue +++ b/yudao-ui-app/App.vue @@ -222,6 +222,7 @@ // 是否扫物业二维码 isProperty() { const is_property = this.$route.query.isProperty || false + console.log('is_property', is_property) if(parseInt(is_property) === 1){ this.$store.commit("SET_IS_PROPERTY", !!is_property) } diff --git a/yudao-ui-app/api/api.js b/yudao-ui-app/api/api.js index f62839cc4..b1d79a897 100644 --- a/yudao-ui-app/api/api.js +++ b/yudao-ui-app/api/api.js @@ -39,7 +39,9 @@ export function getWeChatOpenId(code) { // 获取租户信息 export function fetchTenantInfo(id) { - return request.get('tenant/get?id=' + id, {}); + return request.get('tenant/get?id=' + id, {}, { + noAuth: true + }); } /** diff --git a/yudao-ui-app/libs/login.js b/yudao-ui-app/libs/login.js index f2811b55d..11077743b 100644 --- a/yudao-ui-app/libs/login.js +++ b/yudao-ui-app/libs/login.js @@ -12,8 +12,12 @@ const whiteListPage=['pages/users/privacy/index'] function prePage(){ let pages = getCurrentPages(); - let prePage = pages[pages.length - 1]; - return prePage.route; + if(pages.length > 0){ + let prePage = pages[pages.length - 1]; + return prePage.route; + } else { + return '' + } } export const toLogin = Debounce(_toLogin,800)