mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-06 09:26:46 +08:00
调试
This commit is contained in:
21
src/App.vue
21
src/App.vue
@@ -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">
|
||||
|
||||
@@ -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`
|
||||
Reference in New Issue
Block a user