diff --git a/src/api/enum.ts b/src/api/enum.ts
index 966d1d0..5be50ab 100644
--- a/src/api/enum.ts
+++ b/src/api/enum.ts
@@ -30,3 +30,8 @@ export enum GenderEnum {
FEMALE = "female",
OTHER = "other",
}
+
+export enum TradeTypeEnum {
+ BUY = "buy",
+ SELL = "sell",
+}
diff --git a/src/views/trade-tokenized/components/base.vue b/src/views/trade-tokenized/components/base.vue
index 4682b2f..88bf0d8 100644
--- a/src/views/trade-tokenized/components/base.vue
+++ b/src/views/trade-tokenized/components/base.vue
@@ -50,34 +50,6 @@ const { t } = useI18n();
{{ Number(data?.totalSupply) }}{{ t('market.tradeRwa.units.shares') }}
-
-
-
- {{ t('market.tradeRwa.fields.perUserLimit') }}
-
- {{ Number(data?.perUserLimit) }}{{ t('market.tradeRwa.units.shares') }}
-
-
-
- {{ t('market.tradeRwa.fields.launchDate') }}
-
- {{ useDateFormat(data?.launchDate || '', 'YYYY/MM/DD HH:mm') }}
-
-
-
-
-
- {{ t('market.tradeRwa.fields.subscriptionStartDate') }}
-
- {{ useDateFormat(data?.subscriptionStartDate || '', 'YYYY/MM/DD HH:mm') }}
-
-
-
- {{ t('market.tradeRwa.fields.subscriptionEndDate') }}
-
- {{ useDateFormat(data?.subscriptionEndDate || '', 'YYYY/MM/DD HH:mm') }}
-
-
diff --git a/src/views/trade-tokenized/index.vue b/src/views/trade-tokenized/index.vue
index a749bd9..0044d01 100644
--- a/src/views/trade-tokenized/index.vue
+++ b/src/views/trade-tokenized/index.vue
@@ -4,8 +4,9 @@ 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";
+import { TradeTypeEnum } from "@/api/enum";
+import About from "./components/about.vue";
+import Base from "./components/base.vue";
const props = defineProps<{
data: RwaData;
@@ -14,25 +15,8 @@ const props = defineProps<{
const { t } = useI18n();
const router = useRouter();
-const model = useTemplateRef("model");
-
-async function handleSubscribe(val: number) {
- await safeClient(client.api.rwa.subscription.apply.post({
- editionId: props.data.id,
- quantity: String(val),
- }));
- const toast = await toastController.create({
- message: t("market.tradeRwa.subscribeSuccess"),
- duration: 2000,
- position: "bottom",
- color: "success",
- });
-
- await toast.present();
- model.value?.$el.dismiss();
-}
-function gotoEdit() {
- router.push({ name: "trade-rwa-edit" });
+function gotoTrade(mode: TradeTypeEnum) {
+ router.push(`/layout/trade?mode=${mode}&type=RWA&symbol=${props.data.product.code}`);
}
@@ -70,10 +54,10 @@ function gotoEdit() {
-
+
-
+
@@ -81,13 +65,12 @@ function gotoEdit() {
-
- {{ t('market.tradeRwa.subscribe') }}
+
+ 买入
+
+
+ 卖出
-
-
-
-
diff --git a/src/views/trade-tokenized/outlet.vue b/src/views/trade-tokenized/outlet.vue
index 6341bd0..c0b45cd 100644
--- a/src/views/trade-tokenized/outlet.vue
+++ b/src/views/trade-tokenized/outlet.vue
@@ -5,7 +5,7 @@ const props = defineProps<{
id: string;
}>();
-const { data } = safeClient(client.api.rwa.subscription.available_editions({ editionId: props.id }).get());
+const { data } = safeClient(client.api.rwa.tokenization.tradable_products({ id: props.id }).get());
@@ -14,7 +14,7 @@ const { data } = safeClient(client.api.rwa.subscription.available_editions({ edi
- {{ data?.product.code }}
+ {{ data?.product?.code }}
diff --git a/src/views/trade/index.vue b/src/views/trade/index.vue
index d879123..e2122df 100644
--- a/src/views/trade/index.vue
+++ b/src/views/trade/index.vue
@@ -1,13 +1,17 @@