liveh5-nuxt/app/stores/auth/index.js
xingyy f4427bc094 feat(payment): 实现支付功能并优化相关页面
- 新增 payment 存储对象,用于保存支付相关信息
- 实现全款和部分款项支付逻辑
- 优化直播室、艺术品详情、个人中心等页面的支付相关展示和功能
- 添加千分位格式化函数,提升用户体验
2025-02-19 21:03:54 +08:00

21 lines
652 B
JavaScript

import { createGlobalState,useLocalStorage } from '@vueuse/core'
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 payment=useLocalStorage('payment',{
leftPrice:'',
leftCurrency:'',
buyUid:''
})
return{
payment,
checkoutSessionUrl,
userInfo,
RefreshToken,
token,
fingerprint
}
})