liveh5-nuxt/app/stores/auth/index.js
xingyy e7cd4ff9ba refactor(payment): 重构支付流程和页面
- 移除 authStore 中的 payUid 和 checkoutSessionUrl
- 更新 checkoutPage 组件,使用路由参数传递支付相关信息- 修改 payment 页面逻辑,适应新的支付流程
- 删除未使用的 payment/checkoutPage 组件
2025-03-02 11:19:45 +08:00

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
}
})