2025-01-16 03:48:12 +00:00
|
|
|
import { createGlobalState,useLocalStorage } from '@vueuse/core'
|
2025-02-28 09:32:38 +00:00
|
|
|
import { WebSocketClient } from '@/utils/websocket'
|
|
|
|
import {message} from "~/components/x-message/useMessage.js";
|
|
|
|
|
2025-01-16 03:48:12 +00:00
|
|
|
export const authStore = createGlobalState(() => {
|
|
|
|
const token=useLocalStorage('token','')
|
|
|
|
const RefreshToken=useLocalStorage('RefreshToken','')
|
2025-01-21 06:16:54 +00:00
|
|
|
const userInfo=useLocalStorage('userInfo',{})
|
2025-01-23 06:11:20 +00:00
|
|
|
const fingerprint=useLocalStorage('fingerprint','')
|
2025-02-18 06:10:19 +00:00
|
|
|
const checkoutSessionUrl=useLocalStorage('checkoutSessionUrl','')
|
2025-02-20 12:40:00 +00:00
|
|
|
const selectedZone=useLocalStorage('selectedZone','')
|
2025-02-19 13:03:54 +00:00
|
|
|
const payment=useLocalStorage('payment',{
|
|
|
|
leftPrice:'',
|
|
|
|
leftCurrency:'',
|
2025-02-20 10:53:53 +00:00
|
|
|
buyUid:'',
|
|
|
|
auctionArtworkUuid:''
|
2025-02-19 13:03:54 +00:00
|
|
|
})
|
2025-02-28 07:08:48 +00:00
|
|
|
const payUid=useLocalStorage('payUid','')
|
2025-01-16 03:48:12 +00:00
|
|
|
return{
|
2025-02-28 07:08:48 +00:00
|
|
|
payUid,
|
2025-02-20 12:40:00 +00:00
|
|
|
selectedZone,
|
2025-02-19 13:03:54 +00:00
|
|
|
payment,
|
2025-02-18 06:10:19 +00:00
|
|
|
checkoutSessionUrl,
|
2025-01-16 03:48:12 +00:00
|
|
|
userInfo,
|
|
|
|
RefreshToken,
|
2025-01-23 06:11:20 +00:00
|
|
|
token,
|
|
|
|
fingerprint
|
2025-01-16 03:48:12 +00:00
|
|
|
}
|
|
|
|
})
|