fix -- bug

This commit is contained in:
yuping
2023-03-05 04:22:24 +08:00
parent 320fde3f4c
commit 7d198f8eaa
5 changed files with 5959 additions and 5117 deletions

View File

@@ -36,22 +36,30 @@ import {useStore} from "vuex";
import {onMounted} from "vue";
import {useRoute} from "vue-router/dist/vue-router";
import {USER_INFO} from "@/api/api";
import {IsPhone} from "@/api/utils";
console.log("版本2.1.6------------");
const store = useStore();
const {path} = useRoute();
const { path } = useRoute();
onMounted(() => {
path === '/login' || getUserInfo();
path === "/login" || getUserInfo();
if (IsPhone()) {
if (import.meta.env.MODE === "development") {
window.location.href = window.location.href.replace(import.meta.env.VITE_BASE, import.meta.env.VITE_BASE_H5).replace('5173','5174');
} else {
window.location.href = window.location.href.replace(import.meta.env.VITE_BASE, import.meta.env.VITE_BASE_H5)
}
}
});
function getUserInfo() {
if (import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') {
if (import.meta.env.MODE === "development" || import.meta.env.MODE === "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'
res.result.avatar = res.result.avatar || "/800e23f7-b58c-4192-820d-0c6a2b7544cc.png";
store.commit("SET_USER", res.result);
});
}
@@ -75,7 +83,7 @@ function getUserInfo() {
.preNext {
right: 115px !important;
margin-top:4px;
margin-top: 4px;
}
#container {