feat: 添加国际化支持,更新 RWA 申购页面和相关文本,优化用户体验
This commit is contained in:
@@ -7,6 +7,8 @@ const props = defineProps<{
|
||||
id: string;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const { data } = safeClient(client.api.rwa.subscription.available_editions({ editionId: props.id }).get());
|
||||
const model = useTemplateRef<ModalInstance>("model");
|
||||
|
||||
@@ -16,7 +18,7 @@ async function handleSubscribe(val: number) {
|
||||
quantity: String(val),
|
||||
}));
|
||||
const toast = await toastController.create({
|
||||
message: "申购成功",
|
||||
message: t("market.tradeRwa.subscribeSuccess"),
|
||||
duration: 2000,
|
||||
position: "bottom",
|
||||
color: "success",
|
||||
@@ -37,8 +39,8 @@ async function handleSubscribe(val: number) {
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
<ui-tabs size="small" class="px-4">
|
||||
<ui-tab-pane name="overview" title="Overview" />
|
||||
<ui-tab-pane name="moment" title="Moment" />
|
||||
<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">
|
||||
@@ -53,13 +55,13 @@ async function handleSubscribe(val: number) {
|
||||
<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>
|
||||
@@ -67,27 +69,27 @@ async function handleSubscribe(val: number) {
|
||||
<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) }}份</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) }}份</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>
|
||||
@@ -95,7 +97,7 @@ async function handleSubscribe(val: number) {
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
认购截止时间
|
||||
{{ t('market.tradeRwa.fields.subscriptionDeadline') }}
|
||||
</div>
|
||||
<div>{{ useDateFormat(data?.subscriptionDeadline || '', 'YYYY/MM/DD') }}</div>
|
||||
</ion-col>
|
||||
@@ -104,10 +106,10 @@ async function handleSubscribe(val: number) {
|
||||
|
||||
<div class="mt-5">
|
||||
<div class="font-semibold">
|
||||
About
|
||||
{{ t('market.tradeRwa.about') }}
|
||||
</div>
|
||||
<div class="text-xs mt-2">
|
||||
{{ data?.product.description || 'No description available.' }}
|
||||
{{ data?.product.description || t('market.tradeRwa.noDescription') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,7 +119,7 @@ async function handleSubscribe(val: number) {
|
||||
<ion-toolbar class="ion-padding-horizontal ui-toolbar">
|
||||
<div class="flex justify-center my-2 gap-5">
|
||||
<ion-button id="open-modal" shape="round" expand="block" color="success">
|
||||
申购
|
||||
{{ t('market.tradeRwa.subscribe') }}
|
||||
</ion-button>
|
||||
|
||||
<ion-modal ref="model" trigger="open-modal" :initial-breakpoint="0.4" :breakpoints="[0, 0.4]">
|
||||
|
||||
Reference in New Issue
Block a user