mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 11:56:48 +08:00
-- 测试发版
This commit is contained in:
17
src/App.vue
17
src/App.vue
@@ -30,11 +30,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { boeRequest } from "@/api/request";
|
||||
import {boeRequest, request} from "@/api/request";
|
||||
import { GET_USER_INFO } from "@/api/ThirdApi";
|
||||
import { useStore } from "vuex";
|
||||
import { onMounted } from "vue";
|
||||
import {useRoute} from "vue-router/dist/vue-router";
|
||||
import {USER_INFO} from "@/api/api";
|
||||
|
||||
console.log("版本2.0.5------------");
|
||||
const store = useStore();
|
||||
@@ -44,10 +45,16 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
function getUserInfo() {
|
||||
boeRequest(GET_USER_INFO).then((res) => {
|
||||
res.result.avatar = res.result.avatar ? res.result.avatar : '/800e23f7-b58c-4192-820d-0c6a2b7544cc.png'
|
||||
store.commit("SET_USER", res.result);
|
||||
});
|
||||
if(import.meta.env.MODE ==='development' || import.meta.env.MODE ==='test'){
|
||||
request(USER_INFO,{}).then(res=>{
|
||||
store.commit("SET_USER", res.data.result);
|
||||
})
|
||||
}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);
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user