2025-02-05 09:00:22 +00:00
|
|
|
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','')
|
2025-02-19 07:14:01 +00:00
|
|
|
const formData=useLocalStorage('formData',{
|
|
|
|
"countryCode": "",
|
|
|
|
"phone": "", //手机号
|
|
|
|
"userName": "", //用户名 (第一次传)
|
|
|
|
"gender": 1, //性别 1男 2女 3未知 (第一次传)
|
|
|
|
"birthday": "", //生日 (第一次传)
|
|
|
|
"address": "", //家庭住址 (第一次传)
|
|
|
|
"bankName": "", //银行名字(第一次传)
|
|
|
|
"bankNo": "", //银行卡号(第一次传)
|
|
|
|
"cardId": "",
|
|
|
|
cardType:1
|
|
|
|
})
|
2025-02-19 10:42:58 +00:00
|
|
|
const lotNo=useLocalStorage('lotNo',undefined)
|
|
|
|
const price=useLocalStorage('price',undefined)
|
|
|
|
const auctionArtworkUuid=useLocalStorage('auctionArtworkUuid',undefined)
|
2025-02-19 07:14:01 +00:00
|
|
|
const number=useLocalStorage('number',undefined)
|
2025-02-20 03:35:23 +00:00
|
|
|
const qrUid=useLocalStorage('qrUid',undefined)
|
|
|
|
const cpayment=useLocalStorage('cpayment',{
|
|
|
|
price:'',
|
|
|
|
currency:''
|
|
|
|
})
|
|
|
|
const qrData=useLocalStorage('qrData',{})
|
2025-02-05 09:00:22 +00:00
|
|
|
return{
|
2025-02-20 03:35:23 +00:00
|
|
|
qrData,
|
|
|
|
qrUid,
|
|
|
|
cpayment,
|
2025-02-19 07:14:01 +00:00
|
|
|
lotNo,
|
|
|
|
price,
|
|
|
|
auctionArtworkUuid,
|
|
|
|
number,
|
|
|
|
formData,
|
2025-02-05 09:00:22 +00:00
|
|
|
userInfo,
|
|
|
|
RefreshToken,
|
|
|
|
token,
|
|
|
|
fingerprint
|
|
|
|
}
|
|
|
|
})
|