feat: 更新 RWA 数据类型,优化订阅相关字段,添加 RWA 详情组件
This commit is contained in:
@@ -45,11 +45,9 @@ export type BankAccountData = Treaty.Data<typeof client.api.bank_account.post>;
|
||||
|
||||
export type SupportBanksData = Treaty.Data<typeof client.api.bank_account.banks.get>;
|
||||
|
||||
export type AvailableSubscriptionData = Treaty.Data<typeof client.api.rwa.subscription.available_editions.get>;
|
||||
|
||||
export type AvailableSubscriptionBody = TreatyQuery<typeof client.api.rwa.subscription.available_editions.get>;
|
||||
|
||||
export type RwaData = Treaty.Data<typeof client.api.rwa.subscription.available_editions.get>;
|
||||
export type RwaData = Treaty.Data<typeof client.api.rwa.subscription.available_editions.get>["data"][number];
|
||||
|
||||
export type MySubscribeRwaData = Treaty.Data<typeof client.api.rwa.subscription.my_subscriptions.get>;
|
||||
|
||||
|
||||
@@ -157,8 +157,6 @@
|
||||
"enterPerUserLimit": "الرجاء إدخال الحد الأقصى للاشتراك الفردي",
|
||||
"totalSupply": "إجمالي الإصدار",
|
||||
"enterTotalSupply": "الرجاء إدخال إجمالي الإصدار",
|
||||
"subscriptionDeadline": "الموعد النهائي للاشتراك",
|
||||
"enterSubscriptionDeadline": "الرجاء إدخال الموعد النهائي للاشتراك",
|
||||
"subscriptionStartDate": "تاريخ بدء الاشتراك",
|
||||
"subscriptionEndDate": "تاريخ انتهاء الاشتراك",
|
||||
"unitPrice": "سعر الوحدة",
|
||||
@@ -188,8 +186,6 @@
|
||||
"subscriptionEndAfterStart": "يجب أن يكون تاريخ انتهاء الاشتراك بعد تاريخ بدء الاشتراك",
|
||||
"perUserLimitRequired": "الحد الأقصى للاشتراك الفردي مطلوب",
|
||||
"totalSupplyRequired": "إجمالي الإصدار مطلوب",
|
||||
"subscriptionDeadlineRequired": "الموعد النهائي للاشتراك مطلوب",
|
||||
"deadlineAfterLaunch": "لا يمكن أن يكون الموعد النهائي للاشتراك قبل تاريخ الإصدار",
|
||||
"unitPriceRequired": "سعر الوحدة مطلوب",
|
||||
"dividendRateRequired": "معدل الأرباح مطلوب"
|
||||
},
|
||||
@@ -248,7 +244,8 @@
|
||||
"totalSupply": "إجمالي الإصدار",
|
||||
"perUserLimit": "الحد لكل شخص",
|
||||
"launchDate": "وقت الإحماء",
|
||||
"subscriptionDeadline": "الموعد النهائي للاشتراك"
|
||||
"subscriptionStartDate": "تاريخ بدء الاشتراك",
|
||||
"subscriptionEndDate": "تاريخ انتهاء الاشتراك"
|
||||
},
|
||||
"units": {
|
||||
"shares": "أسهم"
|
||||
|
||||
@@ -157,8 +157,6 @@
|
||||
"enterPerUserLimit": "Please enter per user limit",
|
||||
"totalSupply": "Total Supply",
|
||||
"enterTotalSupply": "Please enter total supply",
|
||||
"subscriptionDeadline": "Subscription Deadline",
|
||||
"enterSubscriptionDeadline": "Please enter subscription deadline",
|
||||
"subscriptionStartDate": "Subscription Start Date",
|
||||
"subscriptionEndDate": "Subscription End Date",
|
||||
"unitPrice": "Unit Price",
|
||||
@@ -188,8 +186,6 @@
|
||||
"subscriptionEndAfterStart": "Subscription end date must be after subscription start date",
|
||||
"perUserLimitRequired": "Per user limit is required",
|
||||
"totalSupplyRequired": "Total supply is required",
|
||||
"subscriptionDeadlineRequired": "Subscription deadline is required",
|
||||
"deadlineAfterLaunch": "Subscription deadline cannot be earlier than launch date",
|
||||
"unitPriceRequired": "Unit price is required",
|
||||
"dividendRateRequired": "Dividend rate is required"
|
||||
},
|
||||
@@ -248,7 +244,8 @@
|
||||
"totalSupply": "Total Supply",
|
||||
"perUserLimit": "Per User Limit",
|
||||
"launchDate": "Warm-up Time",
|
||||
"subscriptionDeadline": "Subscription Deadline"
|
||||
"subscriptionStartDate": "Subscription Start Date",
|
||||
"subscriptionEndDate": "Subscription End Date"
|
||||
},
|
||||
"units": {
|
||||
"shares": "shares"
|
||||
|
||||
@@ -157,8 +157,6 @@
|
||||
"enterPerUserLimit": "请输入个人申购上限",
|
||||
"totalSupply": "发行总量",
|
||||
"enterTotalSupply": "请输入发行总量",
|
||||
"subscriptionDeadline": "申购截止日期",
|
||||
"enterSubscriptionDeadline": "请输入申购截止日期",
|
||||
"subscriptionStartDate": "订阅开始时间",
|
||||
"subscriptionEndDate": "订阅结束时间",
|
||||
"unitPrice": "单价",
|
||||
@@ -188,8 +186,6 @@
|
||||
"subscriptionEndAfterStart": "订阅结束时间必须在订阅开始时间之后",
|
||||
"perUserLimitRequired": "个人申购上限是必填项",
|
||||
"totalSupplyRequired": "发行总量是必填项",
|
||||
"subscriptionDeadlineRequired": "申购截止日期是必填项",
|
||||
"deadlineAfterLaunch": "申购截止日期不能小于发行日期",
|
||||
"unitPriceRequired": "单价是必填项",
|
||||
"dividendRateRequired": "分红率是必填项"
|
||||
},
|
||||
@@ -248,7 +244,8 @@
|
||||
"totalSupply": "总发行量",
|
||||
"perUserLimit": "每人限量",
|
||||
"launchDate": "预热时间",
|
||||
"subscriptionDeadline": "认购截止时间"
|
||||
"subscriptionStartDate": "订阅开始时间",
|
||||
"subscriptionEndDate": "订阅结束时间"
|
||||
},
|
||||
"units": {
|
||||
"shares": "份"
|
||||
|
||||
@@ -157,8 +157,6 @@
|
||||
"enterPerUserLimit": "請輸入個人申購上限",
|
||||
"totalSupply": "發行總量",
|
||||
"enterTotalSupply": "請輸入發行總量",
|
||||
"subscriptionDeadline": "申購截止日期",
|
||||
"enterSubscriptionDeadline": "請輸入申購截止日期",
|
||||
"subscriptionStartDate": "訂閱開始時間",
|
||||
"subscriptionEndDate": "訂閱結束時間",
|
||||
"unitPrice": "單價",
|
||||
@@ -188,8 +186,6 @@
|
||||
"subscriptionEndAfterStart": "訂閱結束時間必須在訂閱開始時間之後",
|
||||
"perUserLimitRequired": "個人申購上限是必填項",
|
||||
"totalSupplyRequired": "發行總量是必填項",
|
||||
"subscriptionDeadlineRequired": "申購截止日期是必填項",
|
||||
"deadlineAfterLaunch": "申購截止日期不能小於發行日期",
|
||||
"unitPriceRequired": "單價是必填項",
|
||||
"dividendRateRequired": "分紅率是必填項"
|
||||
},
|
||||
@@ -248,7 +244,8 @@
|
||||
"totalSupply": "總發行量",
|
||||
"perUserLimit": "每人限量",
|
||||
"launchDate": "預熱時間",
|
||||
"subscriptionDeadline": "認購截止時間"
|
||||
"subscriptionStartDate": "訂閱開始時間",
|
||||
"subscriptionEndDate": "訂閱結束時間"
|
||||
},
|
||||
"units": {
|
||||
"shares": "份"
|
||||
|
||||
@@ -4,7 +4,7 @@ import CryptocurrencyColorAppc from "~icons/cryptocurrency-color/appc";
|
||||
import CryptocurrencyColorNuls from "~icons/cryptocurrency-color/nuls";
|
||||
|
||||
defineProps<{
|
||||
data: RwaData["data"];
|
||||
data: RwaData[];
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -12,7 +12,7 @@ const [query] = useResetRef<AvailableSubscriptionBody>({
|
||||
offset: 0,
|
||||
categoryId: "",
|
||||
});
|
||||
const rwaData = ref<RwaData["data"]>([]);
|
||||
const rwaData = ref<RwaData[]>([]);
|
||||
const isFinished = ref(false);
|
||||
|
||||
async function fetchRwaData() {
|
||||
|
||||
23
src/views/trade-rwa/components/about.vue
Normal file
23
src/views/trade-rwa/components/about.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<script lang='ts' setup>
|
||||
import type { RwaData } from "@/api/types";
|
||||
|
||||
const props = defineProps<{
|
||||
data: RwaData | null;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mt-2">
|
||||
<!-- document -->
|
||||
<div class="mt-5">
|
||||
<div class="font-semibold">
|
||||
相关文档
|
||||
</div>
|
||||
<div class="text-xs mt-2">
|
||||
{{ data?.product.proofDocuments }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang='css' scoped></style>
|
||||
105
src/views/trade-rwa/components/base.vue
Normal file
105
src/views/trade-rwa/components/base.vue
Normal file
@@ -0,0 +1,105 @@
|
||||
<script lang='ts' setup>
|
||||
import type { RwaData } from "@/api/types";
|
||||
|
||||
const props = defineProps<{
|
||||
data: RwaData | null;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mt-2">
|
||||
<!-- Rwa about -->
|
||||
<div class="mt-5">
|
||||
<div class="font-semibold">
|
||||
{{ t('market.tradeRwa.about') }}
|
||||
</div>
|
||||
<div class="text-xs mt-2">
|
||||
{{ data?.product.description || t('market.tradeRwa.noDescription') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Rwa fields -->
|
||||
<ion-grid class="mt-5 text-sm space-y-5">
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.productCode') }}
|
||||
</div>
|
||||
<div>{{ data?.product.code }}</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.valuation') }}
|
||||
</div>
|
||||
<div>${{ formatAmount(data?.product.estimatedValue) }}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.unitPrice') }}
|
||||
</div>
|
||||
<div>${{ formatAmount(data?.unitPrice) }}</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.totalSupply') }}
|
||||
</div>
|
||||
<div>{{ Number(data?.totalSupply) }}{{ t('market.tradeRwa.units.shares') }}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.perUserLimit') }}
|
||||
</div>
|
||||
<div>{{ Number(data?.perUserLimit) }}{{ t('market.tradeRwa.units.shares') }}</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.launchDate') }}
|
||||
</div>
|
||||
<div>{{ useDateFormat(data?.launchDate || '', 'YYYY/MM/DD HH:mm') }}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.subscriptionStartDate') }}
|
||||
</div>
|
||||
<div>{{ useDateFormat(data?.subscriptionStartDate || '', 'YYYY/MM/DD HH:mm') }}</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.subscriptionEndDate') }}
|
||||
</div>
|
||||
<div>{{ useDateFormat(data?.subscriptionEndDate || '', 'YYYY/MM/DD HH:mm') }}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
<!-- Rwa status -->
|
||||
<div class="mt-5">
|
||||
<div class="font-semibold">
|
||||
资产状态
|
||||
</div>
|
||||
<div class="text-xs mt-2">
|
||||
{{ data?.status }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Rwa status history -->
|
||||
<div class="mt-5">
|
||||
<div class="font-semibold">
|
||||
状态历史
|
||||
</div>
|
||||
<div class="text-xs mt-2">
|
||||
{{ data?.status }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang='css' scoped></style>
|
||||
@@ -1,7 +1,10 @@
|
||||
<script lang='ts' setup>
|
||||
import { toastController } from "@ionic/vue";
|
||||
import CryptocurrencyColorNuls from "~icons/cryptocurrency-color/nuls";
|
||||
import IcSharpEditNote from "~icons/ic/sharp-edit-note";
|
||||
import { client, safeClient } from "@/api";
|
||||
import RwaAbout from "./components/about.vue";
|
||||
import RwaBase from "./components/base.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
id: string;
|
||||
@@ -31,88 +34,44 @@ async function handleSubscribe(val: number) {
|
||||
|
||||
<template>
|
||||
<ion-page>
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-header>
|
||||
<ion-toolbar class="ui-toolbar">
|
||||
<ion-back-button slot="start" text="" />
|
||||
<ion-title>
|
||||
{{ data?.product.code }}
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
<ui-tabs size="small" class="px-4">
|
||||
<ui-tab-pane name="overview" :title="t('market.tradeRwa.tabs.overview')" />
|
||||
<ui-tab-pane name="moment" :title="t('market.tradeRwa.tabs.moment')" />
|
||||
</ui-tabs>
|
||||
</ion-header>
|
||||
<ion-content :fullscreen="true" class="ion-padding">
|
||||
<div class="mt-5">
|
||||
<div>
|
||||
<div class="flex items-center space-x-2">
|
||||
<CryptocurrencyColorNuls class="text-2xl" />
|
||||
<div class="mr-2 text-lg font-semibold">
|
||||
<CryptocurrencyColorNuls class="text-3xl" />
|
||||
|
||||
<div class="mr-2">
|
||||
<div class="text-lg font-semibold">
|
||||
{{ data?.product.name }}
|
||||
</div>
|
||||
<div class="text-xs text-gray-500 font-semibold">
|
||||
{{ data?.product.category?.name }}
|
||||
</div>
|
||||
<ion-grid class="mt-5 text-sm space-y-5">
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.productCode') }}
|
||||
</div>
|
||||
<div>{{ data?.product.code }}</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.valuation') }}
|
||||
</div>
|
||||
<div>${{ formatAmount(data?.product.estimatedValue) }}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.unitPrice') }}
|
||||
<div class="flex items-center my-3">
|
||||
<IcSharpEditNote class="inline-block text-xl mr-1 text-text-500" />
|
||||
<div class="text-xs">
|
||||
编辑资产
|
||||
</div>
|
||||
<div>${{ formatAmount(data?.unitPrice) }}</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.totalSupply') }}
|
||||
</div>
|
||||
<div>{{ Number(data?.totalSupply) }}{{ t('market.tradeRwa.units.shares') }}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.perUserLimit') }}
|
||||
</div>
|
||||
<div>{{ Number(data?.perUserLimit) }}{{ t('market.tradeRwa.units.shares') }}</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.launchDate') }}
|
||||
</div>
|
||||
<div>{{ useDateFormat(data?.launchDate || '', 'YYYY/MM/DD') }}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.subscriptionDeadline') }}
|
||||
</div>
|
||||
<div>{{ useDateFormat(data?.subscriptionDeadline || '', 'YYYY/MM/DD') }}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
<div class="mt-5">
|
||||
<div class="font-semibold">
|
||||
{{ t('market.tradeRwa.about') }}
|
||||
</div>
|
||||
<div class="text-xs mt-2">
|
||||
{{ data?.product.description || t('market.tradeRwa.noDescription') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ui-tabs size="small">
|
||||
<ui-tab-pane name="overview" :title="t('market.tradeRwa.tabs.overview')">
|
||||
<RwaBase :data="data" />
|
||||
</ui-tab-pane>
|
||||
<ui-tab-pane name="about" title="相关文档">
|
||||
<RwaAbout :data="data" />
|
||||
</ui-tab-pane>
|
||||
</ui-tabs>
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
|
||||
Reference in New Issue
Block a user