From 42b2c2f51fbb37de98239e3b1536ba7ba62aef1a Mon Sep 17 00:00:00 2001 From: qinshengcheng <928194311@qq.com> Date: Wed, 21 Feb 2024 15:13:21 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 21 +++++++++++++++------ src/api/ThirdApi.js | 7 ++++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/App.vue b/src/App.vue index 9635071..74ec970 100644 --- a/src/App.vue +++ b/src/App.vue @@ -34,20 +34,29 @@ onMounted(() => { }); function getUserInfo() { + console.log("开始身份验证") if ( - import.meta.env.MODE === "development" || - import.meta.env.MODE === "test" + import.meta.env.MODE === "development" || + import.meta.env.MODE === "test" ) { + console.log("开始test身份验证") request(USER_INFO, {}).then((res) => { store.commit("SET_USER", res.data); }); } else { - boeRequest(GET_USER_INFO).then((res) => { - res.result.avatar = - res.result.avatar || "/800e23f7-b58c-4192-820d-0c6a2b7544cc.png"; - store.commit("SET_USER", res.result); + console.log("开始pre身份验证") + // 修改生产环境验证 GET_USER_INFO 接口不存在 选择GET_USER_LIST + // boeRequest(GET_USER_INFO).then((res) => { + // res.result.avatar = + // res.result.avatar || "/800e23f7-b58c-4192-820d-0c6a2b7544cc.png"; + // store.commit("SET_USER", res.result); + // }); + + boeRequest(USER_INFO, {}).then((res) => { + store.commit("SET_USER", res.data); }); } + console.log("------结束身份验证") }