This commit is contained in:
qinshengcheng
2024-02-21 15:13:21 +08:00
parent 0ae12de8a2
commit 42b2c2f51f
2 changed files with 19 additions and 9 deletions

View File

@@ -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("------结束身份验证")
}
</script>
<style lang="scss">

View File

@@ -1,5 +1,6 @@
export const BASE = 'https://u-pre.boe.com'
export const GET_USER_LIST = `/admin/CheckUser/userInfo`
export const GET_USER_INFO = `/admin/thirdApi/user/searchList`
export const GET_USER_LIST = `/manageApi/admin/CheckUser/userInfo`
export const GET_USER_INFO = `/manageApi/admin/thirdApi/user/searchList`
// export const GET_USER_LIST = `/admin/CheckUser/userInfo`
// export const GET_USER_INFO = `/admin/thirdApi/user/searchList`