修改vip

This commit is contained in:
yuyongdong 2024-10-17 19:38:57 +08:00
parent d455ea207b
commit 0e60c39202
3 changed files with 23 additions and 15 deletions

View File

@ -845,7 +845,8 @@ const isBindVip = () => {
if(bindPassportAddress.value) { if(bindPassportAddress.value) {
vipDialogVisible.value = true vipDialogVisible.value = true
} else { } else {
alert('没有绑定') // alert('')
bindVipAddress()
} }
} }
} }
@ -860,16 +861,21 @@ const getVipDetails = async () => {
const getIsBandVip = async () => { const getIsBandVip = async () => {
let res = await apiVipInfo() let res = await apiVipInfo()
bindPassportAddress.value = res.info.bind_passport_address bindPassportAddress.value = res.info.bind_passport_address
console.log(res,'---------')
} }
// VIP // VIP
const bindVipAddress = async () => { const bindVipAddress = async () => {
await new BlockChain().appendPassport()
const data = { const data = {
passport_jwt: '' passport_jwt: 'Bearer ' + await new BlockChain().passportToken()
} }
let res = await apiBindPassport(data) let res = await apiBindPassport(data)
console.log(res) console.log(res)
if(res.errcode != 0) {
message.error(`${res.errmsg}`)
} else {
dataInfo()
}
} }
const toStaking = (path) => { const toStaking = (path) => {
@ -893,6 +899,7 @@ const dataInfo = async () => {
} }
watch(localWalletStore,() => { watch(localWalletStore,() => {
console.log(localWalletStore.token,'-------------------------')
// console.log('localWalletStore.token',localWalletStore.address,localWalletStore.token) // console.log('localWalletStore.token',localWalletStore.address,localWalletStore.token)
if(!localWalletStore.token) { if(!localWalletStore.token) {
cecInfo.value = { cecInfo.value = {

View File

@ -102,6 +102,7 @@ const props = defineProps({
required: true, required: true,
}, },
}); });
const bgCorWidth = computed(() => { const bgCorWidth = computed(() => {
let nub = toRaw(props.vipInfo.curpoint) / toRaw(props.vipInfo.target) * 100 let nub = toRaw(props.vipInfo.curpoint) / toRaw(props.vipInfo.target) * 100
return nub return nub

View File

@ -112,17 +112,17 @@ const labelList = ref([
const isLogout = ref(false); const isLogout = ref(false);
const cecInfoData = ref({ const cecInfoData = ref({
cecBalance: BigInt("0"), // cecBalance: BigInt("0"),
CecStaked: BigInt("0"), // CecStaked: BigInt("0"),
CecDisarm: BigInt("0"), // CecDisarm: BigInt("0"),
CecCollection: BigInt("0"), // CecCollection: BigInt("0"),
esCecBalance: BigInt("0"), // esCecBalance: BigInt("0"),
esCecStaked: BigInt("0"), // esCecStaked: BigInt("0"),
esCecConversion: BigInt("0"), // esCecConversion: BigInt("0"),
esCecCollection: BigInt("0"), // esCecCollection: BigInt("0"),
totalCollection: BigInt("0"), // totalCollection: BigInt("0"),
CecClaimable: BigInt("0"), // CecClaimable: BigInt("0"),
cecClaimAll: BigInt("0"), // cecClaimAll: BigInt("0"),
}); });
/** /**
@ -249,7 +249,7 @@ const userCecInfo = () => {
onMounted(() => { onMounted(() => {
if (localWalletStore.address) { if (localWalletStore.address) {
userCecInfo(); // userCecInfo();
} }
}); });
</script> </script>