feat: 更新 API 地址,添加充值渠道组件,优化钱包卡片以支持充值功能
This commit is contained in:
2
.env
2
.env
@@ -1 +1 @@
|
|||||||
VITE_API_URL=http://192.168.1.36:9527
|
VITE_API_URL=http://192.168.1.36:9528
|
||||||
16
components.d.ts
vendored
16
components.d.ts
vendored
@@ -12,6 +12,10 @@ export {}
|
|||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
|
IIcBaselineArrowForwardIos: typeof import('~icons/ic/baseline-arrow-forward-ios')['default']
|
||||||
|
IIcBaselineDataSaverOff: typeof import('~icons/ic/baseline-data-saver-off')['default']
|
||||||
|
IIcBaselineDownloading: typeof import('~icons/ic/baseline-downloading')['default']
|
||||||
|
IIcRoundArrowForwardIos: typeof import('~icons/ic/round-arrow-forward-ios')['default']
|
||||||
IonApp: typeof import('@ionic/vue')['IonApp']
|
IonApp: typeof import('@ionic/vue')['IonApp']
|
||||||
IonAvatar: typeof import('@ionic/vue')['IonAvatar']
|
IonAvatar: typeof import('@ionic/vue')['IonAvatar']
|
||||||
IonBackButton: typeof import('@ionic/vue')['IonBackButton']
|
IonBackButton: typeof import('@ionic/vue')['IonBackButton']
|
||||||
@@ -25,8 +29,12 @@ declare module 'vue' {
|
|||||||
IonContent: typeof import('@ionic/vue')['IonContent']
|
IonContent: typeof import('@ionic/vue')['IonContent']
|
||||||
IonHeader: typeof import('@ionic/vue')['IonHeader']
|
IonHeader: typeof import('@ionic/vue')['IonHeader']
|
||||||
IonIcon: typeof import('@ionic/vue')['IonIcon']
|
IonIcon: typeof import('@ionic/vue')['IonIcon']
|
||||||
|
IonImg: typeof import('@ionic/vue')['IonImg']
|
||||||
IonInputOtp: typeof import('@ionic/vue')['IonInputOtp']
|
IonInputOtp: typeof import('@ionic/vue')['IonInputOtp']
|
||||||
|
IonItem: typeof import('@ionic/vue')['IonItem']
|
||||||
IonLabel: typeof import('@ionic/vue')['IonLabel']
|
IonLabel: typeof import('@ionic/vue')['IonLabel']
|
||||||
|
IonList: typeof import('@ionic/vue')['IonList']
|
||||||
|
IonModal: typeof import('@ionic/vue')['IonModal']
|
||||||
IonPage: typeof import('@ionic/vue')['IonPage']
|
IonPage: typeof import('@ionic/vue')['IonPage']
|
||||||
IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet']
|
IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet']
|
||||||
IonSearchbar: typeof import('@ionic/vue')['IonSearchbar']
|
IonSearchbar: typeof import('@ionic/vue')['IonSearchbar']
|
||||||
@@ -47,6 +55,10 @@ declare module 'vue' {
|
|||||||
|
|
||||||
// For TSX support
|
// For TSX support
|
||||||
declare global {
|
declare global {
|
||||||
|
const IIcBaselineArrowForwardIos: typeof import('~icons/ic/baseline-arrow-forward-ios')['default']
|
||||||
|
const IIcBaselineDataSaverOff: typeof import('~icons/ic/baseline-data-saver-off')['default']
|
||||||
|
const IIcBaselineDownloading: typeof import('~icons/ic/baseline-downloading')['default']
|
||||||
|
const IIcRoundArrowForwardIos: typeof import('~icons/ic/round-arrow-forward-ios')['default']
|
||||||
const IonApp: typeof import('@ionic/vue')['IonApp']
|
const IonApp: typeof import('@ionic/vue')['IonApp']
|
||||||
const IonAvatar: typeof import('@ionic/vue')['IonAvatar']
|
const IonAvatar: typeof import('@ionic/vue')['IonAvatar']
|
||||||
const IonBackButton: typeof import('@ionic/vue')['IonBackButton']
|
const IonBackButton: typeof import('@ionic/vue')['IonBackButton']
|
||||||
@@ -60,8 +72,12 @@ declare global {
|
|||||||
const IonContent: typeof import('@ionic/vue')['IonContent']
|
const IonContent: typeof import('@ionic/vue')['IonContent']
|
||||||
const IonHeader: typeof import('@ionic/vue')['IonHeader']
|
const IonHeader: typeof import('@ionic/vue')['IonHeader']
|
||||||
const IonIcon: typeof import('@ionic/vue')['IonIcon']
|
const IonIcon: typeof import('@ionic/vue')['IonIcon']
|
||||||
|
const IonImg: typeof import('@ionic/vue')['IonImg']
|
||||||
const IonInputOtp: typeof import('@ionic/vue')['IonInputOtp']
|
const IonInputOtp: typeof import('@ionic/vue')['IonInputOtp']
|
||||||
|
const IonItem: typeof import('@ionic/vue')['IonItem']
|
||||||
const IonLabel: typeof import('@ionic/vue')['IonLabel']
|
const IonLabel: typeof import('@ionic/vue')['IonLabel']
|
||||||
|
const IonList: typeof import('@ionic/vue')['IonList']
|
||||||
|
const IonModal: typeof import('@ionic/vue')['IonModal']
|
||||||
const IonPage: typeof import('@ionic/vue')['IonPage']
|
const IonPage: typeof import('@ionic/vue')['IonPage']
|
||||||
const IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet']
|
const IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet']
|
||||||
const IonSearchbar: typeof import('@ionic/vue')['IonSearchbar']
|
const IonSearchbar: typeof import('@ionic/vue')['IonSearchbar']
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import zhCN from "./zh-CN.json";
|
|||||||
export type MessageSchema = typeof enUS;
|
export type MessageSchema = typeof enUS;
|
||||||
|
|
||||||
const i18n = createI18n<MessageSchema, "en-US" | "zh-CN">({
|
const i18n = createI18n<MessageSchema, "en-US" | "zh-CN">({
|
||||||
|
legacy: false,
|
||||||
locale: "en-US",
|
locale: "en-US",
|
||||||
fallbackLocale: "en-US",
|
fallbackLocale: "en-US",
|
||||||
messages: {
|
messages: {
|
||||||
|
|||||||
36
src/views/user/components/recharge-channel.vue
Normal file
36
src/views/user/components/recharge-channel.vue
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<script lang='ts' setup>
|
||||||
|
import IcBaselineDataUsage from "~icons/ic/baseline-data-usage";
|
||||||
|
import IcBaselineDownloading from "~icons/ic/baseline-downloading";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="w-full h-200px p-20px flex justify-center flex-col gap-30px">
|
||||||
|
<div class="flex items-center gap-10px">
|
||||||
|
<i-ic-baseline-downloading class="text-2xl" />
|
||||||
|
<ion-label class="flex-1">
|
||||||
|
<h2>Chain recharge</h2>
|
||||||
|
<p class="w-80% text-sm">
|
||||||
|
Transfer crypto from on-chain wallet or exchange.
|
||||||
|
</p>
|
||||||
|
</ion-label>
|
||||||
|
<i-ic-round-arrow-forward-ios class="ml-auto color-text-400" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center gap-10px">
|
||||||
|
<i-ic-baseline-data-saver-off class="text-2xl" />
|
||||||
|
<ion-label class="flex-1">
|
||||||
|
<h2>Fiat currency</h2>
|
||||||
|
<p class="w-80% text-sm">
|
||||||
|
Transfer fiat currency through bank or other financial institutions.
|
||||||
|
</p>
|
||||||
|
</ion-label>
|
||||||
|
<i-ic-round-arrow-forward-ios class="ml-auto color-text-400" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang='css' scoped>
|
||||||
|
.list {
|
||||||
|
--background: transparent;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,11 +1,17 @@
|
|||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
|
import { modalController } from "@ionic/vue";
|
||||||
import { client } from "@/api";
|
import { client } from "@/api";
|
||||||
|
import RechargeChannel from "./recharge-channel.vue";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { data } = await client.api.asset.balances.get();
|
const { data } = await client.api.asset.balances.get();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<ion-modal class="recharge-channel-modal" trigger="open-modal" :initial-breakpoint="1" :breakpoints="[0]">
|
||||||
|
<RechargeChannel />
|
||||||
|
</ion-modal>
|
||||||
|
|
||||||
<div class="mt-20px">
|
<div class="mt-20px">
|
||||||
<div class="grid grid-cols-2 gap-20px p-20px bg-[var(--ion-card-background)] rounded-t-6px">
|
<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">
|
<div v-for="item in data" :key="item.assetCode" class="flex flex-col gap-4px">
|
||||||
@@ -20,9 +26,10 @@ const { data } = await client.api.asset.balances.get();
|
|||||||
|
|
||||||
<div class="px-10px pb-20px bg-[var(--ion-card-background)] rounded-b-6px">
|
<div class="px-10px pb-20px bg-[var(--ion-card-background)] rounded-b-6px">
|
||||||
<ion-buttons class="gap-10px" expand="block">
|
<ion-buttons class="gap-10px" expand="block">
|
||||||
<ion-button expand="block" fill="clear">
|
<ion-button id="open-modal" expand="block" fill="clear">
|
||||||
{{ t("wallet.recharge") }}
|
{{ t("wallet.recharge") }}
|
||||||
</ion-button>
|
</ion-button>
|
||||||
|
|
||||||
<ion-button expand="block" fill="clear">
|
<ion-button expand="block" fill="clear">
|
||||||
{{ t("wallet.withdraw") }}
|
{{ t("wallet.withdraw") }}
|
||||||
</ion-button>
|
</ion-button>
|
||||||
@@ -31,4 +38,8 @@ const { data } = await client.api.asset.balances.get();
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
.recharge-channel-modal {
|
||||||
|
--height: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user