mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-23 03:24:34 +08:00
update database sql file
This commit is contained in:
@@ -724,7 +724,7 @@ const sendSSERequest = async (message) => {
|
||||
if (data.type === 'error') {
|
||||
const reply = chatData.value[chatData.value.length - 1]
|
||||
if (reply) {
|
||||
reply['content'].text = `<div class="text-red-500 p-3 rounded-md">${data.body}</div>`
|
||||
reply['content'].text = `<div class="text-red-500 rounded-md">${data.body}</div>`
|
||||
}
|
||||
isGenerating.value = false
|
||||
return
|
||||
@@ -818,7 +818,7 @@ const sendSSERequest = async (message) => {
|
||||
// ElMessage.error('连接已断开,发生错误:' + err.message)
|
||||
const reply = chatData.value[chatData.value.length - 1]
|
||||
if (reply) {
|
||||
reply['content'].text = `<div class="text-red-500 p-3 rounded-md">${err.message}</div>`
|
||||
reply['content'].text = `<div class="text-red-500 rounded-md">${err.message}</div>`
|
||||
}
|
||||
},
|
||||
onclose() {
|
||||
|
||||
@@ -52,10 +52,12 @@ import LoginDialog from '@/components/LoginDialog.vue'
|
||||
import { isMobile } from '@/utils/libs'
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { setUserToken } from '@/store/session'
|
||||
|
||||
const router = useRouter()
|
||||
const loginDialogRef = ref(null)
|
||||
const inviteCode = ref(router.currentRoute.value.query.invite_code || '')
|
||||
const token = ref(router.currentRoute.value.query.token || '')
|
||||
const isRegister = ref(router.currentRoute.value.path === '/register')
|
||||
const active = ref(isRegister.value ? 'register' : 'login')
|
||||
const title = computed(() => (isRegister.value ? '用户注册' : '用户登录'))
|
||||
@@ -81,6 +83,11 @@ onMounted(() => {
|
||||
if (loginDialogRef.value) {
|
||||
loginDialogRef.value.login = !isRegister
|
||||
}
|
||||
|
||||
if (token.value) {
|
||||
setUserToken(token.value)
|
||||
handleRegisterSuccess()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user