验证537问题

This commit is contained in:
670788339
2024-02-21 14:56:15 +08:00
parent 7fa4eaeaed
commit f0e12d0657

View File

@@ -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);
});
}