feat: 更新环境配置,添加 API 地址,优化数据获取逻辑,支持振动反馈功能

This commit is contained in:
2025-12-18 22:23:18 +07:00
parent 6ceb80e6f2
commit f570cbce84
20 changed files with 259 additions and 92 deletions

View File

@@ -1,4 +1,5 @@
<script setup lang="ts">
import type { RefresherCustomEvent } from "@ionic/vue";
import { notificationsOutline, scanOutline, settingsOutline } from "ionicons/icons";
import Asset from "./components/asset.vue";
import IssuingAsset from "./components/issuing-asset.vue";
@@ -6,6 +7,17 @@ import MyRevenue from "./components/my-revenue.vue";
import TradeSettings from "./components/trade-settings.vue";
import UserInfo from "./components/user-info.vue";
import WalletCard from "./components/wallet-card.vue";
const { vibrate } = useHaptics();
const walletStore = useWalletStore();
async function handleRefresh(event: RefresherCustomEvent) {
vibrate();
await walletStore.initializeWallet();
setTimeout(() => {
event.target.complete();
}, 500);
}
</script>
<template>
@@ -26,6 +38,10 @@ import WalletCard from "./components/wallet-card.vue";
</ion-toolbar>
</ion-header>
<IonContent :fullscreen="true" class="ion-padding">
<ion-refresher slot="fixed" @ion-refresh="handleRefresh($event)">
<ion-refresher-content />
</ion-refresher>
<div class="flex flex-col space-y-5">
<UserInfo />
<WalletCard />