fix: 注册完成后跳转
This commit is contained in:
@@ -34,6 +34,7 @@ import { useRouter } from 'vue-router'
|
||||
import { useUserInfoStore } from '@/stores'
|
||||
import { streamChatAddress } from '@/api/workshop'
|
||||
import { generateUUID } from '@/utils/tools'
|
||||
import { showToast } from 'vant'
|
||||
|
||||
const router = useRouter()
|
||||
const userInfoStore = useUserInfoStore()
|
||||
@@ -131,7 +132,14 @@ const handleFetchMessage = (message: string) => {
|
||||
credentials: 'include'
|
||||
})
|
||||
.then(async (response) => {
|
||||
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`)
|
||||
if (!response.ok) {
|
||||
showToast({
|
||||
message: `failed to fetch: ${response.status}`,
|
||||
position: 'top',
|
||||
icon: 'none'
|
||||
})
|
||||
throw new Error(`发起对话错误--- ${response.status}`)
|
||||
}
|
||||
|
||||
let contentBody = ''
|
||||
let buffer = ''
|
||||
|
||||
Reference in New Issue
Block a user