mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: Fix default language when chat language is null (#2204)
* fix: Fix default language * fix: Fix default language when chat language is null --------- Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
This commit is contained in:
parent
9937b6156d
commit
91135260c0
|
|
@ -25,6 +25,7 @@ import useStore from '@/stores'
|
|||
import Auth from '@/views/chat/auth/index.vue'
|
||||
import { hexToRgba } from '@/utils/theme'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { getBrowserLang } from '@/locales/index'
|
||||
const { locale } = useI18n({ useScope: 'global' })
|
||||
const route = useRoute()
|
||||
const { application, user } = useStore()
|
||||
|
|
@ -80,7 +81,7 @@ const init_data_end = ref<boolean>(false)
|
|||
const applicationAvailable = ref<boolean>(true)
|
||||
function getAppProfile() {
|
||||
return application.asyncGetAppProfile(loading).then((res: any) => {
|
||||
locale.value = res.data?.language
|
||||
locale.value = res.data?.language || getBrowserLang()
|
||||
show_history.value = res.data?.show_history
|
||||
application_profile.value = res.data
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue