From 43280fa44751cdbdc024433e9bc88f98df5eca46 Mon Sep 17 00:00:00 2001 From: niannian zheng Date: Mon, 2 Mar 2026 19:05:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=BB=9F=E4=B8=80API=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E5=92=8C=E5=AD=97=E6=AE=B5=E5=91=BD=E5=90=8D=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E8=AF=B7=E6=B1=82=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将API路径从'/api/user/info'改为'api/v1/user/info'以统一版本前缀 - 将数据字段从大驼峰改为小驼峰命名规范 - 使用onShow替代onMounted并添加防重复请求机制 - 移除策略编辑页面的导航栏,简化页面结构 - 优化交易记录页面按钮样式和文案 --- pages/detail/detail.vue | 30 +++++++++++++------- pages/index/index.vue | 50 +++++++++++++++++++-------------- pages/strategies/edit/edit.vue | 8 ------ pages/strategies/strategies.vue | 11 ++++++-- utils/api.js | 4 +-- 5 files changed, 60 insertions(+), 43 deletions(-) diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index 74a3558..a88e123 100644 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -116,18 +116,18 @@ - {{ log.Date }} - {{ log.Time }} + {{ log.date }} + {{ log.time }} - + - {{ log.Title }} - {{ log.Type === 'buy' ? '录入增加' : '结出减少' }} {{ log.Amount }} + {{ log.title }} + {{ log.type === 'buy' ? '增加' : '减少' }} {{ log.amount }} @@ -136,11 +136,11 @@ @@ -148,7 +148,7 @@ - {{ transactionType === 'buy' ? '录入增加' : '结出减少' }} + {{ transactionType === 'buy' ? '增加' : '减少' }} @@ -302,8 +302,8 @@ onMounted(async () => { }); const goStrategyConfig = () => { - if (portfolioData.value.strategy?.Id) { - uni.navigateTo({ url: `/pages/strategies/edit/edit?id=${portfolioData.value.strategy.Id}` }); + if (portfolioData.value.strategy?.id) { + uni.navigateTo({ url: `/pages/strategies/edit/edit?id=${portfolioData.value.strategy.id}` }); } }; @@ -538,6 +538,16 @@ const submitTransaction = async () => { font-size: 30rpx; font-weight: 700; border: none; + flex-direction: row; + padding: 0 16rpx; + box-sizing: border-box; +} +.btn-text { + font-size: 30rpx; + font-weight: 700; + text-align: center; + line-height: 1.3; + white-space: nowrap; } .btn-buy { background-color: #064E3B; color: #FFFFFF; box-shadow: 0 8rpx 20rpx rgba(6, 78, 59, 0.2); } .btn-buy:active { background-color: #047857; } diff --git a/pages/index/index.vue b/pages/index/index.vue index 8266200..a9c0e5a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -91,7 +91,7 @@