mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-14 21:36:46 +08:00
Update App.vue
修改生产环境权限认证
This commit is contained in:
14
src/App.vue
14
src/App.vue
@@ -33,6 +33,7 @@ onMounted(() => {
|
|||||||
window.location.href.includes("/login") || getUserInfo();
|
window.location.href.includes("/login") || getUserInfo();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function getUserInfo() {
|
function getUserInfo() {
|
||||||
if (
|
if (
|
||||||
import.meta.env.MODE === "development" ||
|
import.meta.env.MODE === "development" ||
|
||||||
@@ -42,10 +43,15 @@ function getUserInfo() {
|
|||||||
store.commit("SET_USER", res.data);
|
store.commit("SET_USER", res.data);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
boeRequest(GET_USER_INFO).then((res) => {
|
// 修改生产环境验证 GET_USER_INFO 接口不存在 选择GET_USER_LIST
|
||||||
res.result.avatar =
|
// boeRequest(GET_USER_INFO).then((res) => {
|
||||||
res.result.avatar || "/800e23f7-b58c-4192-820d-0c6a2b7544cc.png";
|
// res.result.avatar =
|
||||||
store.commit("SET_USER", res.result);
|
// res.result.avatar || "/800e23f7-b58c-4192-820d-0c6a2b7544cc.png";
|
||||||
|
// store.commit("SET_USER", res.result);
|
||||||
|
// });
|
||||||
|
|
||||||
|
boeRequest(GET_USER_LIST, {}).then((res) => {
|
||||||
|
store.commit("SET_USER", res.data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user