feat: 添加法币充值页面,更新相关路由和组件,优化钱包卡片以支持充值功能
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
<script lang='ts' setup>
|
||||
import IcBaselineDataUsage from "~icons/ic/baseline-data-usage";
|
||||
import IcBaselineDownloading from "~icons/ic/baseline-downloading";
|
||||
const emit = defineEmits<{
|
||||
(e: "close"): void;
|
||||
}>();
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
async function handleFiatRecharge() {
|
||||
emit("close");
|
||||
router.push("/deposit/fiat");
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -16,7 +24,7 @@ import IcBaselineDownloading from "~icons/ic/baseline-downloading";
|
||||
<i-ic-round-arrow-forward-ios class="ml-auto color-text-400" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-10px">
|
||||
<div class="flex items-center gap-10px" @click="handleFiatRecharge">
|
||||
<i-ic-baseline-data-saver-off class="text-2xl" />
|
||||
<ion-label class="flex-1">
|
||||
<h2>Fiat currency</h2>
|
||||
@@ -29,8 +37,4 @@ import IcBaselineDownloading from "~icons/ic/baseline-downloading";
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang='css' scoped>
|
||||
.list {
|
||||
--background: transparent;
|
||||
}
|
||||
</style>
|
||||
<style lang='css' scoped></style>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<script lang='ts' setup>
|
||||
import { modalController } from "@ionic/vue";
|
||||
import { client } from "@/api";
|
||||
import RechargeChannel from "./recharge-channel.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
const { data } = await client.api.asset.balances.get();
|
||||
const rechargeInstance = ref<ModalInstance>();
|
||||
|
||||
function onCloseModal() {
|
||||
rechargeInstance.value?.$el.dismiss(null, "confirm");
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ion-modal class="recharge-channel-modal" trigger="open-modal" :initial-breakpoint="1" :breakpoints="[0]">
|
||||
<RechargeChannel />
|
||||
</ion-modal>
|
||||
|
||||
<div class="mt-20px">
|
||||
<div class="grid grid-cols-2 gap-20px p-20px bg-[var(--ion-card-background)] rounded-t-6px">
|
||||
<div v-for="item in data" :key="item.assetCode" class="flex flex-col gap-4px">
|
||||
@@ -36,6 +36,10 @@ const { data } = await client.api.asset.balances.get();
|
||||
</ion-buttons>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-modal ref="rechargeInstance" class="recharge-channel-modal" trigger="open-modal" :initial-breakpoint="1" :breakpoints="[0, 1]">
|
||||
<RechargeChannel @close="onCloseModal" />
|
||||
</ion-modal>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user