- 移除 authStore 中的 payUid 和 checkoutSessionUrl - 更新 checkoutPage 组件,使用路由参数传递支付相关信息- 修改 payment 页面逻辑,适应新的支付流程 - 删除未使用的 payment/checkoutPage 组件
29 lines
936 B
JavaScript
29 lines
936 B
JavaScript
import { createGlobalState,useLocalStorage } from '@vueuse/core'
|
|
import { WebSocketClient } from '@/utils/websocket'
|
|
import {message} from "~/components/x-message/useMessage.js";
|
|
|
|
export const authStore = createGlobalState(() => {
|
|
const token=useLocalStorage('token','')
|
|
const RefreshToken=useLocalStorage('RefreshToken','')
|
|
const userInfo=useLocalStorage('userInfo',{})
|
|
const fingerprint=useLocalStorage('fingerprint','')
|
|
const checkoutSessionUrl=useLocalStorage('checkoutSessionUrl','')
|
|
const selectedZone=useLocalStorage('selectedZone','')
|
|
const payment=useLocalStorage('payment',{
|
|
leftPrice:'',
|
|
leftCurrency:'',
|
|
buyUid:'',
|
|
auctionArtworkUuid:''
|
|
})
|
|
const payUid=useLocalStorage('payUid','')
|
|
return{
|
|
payUid,
|
|
selectedZone,
|
|
payment,
|
|
checkoutSessionUrl,
|
|
userInfo,
|
|
RefreshToken,
|
|
token,
|
|
fingerprint
|
|
}
|
|
}) |