feat: 更新 API 地址,添加新的类型定义,优化表单提交逻辑

This commit is contained in:
2025-12-17 23:57:13 +07:00
parent bec77d187d
commit 8bf6c06889
6 changed files with 10 additions and 7 deletions

2
.env
View File

@@ -1 +1 @@
VITE_API_URL=http://192.168.1.54:9528
VITE_API_URL=http://192.168.1.36:9527

View File

@@ -11,6 +11,10 @@ export type TreatyQuery<T> = T extends (...args: any[]) => any
? NonNullable<NonNullable<Parameters<T>[0]>["query"]>
: never;
export type TreatyBody<T> = T extends (...args: any[]) => any
? NonNullable<Parameters<T>[0]>
: never;
export type DepositFiatData = Treaty.Data<typeof client.api.deposit.fiat.post>;
export type BalancesData = Treaty.Data<typeof client.api.asset.balances.get>;
@@ -22,17 +26,17 @@ export type WithdrawBody = Omit<Parameters<typeof client.api.withdraw.post>[0],
export type UserProfileData = Treaty.Data<typeof client.api.user.profile.get>["userProfile"];
export type UpdateUserProfileBody = TreatyQuery<typeof client.api.user.profile.put>;
export type UpdateUserProfileBody = TreatyBody<typeof client.api.user.profile.put>;
export type RwaIssuanceProductsData = Treaty.Data<typeof client.api.rwa.issuance.products.bundle.post>;
export type RwaIssuanceProductBody = TreatyQuery<typeof client.api.rwa.issuance.products.bundle.post>;
export type RwaIssuanceProductBody = TreatyBody<typeof client.api.rwa.issuance.products.bundle.post>;
export type RwaIssuanceCategoriesData = Treaty.Data<typeof client.api.rwa.issuance.categories.get>;
export type BankAccountsData = Treaty.Data<typeof client.api.bank_account.get>;
export type BankAccountBody = TreatyQuery<typeof client.api.bank_account.post>;
export type BankAccountBody = TreatyBody<typeof client.api.bank_account.post>;
export type BankAccountData = Treaty.Data<typeof client.api.bank_account.post>;

View File

@@ -106,7 +106,6 @@ function handleSubmit(values: GenericObject) {
<template #default="{ field }">
<ui-input-label
v-bind="field"
type="number"
inputmode="numeric"
:label="t('asset.issue.apply.totalSupplyLimit')"
:placeholder="t('asset.issue.apply.enterTotalSupplyLimit')"

View File

@@ -40,7 +40,7 @@ function handleNext(values: GenericObject) {
async function handleSubmit(editions: RwaIssuanceProductBody["editions"]) {
form.value.editions = editions;
await client.api.rwa.issuance.products.bundle.post(form.value);
await client.api.rwa.issuance.products.bundle_and_submit.post(form.value);
form.value = { ...initialData };
step.value = 3;
}

View File

@@ -45,6 +45,7 @@ const schema = toTypedSchema(yup.object({
}));
function handleSubmit(values: GenericObject) {
debugger;
emit("submit", values.editions);
}
</script>

View File

@@ -4,7 +4,6 @@ import { client, safeClient } from "@/api";
import Category from "./components/category.vue";
const [query] = useResetRef<AvailableSubscriptionBody>({
status: "open",
pageIndex: 1,
pageSize: 20,
categoryId: "",