liveh5-nuxt/app/stores-collect-code/auth/index.js
xingyy 0308ace199 feat(auth): 优化签名流程和数据存储
- 将 lotNo、price 和 auctionArtworkUuid存储到本地存储
-优化个人信息页面的表单显示逻辑
- 在协议页面添加竞拍信息
- 移除签名面板中的冗余代码
2025-02-19 18:42:58 +08:00

34 lines
1.2 KiB
JavaScript

import { createGlobalState,useLocalStorage } from '@vueuse/core'
export const codeAuthStore = createGlobalState(() => {
const token=useLocalStorage('token','')
const RefreshToken=useLocalStorage('RefreshToken','')
const userInfo=useLocalStorage('userInfo',{})
const fingerprint=useLocalStorage('fingerprint','')
const formData=useLocalStorage('formData',{
"countryCode": "",
"phone": "", //手机号
"userName": "", //用户名 (第一次传)
"gender": 1, //性别 1男 2女 3未知 (第一次传)
"birthday": "", //生日 (第一次传)
"address": "", //家庭住址 (第一次传)
"bankName": "", //银行名字(第一次传)
"bankNo": "", //银行卡号(第一次传)
"cardId": "",
cardType:1
})
const lotNo=useLocalStorage('lotNo',undefined)
const price=useLocalStorage('price',undefined)
const auctionArtworkUuid=useLocalStorage('auctionArtworkUuid',undefined)
const number=useLocalStorage('number',undefined)
return{
lotNo,
price,
auctionArtworkUuid,
number,
formData,
userInfo,
RefreshToken,
token,
fingerprint
}
})