质押cec 查询是否绑定passport账号
This commit is contained in:
parent
da3f90c391
commit
9b55445dc8
@ -15,7 +15,7 @@ export const useStakingStore = defineStore('staking', () => {
|
|||||||
esCecCollection: BigInt('0'),
|
esCecCollection: BigInt('0'),
|
||||||
totalCollection: BigInt('0'),
|
totalCollection: BigInt('0'),
|
||||||
})
|
})
|
||||||
// const currencyPrice = ref([])
|
const bindPassportAddress = ref([])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -23,6 +23,10 @@ export const useStakingStore = defineStore('staking', () => {
|
|||||||
cecInfoData.value = _connected;
|
cecInfoData.value = _connected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const updateBindPassportAddressStatus = (_connected) => {
|
||||||
|
bindPassportAddress.value = _connected;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const priceDatas = computed(() => {
|
// const priceDatas = computed(() => {
|
||||||
@ -32,7 +36,8 @@ export const useStakingStore = defineStore('staking', () => {
|
|||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
cecInfoData
|
cecInfoData,
|
||||||
|
bindPassportAddress
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -230,3 +230,9 @@ export const apiGameLog = async (data) => {
|
|||||||
const url = `https://gamelog-test.kingsome.cn/webapp/index.php?c=GameLog&a=customReport`
|
const url = `https://gamelog-test.kingsome.cn/webapp/index.php?c=GameLog&a=customReport`
|
||||||
return httpPost(url,data)
|
return httpPost(url,data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断是否绑定passport账号
|
||||||
|
export const apiVipInfo = async () => {
|
||||||
|
const url = `${API_BASE}/api/vip/info`
|
||||||
|
return httpGet(url)
|
||||||
|
}
|
||||||
|
@ -58,6 +58,7 @@ import Staking from "@/components/staking/index.vue";
|
|||||||
import Conversion from "@/components/staking/conversion.vue";
|
import Conversion from "@/components/staking/conversion.vue";
|
||||||
import { BlockChain } from "@/components/chain/BlockChain"
|
import { BlockChain } from "@/components/chain/BlockChain"
|
||||||
// import { switchEthereumChain } from "@/components/chain/utils"
|
// import { switchEthereumChain } from "@/components/chain/utils"
|
||||||
|
import { apiVipInfo } from "@/utils/marketplace"
|
||||||
import {walletStore} from "@/store/wallet";
|
import {walletStore} from "@/store/wallet";
|
||||||
import { useStakingStore } from "@/store/staking"
|
import { useStakingStore } from "@/store/staking"
|
||||||
|
|
||||||
@ -103,6 +104,15 @@ const getNetId = async () => {
|
|||||||
await new BlockChain().checkNetId(localWalletStore.walletType)
|
await new BlockChain().checkNetId(localWalletStore.walletType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断是否绑定passport账号
|
||||||
|
const getVipInfo = async () => {
|
||||||
|
const { errcode, info } = await apiVipInfo()
|
||||||
|
console.log('bind_passport_address',info.bind_passport_address)
|
||||||
|
if(errcode == 0) {
|
||||||
|
stakingStore.bindPassportAddress = info.bind_passport_address
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 发送推文
|
// 发送推文
|
||||||
const toTwitter = () => {
|
const toTwitter = () => {
|
||||||
const url = "https://twitter.com/intent/tweet?text=";
|
const url = "https://twitter.com/intent/tweet?text=";
|
||||||
@ -117,6 +127,7 @@ onMounted(() => {
|
|||||||
console.log(toRaw(stakingStore.cecInfoData))
|
console.log(toRaw(stakingStore.cecInfoData))
|
||||||
if(localWalletStore.address) {
|
if(localWalletStore.address) {
|
||||||
getNetId()
|
getNetId()
|
||||||
|
getVipInfo()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user