feat: 更新环境配置,添加 API 地址,优化数据获取逻辑,支持振动反馈功能
This commit is contained in:
@@ -13,7 +13,7 @@ const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const { updateBankAccounts } = useWalletStore();
|
||||
|
||||
const { data, refresh, onFetchResponse } = await safeClient(() => client.api.bank_account.get());
|
||||
const { data, execute, onFetchResponse } = await safeClient(() => client.api.bank_account.get());
|
||||
const bankCards = computed(() => data.value?.data || []);
|
||||
|
||||
onFetchResponse((data) => {
|
||||
@@ -64,7 +64,7 @@ async function handleSetDefault(card: any) {
|
||||
});
|
||||
|
||||
await toast.present();
|
||||
refresh();
|
||||
execute();
|
||||
}
|
||||
|
||||
// 删除银行卡
|
||||
@@ -89,7 +89,7 @@ async function handleDeleteCard(card: any) {
|
||||
color: "success",
|
||||
});
|
||||
await toast.present();
|
||||
refresh();
|
||||
execute();
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -99,7 +99,7 @@ async function handleDeleteCard(card: any) {
|
||||
}
|
||||
|
||||
onUpdated(() => {
|
||||
refresh();
|
||||
execute();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -115,7 +115,7 @@ onUpdated(() => {
|
||||
<IonContent :fullscreen="true">
|
||||
<div class="min-h-full">
|
||||
<div v-if="bankCards?.length === 0" class="flex flex-col items-center justify-center min-h-[60vh] p-8 text-center">
|
||||
<div class="w-20 h-20 rounded-full bg-linear-to-br from-indigo-500 to-purple-600 flex items-center justify-center mb-6 shadow-lg shadow-indigo-500/30">
|
||||
<div class="w-20 h-20 rounded-full bg-[#171717] flex items-center justify-center mb-6 shadow-lg">
|
||||
<ion-icon :icon="cardOutline" class="text-4xl text-white" />
|
||||
</div>
|
||||
<h3 class="text-xl font-semibold text-#151515 dark:text-white mb-2">
|
||||
@@ -126,7 +126,7 @@ onUpdated(() => {
|
||||
</p>
|
||||
<ion-button
|
||||
expand="block"
|
||||
class="h-12 font-semibold"
|
||||
color="success"
|
||||
@click="handleAddCard"
|
||||
>
|
||||
<ion-icon slot="start" :icon="addOutline" />
|
||||
|
||||
Reference in New Issue
Block a user