diff --git a/src/components/assets/assetsHeader.vue b/src/components/assets/assetsHeader.vue
index 64e5a52..050bfeb 100644
--- a/src/components/assets/assetsHeader.vue
+++ b/src/components/assets/assetsHeader.vue
@@ -7,9 +7,9 @@
-
+
-
![]()
+
-
+
@@ -503,7 +503,7 @@ import ConfirmDialog from "@/components/Dialogs/confirmDialog.vue";
import VipDialog from "@/components/staking/vipDialog.vue";
import LoadingDialog from "@/components/Dialogs/loadingDialog.vue"
import {createModal} from "@/utils/model.util";
-import { apiCecInfo, apiExpected, apiUserData, apiContribution, apiRechargeGoods, apiRechargeHistory, apiDiamondHistory, apiGameLog, apiSwitch } from "@/utils/marketplace"
+import { apiCecInfo, apiExpected, apiUserData, apiContribution, apiRechargeGoods, apiRechargeHistory, apiDiamondHistory, apiGameLog, apiSwitch, apiVipInfo, apiBindPassport, apiVipDetails } from "@/utils/marketplace"
import { priceCalculated, timeFormat, contributionLogs, sliceAddress } from "@/configs/priceCalculate"
import { rechargeImgList, stakingVipImgList } from "@/configs/cenImg"
import { icon_usdc, icon_pass } from "@/configs/configchain"
@@ -829,12 +829,48 @@ const getGameLog = async () => {
// vip-------------------------------------start
const vipDialogVisible = ref(false)
+const bindPassportAddress = ref()
+const vipInfo = ref({
+ level: 0,
+ curpoint: 0,
+ target: 0,
+})
const vipHandleClose = () => {
vipDialogVisible.value = false
}
+const isBindVip = () => {
+ if(localWalletStore.token) {
+ // alert('先登录')
+ // } else {
+ if(bindPassportAddress.value) {
+ vipDialogVisible.value = true
+ } else {
+ alert('没有绑定')
+ }
+ }
+}
// 获取vip等级
+const getVipDetails = async () => {
+ let src = await apiVipDetails()
+ vipInfo.value = src.info
+}
+// 查看是否绑定账号
+const getIsBandVip = async () => {
+ let res = await apiVipInfo()
+ bindPassportAddress.value = res.info.bind_passport_address
+ console.log(res,'---------')
+}
+
+// 绑定VIP账号
+const bindVipAddress = async () => {
+ const data = {
+ passport_jwt: ''
+ }
+ let res = await apiBindPassport(data)
+ console.log(res)
+}
const toStaking = (path) => {
router.push(path);
@@ -845,6 +881,8 @@ const dataInfo = async () => {
// const bc = new BlockChain()
// isPassprotLogin.value = bc.passportLogined
// console.log(isPassprotLogin.value)
+ await getVipDetails()
+ await getIsBandVip()
await getMintSwitch()
await getCecInfo()
await getContribution()
@@ -884,7 +922,7 @@ watch(localWalletStore,() => {
})
onMounted(() => {
- dataInfo()
+ // dataInfo()
})
diff --git a/src/components/staking/vipDialog.vue b/src/components/staking/vipDialog.vue
index 8c7b467..522e48a 100644
--- a/src/components/staking/vipDialog.vue
+++ b/src/components/staking/vipDialog.vue
@@ -16,10 +16,10 @@
-

+
-
VIP 5
+
VIP {{ props.vipInfo.level == 0 ? '1' : props.vipInfo.level }}
VIP status is normal
VIP Points System
@@ -41,8 +41,8 @@
-
-
2501/3000
+
+
{{ props.vipInfo.curpoint }}/{{ props.vipInfo.target }}