mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-09 10:56:47 +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();
|
||||
});
|
||||
|
||||
|
||||
function getUserInfo() {
|
||||
if (
|
||||
import.meta.env.MODE === "development" ||
|
||||
@@ -42,10 +43,15 @@ function getUserInfo() {
|
||||
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);
|
||||
// 修改生产环境验证 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(GET_USER_LIST, {}).then((res) => {
|
||||
store.commit("SET_USER", res.data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user