From b37eef5a0807a8f5688e2112591cb80a3ba333e4 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Tue, 08 Jul 2025 22:31:48 +0800
Subject: [PATCH] style

---
 src/views/news/index.vue |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/views/news/index.vue b/src/views/news/index.vue
index ba067ae..07bdf6c 100644
--- a/src/views/news/index.vue
+++ b/src/views/news/index.vue
@@ -45,7 +45,7 @@
             </div>
           </div>
           <div class="flex justify-between">
-            <div class="py-2 px-8 rounded-full text-13 font-medium bg-white">{{item.change_ratio}}</div>
+            <div class="py-2 px-8 rounded-full text-13 font-medium bg-white">{{item.change_ratio_str}}</div>
             <span class="text-18">→</span>
           </div>
         </div>
@@ -63,7 +63,7 @@
       </div>
       <div class="text-center">{{t('理財')}}</div>
     </div>
-    <div class="flex-1 flex flex-col items-center" @click="goToPage('/cryptos/trade/btcusdt')">
+    <div class="flex-1 flex flex-col items-center" @click="goToPage('/cryptos/trade/USDSGD')">
       <div class="w-40 h-40 rounded-full flex items-center justify-center">
         <img class="w-33 h-33" src="@/assets/c.jpg" draggable="false">
       </div>
@@ -127,6 +127,8 @@
 import { showToast } from 'vant'
 import { useI18n } from 'vue-i18n'
 import { useRouter } from 'vue-router'
+import { _getCoinList } from '@/service/quotes.api'
+import { setStorage } from '@/utils/index'
 const router = useRouter()
 
 const { t } = useI18n()
@@ -144,6 +146,10 @@
   console.log('user', user)
   username.value = user.userInfo?.username || ''
   usercode.value = user.userInfo?.usercode || ''
+
+  // 如果本地没有 coins,拉取接口
+  const quotesData = await _getCoinList()
+  setStorage('qoutes', { coins: quotesData }) // 存到本地
 })
 
 const goToExplanation = () => {

--
Gitblit v1.9.3