s
This commit is contained in:
parent
349c4847a5
commit
cc697de863
@ -34,6 +34,9 @@ const themeOverrides: GlobalThemeOverrides = {
|
|||||||
</NConfigProvider>
|
</NConfigProvider>
|
||||||
</template>
|
</template>
|
||||||
<style>
|
<style>
|
||||||
|
:root{
|
||||||
|
--el-color-primary:#764CF6!important;
|
||||||
|
}
|
||||||
.n-layout-scroll-container{
|
.n-layout-scroll-container{
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
@ -18,10 +18,13 @@ async function bootstrap() {
|
|||||||
setupI18n(app)
|
setupI18n(app)
|
||||||
await setupRouter(app)
|
await setupRouter(app)
|
||||||
// 子页面中
|
// 子页面中
|
||||||
const origins=['https://erp.fontree.cn','http://172.16.100.93:9010']
|
const origins=['https://erp.fontree.cn','http://172.16.100.93:9010','http://localhost:8080']
|
||||||
window.addEventListener('message', function(event) {
|
window.addEventListener('message', function(event) {
|
||||||
|
|
||||||
if (origins.includes(event.origin)){
|
if (origins.includes(event.origin)){
|
||||||
localStorage.setItem('token',event.data)
|
localStorage.setItem('token',event.data.token)
|
||||||
|
localStorage.setItem('mode',JSON.stringify(event.data.mode))
|
||||||
|
localStorage.setItem('userInfo',JSON.stringify(event.data.userInfo))
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ service.interceptors.request.use(
|
|||||||
|
|
||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
(response: AxiosResponse): AxiosResponse => {
|
(response: AxiosResponse): AxiosResponse => {
|
||||||
console.log(response,'response')
|
|
||||||
return response.data
|
return response.data
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { ElLoading } from 'element-plus'
|
import { ElLoading } from 'element-plus'
|
||||||
const request = axios.create({
|
const request = axios.create({
|
||||||
baseURL:import.meta.env.VITE_APP_API_BASE_URL,
|
baseURL:JSON.parse(localStorage.getItem('mode')).VUE_APP_API_URL,
|
||||||
timeout:5000
|
timeout:5000
|
||||||
});
|
});
|
||||||
let loading
|
let loading
|
||||||
|
@ -1,24 +1,19 @@
|
|||||||
<script lang="ts" setup>
|
<script setup>
|
||||||
import { computed } from 'vue'
|
import {ref} from 'vue'
|
||||||
import { NAvatar } from 'naive-ui'
|
import { NAvatar } from 'naive-ui'
|
||||||
import { useUserStore } from '@/store'
|
|
||||||
import { isString } from '@/utils/is'
|
|
||||||
import defaultAvatar from '@/assets/avatar.jpg'
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
image?: boolean
|
|
||||||
}
|
|
||||||
defineProps<Props>()
|
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const defaultAvatar=ref(JSON.parse(localStorage.getItem('userInfo')).Avatar)
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
image: Boolean
|
||||||
|
})
|
||||||
|
|
||||||
const avatar = computed(() => userStore.userInfo.avatar)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<template v-if="image">
|
<template v-if="image">
|
||||||
<NAvatar v-if="isString(avatar) && avatar.length > 0" :src="avatar" :fallback-src="defaultAvatar" />
|
<NAvatar :src="defaultAvatar" :fallback-src="defaultAvatar" />
|
||||||
<NAvatar v-else round :src="defaultAvatar" />
|
|
||||||
</template>
|
</template>
|
||||||
<span v-else class="text-[28px] dark:text-white">
|
<span v-else class="text-[28px] dark:text-white">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true" width="1em" height="1em">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true" width="1em" height="1em">
|
||||||
|
@ -96,7 +96,7 @@ watch(
|
|||||||
新建会话
|
新建会话
|
||||||
</NButton>
|
</NButton>
|
||||||
<div style="width: 110px">
|
<div style="width: 110px">
|
||||||
<n-select v-model:value="gptMode" :options="options" />
|
<n-select v-model:value="gptMode" :options="options" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1 min-h-0 pb-4 overflow-hidden">
|
<div class="flex-1 min-h-0 pb-4 overflow-hidden">
|
||||||
|
Loading…
Reference in New Issue
Block a user