liveh5-nuxt/app/stores-collect-code/auth/index.js
xingyy 43b1afb8f0 feat(collect-code): 实现线下扫码支付功能
- 新增 offlineQrcode 和 createOrder 接口
- 实现个人资讯页面的数据获取和处理
- 添加支付页面,支持全款和部分款项支付
- 优化签名协议页面,使用新接口获取数据
- 新增支付结果页面,展示支付状态和金额
2025-02-20 11:35:23 +08:00

43 lines
1.5 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)
const qrUid=useLocalStorage('qrUid',undefined)
const cpayment=useLocalStorage('cpayment',{
price:'',
currency:''
})
const qrData=useLocalStorage('qrData',{})
return{
qrData,
qrUid,
cpayment,
lotNo,
price,
auctionArtworkUuid,
number,
formData,
userInfo,
RefreshToken,
token,
fingerprint
}
})