feat: 更新 @riwa/api-types 依赖至 0.0.133,修复锁仓组件的提交逻辑,调整订单组件的模态框初始断点

This commit is contained in:
2026-01-13 01:57:42 +07:00
parent 8d46de592d
commit 62f1c88d2c
5 changed files with 75 additions and 12 deletions

View File

@@ -35,7 +35,7 @@
"@elysiajs/eden": "^1.4.5", "@elysiajs/eden": "^1.4.5",
"@ionic/vue": "^8.7.11", "@ionic/vue": "^8.7.11",
"@ionic/vue-router": "^8.7.11", "@ionic/vue-router": "^8.7.11",
"@riwa/api-types": "http://192.168.1.7:9528/api/riwa-eden-0.0.132.tgz", "@riwa/api-types": "http://192.168.1.7:9528/api/riwa-eden-0.0.133.tgz",
"@tailwindcss/vite": "^4.1.18", "@tailwindcss/vite": "^4.1.18",
"@vee-validate/zod": "^4.15.1", "@vee-validate/zod": "^4.15.1",
"@vueuse/core": "^14.1.0", "@vueuse/core": "^14.1.0",

12
pnpm-lock.yaml generated
View File

@@ -69,8 +69,8 @@ importers:
specifier: ^8.7.11 specifier: ^8.7.11
version: 8.7.11(@stencil/core@4.39.0)(vue-router@4.6.3(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3)) version: 8.7.11(@stencil/core@4.39.0)(vue-router@4.6.3(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3))
'@riwa/api-types': '@riwa/api-types':
specifier: http://192.168.1.7:9528/api/riwa-eden-0.0.132.tgz specifier: http://192.168.1.7:9528/api/riwa-eden-0.0.133.tgz
version: '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.132.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))' version: '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.133.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))'
'@tailwindcss/vite': '@tailwindcss/vite':
specifier: ^4.1.18 specifier: ^4.1.18
version: 4.1.18(vite@7.2.7(@types/node@24.10.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.1)(yaml@2.8.2)) version: 4.1.18(vite@7.2.7(@types/node@24.10.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.1)(yaml@2.8.2))
@@ -2804,9 +2804,9 @@ packages:
'@remirror/core-constants@3.0.0': '@remirror/core-constants@3.0.0':
resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==} resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==}
'@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.132.tgz': '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.133.tgz':
resolution: {tarball: http://192.168.1.7:9528/api/riwa-eden-0.0.132.tgz} resolution: {tarball: http://192.168.1.7:9528/api/riwa-eden-0.0.133.tgz}
version: 0.0.132 version: 0.0.133
peerDependencies: peerDependencies:
'@elysiajs/eden': ^1.4.5 '@elysiajs/eden': ^1.4.5
@@ -12161,7 +12161,7 @@ snapshots:
'@remirror/core-constants@3.0.0': {} '@remirror/core-constants@3.0.0': {}
'@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.132.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))': '@riwa/eden@http://192.168.1.7:9528/api/riwa-eden-0.0.133.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
dependencies: dependencies:
'@elysiajs/eden': 1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)) '@elysiajs/eden': 1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3))

View File

@@ -97,7 +97,7 @@ export function useAppUpdate() {
// 模拟后端返回数据(开发阶段) // 模拟后端返回数据(开发阶段)
await new Promise(resolve => setTimeout(resolve, 500)); await new Promise(resolve => setTimeout(resolve, 500));
const versionInfo: VersionInfo = { const versionInfo: VersionInfo = {
version: "0.0.2", // 模拟有新版本 version: "0.0.1", // 模拟有新版本
forceUpdate: false, forceUpdate: false,
updateMessage: "修复了一些问题并优化了性能", updateMessage: "修复了一些问题并优化了性能",
updateUrl: updateUrls[platform] || "", updateUrl: updateUrls[platform] || "",

View File

@@ -1,13 +1,76 @@
<script lang='ts' setup> <script lang='ts' setup>
import { toastController } from "@ionic/vue";
import { client, safeClient } from "@/api";
const props = defineProps<{ id: string }>();
const emit = defineEmits<{
close: [];
}>();
const { data } = safeClient(client.api.rwa.tokenization.lock_options.get({ query: { productId: props.id } }));
const selectedOption = ref<{ months: number; rewardRate: string } | null>(null);
async function handleSubmit() {
await safeClient(client.api.rwa.tokenization.locked.post({
lockMonths: selectedOption.value!.months,
productId: props.id,
}));
emit("close");
const toast = await toastController.create({
message: "锁仓成功",
duration: 2000,
position: "bottom",
color: "success",
});
await toast.present();
}
</script> </script>
<template> <template>
<div class="ion-padding"> <div class="ion-padding">
<ion-button expand="block" color="primary"> <div class="mb-4">
<h3 class="text-lg font-semibold mb-2">
选择锁仓期限
</h3>
<p class="text-sm text-text-500">
选择锁仓月数锁仓期间可获得相应奖励
</p>
</div>
<div v-if="data?.lockOptions">
<ion-list lines="none">
<ion-radio-group v-model="selectedOption">
<ion-item
v-for="option in data.lockOptions"
:key="option.months"
class="bg-faint rounded-md mb-3"
>
<ion-radio :value="option" justify="space-between" color="primary">
<div>{{ option.months }} 个月 - {{ (Number(option.rewardRate) * 100).toFixed(2) }}% 收益</div>
</ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
</div>
<ui-empty v-else-if="!data || data.lockOptions.length === 0" description="暂无锁仓选项" />
<ion-button
expand="block"
color="primary"
:disabled="!selectedOption"
shape="round"
class="mt-6 h-12"
@click="handleSubmit"
>
确定 确定
</ion-button> </ion-button>
</div> </div>
</template> </template>
<style lang='css' scoped></style> <style lang='css' scoped>
ion-item {
--background: transparent;
}
</style>

View File

@@ -75,8 +75,8 @@ async function handleLocked(item: HoldingItem) {
componentProps: { componentProps: {
id: item.productId, id: item.productId,
}, },
initialBreakpoint: 0.35, initialBreakpoint: 0.5,
breakpoints: [0, 0.35], breakpoints: [0, 0.5],
handle: true, handle: true,
}); });
await modal.present(); await modal.present();