mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
fix: Historical user conversation data has been cleared (#2843)
This commit is contained in:
parent
8dc793a128
commit
0213aff12a
|
|
@ -271,7 +271,7 @@ const props = withDefaults(
|
|||
showUserInput?: boolean
|
||||
sendMessage: (question: string, other_params_data?: any, chat?: chatType) => void
|
||||
openChatId: () => Promise<string>
|
||||
validate: () => Promise<boolean | string>
|
||||
validate: () => Promise<any>
|
||||
}>(),
|
||||
{
|
||||
applicationDetails: () => ({}),
|
||||
|
|
|
|||
|
|
@ -97,8 +97,8 @@ const useApplicationStore = defineStore({
|
|||
applicationApi
|
||||
.postAppAuthentication(token, loading, authentication_value)
|
||||
.then((res) => {
|
||||
localStorage.setItem(`${token}accessToken`, res.data)
|
||||
sessionStorage.setItem(`${token}accessToken`, res.data)
|
||||
localStorage.setItem(`${token}-accessToken`, res.data)
|
||||
sessionStorage.setItem(`${token}-accessToken`, res.data)
|
||||
resolve(res)
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
|
|||
|
|
@ -61,11 +61,11 @@ const useUserStore = defineStore({
|
|||
return this.userType === 1 ? localStorage.getItem('token') : this.getAccessToken()
|
||||
},
|
||||
getAccessToken() {
|
||||
const token = sessionStorage.getItem(`${this.userAccessToken}accessToken`)
|
||||
const token = sessionStorage.getItem(`${this.userAccessToken}-accessToken`)
|
||||
if (token) {
|
||||
return token
|
||||
}
|
||||
const local_token = localStorage.getItem(`${token}accessToken`)
|
||||
const local_token = localStorage.getItem(`${token}-accessToken`)
|
||||
if (local_token) {
|
||||
return local_token
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue