diff --git a/src/App.vue b/src/App.vue index c6355ab..fc98570 100644 --- a/src/App.vue +++ b/src/App.vue @@ -35,10 +35,12 @@ onMounted(() => { function getUserInfo() { + console.log("-- 获取登录用户信息---", answerTime); if ( import.meta.env.MODE === "development" || import.meta.env.MODE === "test" ) { + console.log("-- 获取环境信息 01---", import.meta.env.MODE); // request(USER_INFO, {}).then((res) => { boeRequest(GET_USER_INFO).then((res) => { res.result.avatar = @@ -49,6 +51,7 @@ function getUserInfo() { // store.commit("SET_USER", res.data); // }); } else { + console.log("-- 获取环境信息 02---", import.meta.env.MODE); // 修改生产环境验证 GET_USER_INFO 接口不存在 选择GET_USER_LIST // boeRequest(GET_USER_INFO).then((res) => { // res.result.avatar = @@ -56,7 +59,7 @@ function getUserInfo() { // store.commit("SET_USER", res.result); // }); - boeRequest(GET_USER_LIST, {}).then((res) => { + boeRequest(GET_USER_INFO, {}).then((res) => { store.commit("SET_USER", res.data); }); }