feat: 更新数据类型为 TradableData,修正相关文档和属性访问
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<script lang='ts' setup>
|
||||
import type { RwaData } from "@/api/types";
|
||||
import type { TradableData } from "@/api/types";
|
||||
|
||||
const props = defineProps<{
|
||||
data: RwaData | null;
|
||||
data: TradableData | null;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
@@ -14,7 +14,7 @@ const props = defineProps<{
|
||||
相关文档
|
||||
</div>
|
||||
<div class="text-xs mt-2">
|
||||
{{ data?.product.proofDocuments }}
|
||||
{{ data?.product?.proofDocuments }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script lang='ts' setup>
|
||||
import type { RwaData } from "@/api/types";
|
||||
import type { TradableData } from "@/api/types";
|
||||
|
||||
const props = defineProps<{
|
||||
data: RwaData | null;
|
||||
data: TradableData | null;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
@@ -16,7 +16,7 @@ const { t } = useI18n();
|
||||
{{ t('market.tradeRwa.about') }}
|
||||
</div>
|
||||
<div class="text-xs mt-2">
|
||||
{{ data?.product.description || t('market.tradeRwa.noDescription') }}
|
||||
{{ data?.product?.description || t('market.tradeRwa.noDescription') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,21 +27,21 @@ const { t } = useI18n();
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.productCode') }}
|
||||
</div>
|
||||
<div>{{ data?.product.code }}</div>
|
||||
<div>{{ data?.product?.code }}</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.valuation') }}
|
||||
</div>
|
||||
<div>${{ formatAmountWithUnit(data?.product.estimatedValue) }}</div>
|
||||
<div>${{ formatAmountWithUnit(data?.product?.estimatedValue) }}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
{{ t('market.tradeRwa.fields.unitPrice') }}
|
||||
链类型
|
||||
</div>
|
||||
<div>${{ formatAmountWithUnit(data?.unitPrice) }}</div>
|
||||
<div>{{ data?.chainType }}</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="label">
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
<script lang='ts' setup>
|
||||
import type { RwaData } from "@/api/types";
|
||||
import { toastController } from "@ionic/vue";
|
||||
import type { TradableData } from "@/api/types";
|
||||
import CryptocurrencyColorNuls from "~icons/cryptocurrency-color/nuls";
|
||||
import IcSharpEditNote from "~icons/ic/sharp-edit-note";
|
||||
import { client, safeClient } from "@/api";
|
||||
import { TradeTypeEnum } from "@/api/enum";
|
||||
import About from "./components/about.vue";
|
||||
import Base from "./components/base.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
data: RwaData;
|
||||
data: TradableData;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
||||
function gotoTrade(mode: TradeTypeEnum) {
|
||||
router.push(`/layout/trade?mode=${mode}&symbol=${props.data.product.code}`);
|
||||
router.push(`/layout/trade?mode=${mode}&symbol=${props.data.asset?.tradingPairsAsBase[0].symbol}`);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -26,7 +23,7 @@ function gotoTrade(mode: TradeTypeEnum) {
|
||||
<ion-toolbar class="ion-toolbar">
|
||||
<ui-back-button slot="start" text="" />
|
||||
<ion-title>
|
||||
{{ data?.product.code }}
|
||||
{{ data?.product?.code }}
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
@@ -37,10 +34,10 @@ function gotoTrade(mode: TradeTypeEnum) {
|
||||
|
||||
<div class="mr-2">
|
||||
<div class="text-lg font-semibold">
|
||||
{{ data?.product.name }}
|
||||
{{ data?.product?.name }}
|
||||
</div>
|
||||
<div class="text-xs text-gray-500 font-semibold">
|
||||
{{ data?.product.category?.name }}
|
||||
{{ data?.product?.category?.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user