diff --git a/src/components/assets/assetsHeader.vue b/src/components/assets/assetsHeader.vue index 050bfeb..a9f39f6 100644 --- a/src/components/assets/assetsHeader.vue +++ b/src/components/assets/assetsHeader.vue @@ -845,7 +845,8 @@ const isBindVip = () => { if(bindPassportAddress.value) { vipDialogVisible.value = true } else { - alert('没有绑定') + // alert('没有绑定') + bindVipAddress() } } } @@ -860,16 +861,21 @@ const getVipDetails = async () => { const getIsBandVip = async () => { let res = await apiVipInfo() bindPassportAddress.value = res.info.bind_passport_address - console.log(res,'---------') } // 绑定VIP账号 const bindVipAddress = async () => { + await new BlockChain().appendPassport() const data = { - passport_jwt: '' + passport_jwt: 'Bearer ' + await new BlockChain().passportToken() } let res = await apiBindPassport(data) console.log(res) + if(res.errcode != 0) { + message.error(`${res.errmsg}`) + } else { + dataInfo() + } } const toStaking = (path) => { @@ -893,6 +899,7 @@ const dataInfo = async () => { } watch(localWalletStore,() => { + console.log(localWalletStore.token,'-------------------------') // console.log('localWalletStore.token',localWalletStore.address,localWalletStore.token) if(!localWalletStore.token) { cecInfo.value = { diff --git a/src/components/staking/vipDialog.vue b/src/components/staking/vipDialog.vue index 522e48a..159ed96 100644 --- a/src/components/staking/vipDialog.vue +++ b/src/components/staking/vipDialog.vue @@ -102,6 +102,7 @@ const props = defineProps({ required: true, }, }); + const bgCorWidth = computed(() => { let nub = toRaw(props.vipInfo.curpoint) / toRaw(props.vipInfo.target) * 100 return nub diff --git a/src/views/StakingView.vue b/src/views/StakingView.vue index 0f4510c..c04fe01 100644 --- a/src/views/StakingView.vue +++ b/src/views/StakingView.vue @@ -112,17 +112,17 @@ const labelList = ref([ const isLogout = ref(false); const cecInfoData = ref({ - cecBalance: BigInt("0"), - CecStaked: BigInt("0"), - CecDisarm: BigInt("0"), - CecCollection: BigInt("0"), - esCecBalance: BigInt("0"), - esCecStaked: BigInt("0"), - esCecConversion: BigInt("0"), - esCecCollection: BigInt("0"), - totalCollection: BigInt("0"), - CecClaimable: BigInt("0"), - cecClaimAll: BigInt("0"), + // cecBalance: BigInt("0"), + // CecStaked: BigInt("0"), + // CecDisarm: BigInt("0"), + // CecCollection: BigInt("0"), + // esCecBalance: BigInt("0"), + // esCecStaked: BigInt("0"), + // esCecConversion: BigInt("0"), + // esCecCollection: BigInt("0"), + // totalCollection: BigInt("0"), + // CecClaimable: BigInt("0"), + // cecClaimAll: BigInt("0"), }); /** @@ -249,7 +249,7 @@ const userCecInfo = () => { onMounted(() => { if (localWalletStore.address) { - userCecInfo(); + // userCecInfo(); } });