From e01cee0f0c5c5c2eb2d8595eadb3c7a9df2a37fc Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Wed, 21 Jan 2026 16:37:01 +0800
Subject: [PATCH] 1
---
src/views/my/assets.vue | 82 ++++++++++++++++++++++++++++++-----------
1 files changed, 60 insertions(+), 22 deletions(-)
diff --git a/src/views/my/assets.vue b/src/views/my/assets.vue
index c79dda2..1c77299 100644
--- a/src/views/my/assets.vue
+++ b/src/views/my/assets.vue
@@ -2,8 +2,8 @@
<div class="assets">
<div class="assets_title">{{ $t('总资产估值') }}</div>
<div class="assets_money font-bold mt-5 flex justify-start items-end">
- {{ currency.currency_symbol }}{{ forexAssets?.money_contract ?
- (forexAssets?.money_contract * (currency.rate ?? 0)).toFixed(2) : '0.00' }}
+ {{ currency.currency_symbol }}{{ formatWithCommas(forexAssets?.money_contract ?
+ (forexAssets?.money_contract * (currency.rate ?? 0)).toFixed(2) : '0.00') }}
<div class="pricing_jj ml-5">
{{ pricing }}
@@ -14,16 +14,20 @@
</van-dropdown-item>
</van-dropdown-menu>
</div>
- <div class="assets_revenue mt-5">
- <span>{{ $t('ProfitDay') }}</span>
- {{ currency.currency_symbol }}{{ forexAssets?.money_contract_profit_today ?
- (forexAssets?.money_contract_profit_today * (currency.rate ?? 0)).toFixed(2) :
- '--' }}
- </div>
+ <!-- <div class="assets_revenue mt-5">
+ <span>{{ $t('当日') }}</span>
+ {{ currency.currency_symbol }}
+ <span
+ :style="forexAssets?.money_contract_profit_today > 0 ? 'color:green' : forexAssets?.money_contract_profit_today < 0 ? 'color:red' : ''">
+ {{ forexAssets?.money_contract_profit_today ?
+ (forexAssets?.money_contract_profit_today * (currency.rate ?? 0)).toFixed(2) :
+ '--' }}
+ </span>
+ </div> -->
<div class="tabbers flex justify-between mt-20 pl-1 pr-1">
<div class="item" v-for="item in tabList" :key="item.key" @click="toPage(item.path)">
- <img style="width: 100px;" :src="item.icon" alt="">
+ <img :src="item.icon" alt="">
<div class="mt-3 text-center">{{ item.name }}</div>
</div>
</div>
@@ -40,15 +44,15 @@
<div class="assets_item flex justify-start items-center mt-14 font-bold">
<div class="icon" style="background-color: #8A90FE;"></div>
<span class="ml-5 flex-1">{{ $t('资金账户') }}</span>
- <span class="mr-5">{{ assetObj.capital }}</span>
+ <span class="mr-5">{{ formatWithCommas(assetObj.capital) }}</span>
<van-icon name="arrow" />
</div>
- <div class="assets_item flex justify-start items-center mt-14 font-bold">
+ <!-- <div class="assets_item flex justify-start items-center mt-14 font-bold">
<div class="icon" style="background-color: #f7b600;"></div>
<span class="ml-5 flex-1">{{ $t('交易账户') }}</span>
- <span class="mr-5">{{ assetObj.contract }}</span>
+ <span class="mr-5">{{ formatWithCommas(assetObj.contract) }}</span>
<van-icon name="arrow" />
- </div>
+ </div> -->
</van-collapse-item>
</van-collapse>
@@ -61,7 +65,7 @@
:key="item.id">
<img :src="`${HOST_URL}/symbol/${item.symbol_data}.png`" />
- <span class="ml-5 flex-1">{{ item.symbol_data.toUpperCase() }}</span>
+ <span class="ml-5 flex-1">{{ arrGk((item.name || '').toUpperCase())[0] }}</span>
<div class="mr-3">
<div class="text-right">
@@ -105,6 +109,13 @@
{ key: 5, name: t('闪兑'), icon: new URL('@/assets/imgs/assets/sd.png', import.meta.url), path: '/cryptos/exchangePage' },
{ key: 4, name: t('账单'), icon: new URL('@/assets/imgs/assets/zd.png', import.meta.url), path: '/cryptos/accountChange' },
]
+
+// 处理分隔符
+const arrGk = (str) => {
+ if (!str) return ['--'];
+ let arr = str.split('/');
+ return arr;
+}
// 计价切换
const pricing = ref('')
@@ -174,12 +185,16 @@
<style lang="scss" scoped>
+@import '@/assets/theme/index.scss';
+
.assets {
min-height: 100vh;
background: $mainbgWhiteColor;
padding: 2.8rem 2rem 10rem 2rem;
- $assets_title_color: #9a9a9a;
- color: $assets_title_color;
+
+ @include themify() {
+ color: themed("text_color2");
+ }
:deep(.van-cell) {
padding-left: 0;
@@ -205,8 +220,11 @@
}
.assets_money {
- color: $text_color4;
font-size: 3.4rem;
+
+ @include themify() {
+ color: themed("text_color");
+ }
.pricing_jj {
font-size: 1.6rem;
@@ -238,13 +256,19 @@
.assets_revenue {
font-size: 2rem;
- color: #646464;
font-weight: 600;
+ @include themify() {
+ color: themed("text_color1");
+ }
+
span {
- color: #6e6e6e;
text-decoration: underline dotted;
font-weight: 400;
+
+ @include themify() {
+ color: themed("text_color1");
+ }
}
}
@@ -253,11 +277,19 @@
$item_width: 8.3rem;
width: $item_width;
font-size: 1.8rem;
- color: $text_color4;
+
+ @include themify() {
+ color: themed("text_color2");
+ }
img {
height: $item_width;
border-radius: 50%;
+ background: #fff;
+
+ @include themify() {
+ border: themed("main_background") 1px solid;
+ }
}
}
}
@@ -285,8 +317,11 @@
}
.assets_item {
- color: $text_color4;
font-size: 2.1rem;
+
+ @include themify() {
+ color: themed("text_color2");
+ }
.icon {
width: 1.8rem;
@@ -302,8 +337,11 @@
}
.assets_item_light {
- color: #9b9b9b;
font-weight: 300;
+
+ @include themify() {
+ color: themed("text_color2");
+ }
}
}
}
--
Gitblit v1.9.3