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
|
showUserInput?: boolean
|
||||||
sendMessage: (question: string, other_params_data?: any, chat?: chatType) => void
|
sendMessage: (question: string, other_params_data?: any, chat?: chatType) => void
|
||||||
openChatId: () => Promise<string>
|
openChatId: () => Promise<string>
|
||||||
validate: () => Promise<boolean | string>
|
validate: () => Promise<any>
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
applicationDetails: () => ({}),
|
applicationDetails: () => ({}),
|
||||||
|
|||||||
@ -97,8 +97,8 @@ const useApplicationStore = defineStore({
|
|||||||
applicationApi
|
applicationApi
|
||||||
.postAppAuthentication(token, loading, authentication_value)
|
.postAppAuthentication(token, loading, authentication_value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
localStorage.setItem(`${token}accessToken`, res.data)
|
localStorage.setItem(`${token}-accessToken`, res.data)
|
||||||
sessionStorage.setItem(`${token}accessToken`, res.data)
|
sessionStorage.setItem(`${token}-accessToken`, res.data)
|
||||||
resolve(res)
|
resolve(res)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
@ -61,11 +61,11 @@ const useUserStore = defineStore({
|
|||||||
return this.userType === 1 ? localStorage.getItem('token') : this.getAccessToken()
|
return this.userType === 1 ? localStorage.getItem('token') : this.getAccessToken()
|
||||||
},
|
},
|
||||||
getAccessToken() {
|
getAccessToken() {
|
||||||
const token = sessionStorage.getItem(`${this.userAccessToken}accessToken`)
|
const token = sessionStorage.getItem(`${this.userAccessToken}-accessToken`)
|
||||||
if (token) {
|
if (token) {
|
||||||
return token
|
return token
|
||||||
}
|
}
|
||||||
const local_token = localStorage.getItem(`${token}accessToken`)
|
const local_token = localStorage.getItem(`${token}-accessToken`)
|
||||||
if (local_token) {
|
if (local_token) {
|
||||||
return local_token
|
return local_token
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user