Browse Source

修改股票页面和新增

master
liaoxinyu 6 days ago
parent
commit
359db43bc4
  1. BIN
      assets/img/home/home41-1.png
  2. BIN
      assets/img/home/home41.png
  3. 35
      i18n/lang/de.json
  4. 39
      i18n/lang/en.json
  5. 35
      i18n/lang/fra.json
  6. 35
      i18n/lang/he.json
  7. 35
      i18n/lang/it.json
  8. 68
      i18n/lang/jp.json
  9. 35
      i18n/lang/kor.json
  10. 35
      i18n/lang/pt.json
  11. 35
      i18n/lang/spa.json
  12. 35
      i18n/lang/tr.json
  13. 39
      i18n/lang/zh-TW.json
  14. 6
      pages.json
  15. 20
      pages/base/home.vue
  16. 22
      pages/ellasAlpha/history.vue
  17. 517
      pages/ellasAlpha/index.vue

BIN
assets/img/home/home41-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

BIN
assets/img/home/home41.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

35
i18n/lang/de.json

@ -909,5 +909,40 @@
"hh24": "Orders",
"hh25": "Flash-Konvertierung",
"hh26": "Transaktionshistorie"
},
"automation": {
"a1":"Automatisierter EA-Handel",
"a2":"Kluge Entscheidungen, einfache Gewinne, Wohlstand in Reichweite",
"a3":"Aktien",
"a4":"Kryptowährung",
"a5":"Gesamtvermögen",
"a6":"Transaktionshistorie",
"a7":"Verfügbar",
"a8":"Heutiger Gewinn",
"a9":"Gesamtgewinn",
"a10":"Guthaben einzahlen",
"a11":"Guthaben auszahlen",
"a12":"Orderhistorie",
"a13":"Währung",
"a14":"Kurs",
"a15":"Änderung",
"a16":"Name / Ticker",
"a17":"Kaufkurs",
"a18":"Verkaufskurs",
"a19":"Menge",
"a20":"Servicegebühr",
"a21":"Transaktionsbetrag",
"a22":"Gewinn",
"a23":"Richtung",
"a24":"Kaufzeitpunkt",
"a25":"Verkaufszeitpunkt",
"a26":"Keine Daten verfügbar",
"a27":"Transaktionsbetrag",
"a28":"Mindesteinzahlungsbetrag",
"a29":"Abbrechen",
"a30":"Bestätigen",
"a31":"Bitte Betrag eingeben",
"a32":"Gesamtgewinn",
"a33":"Markt"
}
}

39
i18n/lang/en.json

@ -185,7 +185,9 @@
"e7": "Miner",
"h1": "Bill",
"h2": "name",
"h3": "Holdings List"
"h3": "Holdings List",
"h4": "EA Automated Trading",
"h5": "Order History"
},
"accountSettings": {
"a0": "Account Settings",
@ -988,5 +990,40 @@
"hh24": "Orders",
"hh25": "Flash Convert",
"hh26": "Transaction History"
},
"automation": {
"a1":"EA Automated Trading",
"a2":"Smart decisions, easy profits, wealth within reach",
"a3":"Stocks",
"a4":"Cryptocurrency",
"a5":"Total Assets",
"a6":"Transaction History",
"a7":"Available",
"a8":"Today's Profit",
"a9":"Total Profit",
"a10":"Deposit Funds",
"a11":"Withdraw Funds",
"a12":"Order History",
"a13":"Currency",
"a14":"Price",
"a15":"Change",
"a16":"Name / Ticker",
"a17":"Purchase Price",
"a18":"Selling Price",
"a19":"Quantity",
"a20":"Service Fee",
"a21":"Transaction Amount",
"a22":"Profit",
"a23":"Direction",
"a24":"Purchase Time",
"a25":"Sell Time",
"a26":"No Data Available",
"a27":"Transaction Amount",
"a28":"Minimum Deposit Amount",
"a29":"Cancel",
"a30":"Confirm",
"a31":"Please enter amount",
"a32":"Total profit",
"a33":"Market"
}
}

35
i18n/lang/fra.json

@ -911,5 +911,40 @@
"hh24": "Ordres",
"hh25": "Conversion instantanée",
"hh26": "Historique des transactions"
},
"automation": {
"a1":"Trading automatisé par EA",
"a2":"Décisions intelligentes, profits faciles, la richesse à portée de main",
"a3":"Actions",
"a4":"Cryptomonnaies",
"a5":"Actifs totaux",
"a6":"Historique des transactions",
"a7":"Disponible",
"a8":"Profit du jour",
"a9":"Profit total",
"a10":"Déposer des fonds",
"a11":"Retirer des fonds",
"a12":"Historique des ordres",
"a13":"Devise",
"a14":"Prix",
"a15":"Variation",
"a16":"Nom / Symbole",
"a17":"Prix d'achat",
"a18":"Prix de vente",
"a19":"Quantité",
"a20":"Frais de service",
"a21":"Montant de la transaction",
"a22":"Profit",
"a23":"Sens",
"a24":"Heure d'achat",
"a25":"Heure de vente",
"a26":"Aucune donnée disponible",
"a27":"Montant de la transaction",
"a28":"Montant minimum de dépôt",
"a29":"Annuler",
"a30":"Confirmer",
"a31":"Veuillez saisir le montant",
"a32":"Bénéfice total",
"a33":"Marché"
}
}

35
i18n/lang/he.json

@ -918,5 +918,40 @@
"hh24": "פקודות",
"hh25": "המרה מהירה",
"hh26": "היסטוריית עסקאות"
},
"automation": {
"a1":"מסחר אוטומטי של EA",
"a2":"החלטות חכמות, רווחים קלים, עושר בהישג יד",
"a3":"מניות",
"a4":"מטבעות קריפטוגרפיים",
"a5":"סך הנכסים",
"a6":"היסטוריית עסקאות",
"a7":"זמין",
"a8":"רווח של היום",
"a9":"סך הרווח",
"a10":"הפקדת כספים",
"a11":"משיכת כספים",
"a12":"היסטוריית הזמנות",
"a13":"מטבע",
"a14":"מחיר",
"a15":"עודף",
"a16":"שם / טיקר",
"a17":"מחיר קנייה",
"a18":"מחיר מכירה",
"a19":"כמות",
"a20":"עמלת שירות",
"a21":"סכום עסקה",
"a22":"רווח",
"a23":"כיוון",
"a24":"זמן רכישה",
"a25":"זמן מכירה",
"a26":"אין נתונים זמינים",
"a27":"סכום עסקה",
"a28":"סכום הפקדה מינימלי",
"a29":"ביטול",
"a30":"אישור",
"a31":"אנא הזן סכום",
"a32":"רווח כולל",
"a33":"שוק"
}
}

35
i18n/lang/it.json

@ -910,5 +910,40 @@
"hh24": "Ordini",
"hh25": "Flash Convert",
"hh26": "Cronologia transazioni"
},
"automation": {
"a1":"Trading automatizzato (EA)",
"a2":"Decisioni intelligenti, profitti facili, ricchezza a portata di mano",
"a3":"Azioni",
"a4":"Criptovalute",
"a5":"Asset totali",
"a6":"Cronologia transazioni",
"a7":"Disponibile",
"a8":"Profitto odierno",
"a9":"Profitto totale",
"a10":"Deposita fondi",
"a11":"Preleva fondi",
"a12":"Cronologia ordini",
"a13":"Valuta",
"a14":"Prezzo",
"a15":"Variazione",
"a16":"Nome / Ticker",
"a17":"Prezzo di acquisto",
"a18":"Prezzo di vendita",
"a19":"Quantità",
"a20":"Commissione di servizio",
"a21":"Importo della transazione",
"a22":"Profitto",
"a23":"Direzione",
"a24":"Ora di acquisto",
"a25":"Ora di vendita",
"a26":"Nessun dato disponibile",
"a27":"Importo della transazione",
"a28":"Importo minimo di deposito",
"a29":"Annulla",
"a30":"Conferma",
"a31":"Inserisci l'importo",
"a32":"Profitto totale",
"a33":"Mercato"
}
}

68
i18n/lang/jp.json

@ -910,5 +910,73 @@
"hh24": "注文履歴",
"hh25": "フラッシュコンバート",
"hh26": "取引履歴"
},
"automation": {
"a1":"EA自動取引",
"a2":"賢い判断、手軽な利益、確実な資産形成",
"a3":"株式",
"a4":"暗号資産",
"a5":"総資産",
"a6":"取引履歴",
"a7":"利用可能残高",
"a8":"本日の利益",
"a9":"総利益",
"a10":"入金",
"a11":"出金",
"a12":"注文履歴",
"a13":"通貨",
"a14":"価格",
"a15":"変動",
"a16":"名称 / ティッカー",
"a17":"購入価格",
"a18":"売却価格",
"a19":"数量",
"a20":"手数料",
"a21":"取引額",
"a22":"利益",
"a23":"方向",
"a24":"購入日時",
"a25":"売却日時",
"a26":"データなし",
"a27":"取引額",
"a28":"最低入金額",
"a29":"キャンセル",
"a30":"確定",
"a31":"金額を入力してください"
},
"automation": {
"a1":"EA自動取引",
"a2":"賢い判断、手軽な利益、確実な資産形成",
"a3":"株式",
"a4":"暗号資産",
"a5":"総資産",
"a6":"取引履歴",
"a7":"利用可能額",
"a8":"本日の利益",
"a9":"総利益",
"a10":"入金",
"a11":"出金",
"a12":"注文履歴",
"a13":"通貨",
"a14":"価格",
"a15":"変動",
"a16":"名称 / ティッカー",
"a17":"購入価格",
"a18":"売却価格",
"a19":"数量",
"a20":"手数料",
"a21":"取引額",
"a22":"利益",
"a23":"方向",
"a24":"購入日時",
"a25":"売却日時",
"a26":"データなし",
"a27":"取引額",
"a28":"最低入金額",
"a29":"キャンセル",
"a30":"確定",
"a31":"金額を入力してください",
"a32":"総利益",
"a33":"市場"
}
}

35
i18n/lang/kor.json

@ -910,5 +910,40 @@
"hh24": "주문 내역",
"hh25": "즉시 변환",
"hh26": "거래 기록"
},
"automation": {
"a1":"EA 자동 매매",
"a2":"현명한 결정, 손쉬운 수익, 손에 잡히는 부",
"a3":"주식",
"a4":"암호화폐",
"a5":"총 자산",
"a6":"거래 내역",
"a7":"가용 잔액",
"a8":"오늘의 수익",
"a9":"총 수익",
"a10":"입금",
"a11":"출금",
"a12":"주문 내역",
"a13":"통화",
"a14":"가격",
"a15":"변동",
"a16":"종목명 / 티커",
"a17":"매수가",
"a18":"매도가",
"a19":"수량",
"a20":"수수료",
"a21":"거래 금액",
"a22":"수익",
"a23":"방향",
"a24":"매수 시간",
"a25":"매도 시간",
"a26":"데이터 없음",
"a27":"거래 금액",
"a28":"최소 입금액",
"a29":"취소",
"a30":"확인",
"a31":"금액을 입력해 주세요",
"a32":"총이익",
"a33":"시장"
}
}

35
i18n/lang/pt.json

@ -908,5 +908,40 @@
"hh24": "Ordens",
"hh25": "Conversão Rápida",
"hh26": "Histórico de Transações"
},
"automation": {
"a1":"Negociação Automatizada (EA)",
"a2":"Decisões inteligentes, lucros fáceis, riqueza ao seu alcance",
"a3":"Ações",
"a4":"Criptomoedas",
"a5":"Ativos Totais",
"a6":"Histórico de Transações",
"a7":"Disponível",
"a8":"Lucro de Hoje",
"a9":"Lucro Total",
"a10":"Depositar Fundos",
"a11":"Sacar Fundos",
"a12":"Histórico de Ordens",
"a13":"Moeda",
"a14":"Preço",
"a15":"Variação",
"a16":"Nome / Ticker",
"a17":"Preço de Compra",
"a18":"Preço de Venda",
"a19":"Quantidade",
"a20":"Taxa de Serviço",
"a21":"Valor da Transação",
"a22":"Lucro",
"a23":"Direção",
"a24":"Hora da Compra",
"a25":"Hora da Venda",
"a26":"Nenhum Dado Disponível",
"a27":"Valor da Transação",
"a28":"Valor Mínimo de Depósito",
"a29":"Cancelar",
"a30":"Confirmar",
"a31":"Por favor, insira o valor",
"a32":"Lucro total",
"a33":"Mercado"
}
}

35
i18n/lang/spa.json

@ -911,5 +911,40 @@
"hh24": "Órdenes",
"hh25": "Conversión rápida",
"hh26": "Historial de transacciones"
},
"automation": {
"a1":"Trading automatizado con EA",
"a2":"Decisiones inteligentes, ganancias fáciles, riqueza al alcance",
"a3":"Acciones",
"a4":"Criptomonedas",
"a5":"Activos totales",
"a6":"Historial de transacciones",
"a7":"Disponible",
"a8":"Ganancia de hoy",
"a9":"Ganancia total",
"a10":"Depositar fondos",
"a11":"Retirar fondos",
"a12":"Historial de órdenes",
"a13":"Divisa",
"a14":"Precio",
"a15":"Variación",
"a16":"Nombre / Símbolo",
"a17":"Precio de compra",
"a18":"Precio de venta",
"a19":"Cantidad",
"a20":"Comisión de servicio",
"a21":"Importe de la transacción",
"a22":"Ganancia",
"a23":"Dirección",
"a24":"Hora de compra",
"a25":"Hora de venta",
"a26":"Sin datos disponibles",
"a27":"Importe de la transacción",
"a28":"Importe mínimo de depósito",
"a29":"Cancelar",
"a30":"Confirmar",
"a31":"Por favor, introduzca el importe",
"a32":"Beneficio total",
"a33":"Mercado"
}
}

35
i18n/lang/tr.json

@ -908,5 +908,40 @@
"hh24": "Emirler",
"hh25": "Hızlı Dönüştürme",
"hh26": "İşlem Geçmişi"
},
"automation": {
"a1":"EA Otomatik İşlem",
"a2":"Akıllı kararlar, kolay kazançlar, ulaşılabilir bir servet",
"a3":"Hisseler",
"a4":"Kripto Para",
"a5":"Toplam Varlıklar",
"a6":"İşlem Geçmişi",
"a7":"Kullanılabilir",
"a8":"Bugünkü Kazanç",
"a9":"Toplam Kazanç",
"a10":"Para Yatır",
"a11":"Para Çek",
"a12":"Emir Geçmişi",
"a13":"Para Birimi",
"a14":"Fiyat",
"a15":"Değişim",
"a16":"İsim / Sembol",
"a17":"Alış Fiyatı",
"a18":"Satış Fiyatı",
"a19":"Miktar",
"a20":"Hizmet Ücreti",
"a21":"İşlem Tutarı",
"a22":"Kazanç",
"a23":"Yön",
"a24":"Alış Zamanı",
"a25":"Satış Zamanı",
"a26":"Veri Bulunmuyor",
"a27":"İşlem Tutarı",
"a28":"Minimum Yatırma Tutarı",
"a29":"İptal",
"a30":"Onayla",
"a31":"Lütfen tutarı girin",
"a32":"Toplam kâr",
"a33":"Piyasa"
}
}

39
i18n/lang/zh-TW.json

@ -184,7 +184,9 @@
"e7": "礦工",
"h1": "賬單",
"h2": "名稱",
"h3": "持倉列表"
"h3": "持倉列表",
"h4": "EA自動化交易",
"h5": "訂單記錄"
},
"accountSettings": {
"a0": "賬號設置",
@ -988,5 +990,40 @@
"hh24": "訂單",
"hh25": "閃兌",
"hh26": "資金流水"
},
"automation": {
"a1":"EA自動化交易",
"a2":"智能決策 輕鬆獲利 財富觸手可及",
"a3":"股票",
"a4":"加密貨幣",
"a5":"總資產",
"a6":"資金紀錄",
"a7":"可用",
"a8":"今日收益",
"a9":"總收益",
"a10":"存入資金",
"a11":"提取資金",
"a12":"歷史訂單",
"a13":"幣種",
"a14":"價格",
"a15":"漲跌",
"a16":"名稱 / 代碼",
"a17":"購買價格",
"a18":"售價",
"a19":"數量",
"a20":"服務費",
"a21":"成交額",
"a22":"收益",
"a23":"方向",
"a24":"購買時間",
"a25":"賣出時間",
"a26":"暫無資料",
"a27":"成交額",
"a28":"最低存款金額",
"a29":"取消",
"a30":"確認",
"a31":"請輸入金額",
"a32":"利潤總額",
"a33":"市場"
}
}

6
pages.json

@ -215,6 +215,12 @@
{
"path" : "pages/mineview/holdingslist"
},
{
"path" : "pages/ellasAlpha/index"
},
{
"path" : "pages/ellasAlpha/history"
},
{
"path": "pages/service/index",
"style": {

20
pages/base/home.vue

@ -191,6 +191,15 @@
<view class="label color-light">{{ $t("homeNewText.hh4") }}</view>
</v-link>
</view>
<view class="action-item">
<v-link class="tolink" tag="view" to="/pages/ellasAlpha/index">
<view class="icon-box">
<image v-if="theme == 'light'" src="../../assets/img/home/home41-1.png" mode="widthFix" style="width: 60rpx;"></image>
<image v-else src="../../assets/img/home/home41.png" mode="widthFix" style="width: 60rpx;"></image>
</view>
<view class="label color-light">Ellas Alpha</view>
</v-link>
</view>
</view>
<view style="padding: 0px 15px;">
@ -2427,17 +2436,22 @@
/* 2. 快捷操作金刚区 */
.action-grid {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 50rpx;
margin-left: 50rpx;
margin-right: 50rpx;
}
.action-item {
width: 90px;
display: flex;
flex-direction: column;
align-items: center;
// flex-direction: column;
flex-wrap: wrap;
gap: 8px;
align-items: center;
justify-content: center;
margin-bottom: 10px;
text-align: center;
// gap: 8px;
}
.icon-box {
width: 104rpx;

22
pages/ellasAlpha/history.vue

@ -0,0 +1,22 @@
<template>
<view>
<v-header :title="$t('base.h5')"></v-header>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

517
pages/ellasAlpha/index.vue

@ -0,0 +1,517 @@
<template>
<view class="d-flex flex-col">
<v-header class="nav_bar" :title="$t('base.h4')"></v-header>
<view class="layout-main">
<scroll-view scroll-y="true" class="scroll_height">
<view class="container">
<!-- 1. 顶部全局切换 Tab -->
<view class="global-tabs">
<view
class="tab-item"
:class="{ active: mainTab === 'stock' }"
@click="switchMainTab('stock')"
>
<text>{{$t('automation.a3')}}</text>
<view class="line" v-if="mainTab === 'stock'"></view>
</view>
<view
class="tab-item"
:class="{ active: mainTab === 'crypto' }"
@click="switchMainTab('crypto')"
>
<text>{{$t('automation.a4')}}</text>
<view class="line" v-if="mainTab === 'crypto'"></view>
</view>
</view>
<!-- 2. 黑色资产信息面板 -->
<view class="black-panel">
<view class="panel-header">
<view class="title-box">
<text class="title">{{$t('automation.a1')}}</text>
<text class="subtitle">{{$t('automation.a2')}}</text>
</view>
</view>
<view class="asset-grid">
<view class="grid-item w-60">
<text class="label">{{$t('automation.a5')}}</text>
<text class="value">{{ currentAccount.total }} {{ currency }}</text>
</view>
<view class="grid-item w-40 text-right" @click="goToRecord">
<text class="link-text">{{$t('automation.a6')}} ></text>
</view>
<view class="grid-item w-60 mt-20">
<text class="label">{{$t('automation.a7')}}</text>
<text class="value">{{ currentAccount.usable }} {{ currency }}</text>
</view>
<view class="grid-item w-40 mt-20 text-right">
<text class="label">{{$t('automation.a8')}}</text>
<text class="value text-green">{{ currentAccount.todayProfit }} {{ currency }}</text>
</view>
<view class="grid-item w-60 mt-20">
<text class="label">{{$t('automation.a32')}}</text>
<text class="value text-green">{{ currentAccount.totalProfit }} {{ currency }}</text>
</view>
</view>
<view class="action-buttons">
<view class="action-btn" @click="openModal('deposit')">{{$t('automation.a10')}} ></view>
<view class="action-btn" @click="openModal('withdraw')">{{$t('automation.a11')}} ></view>
</view>
</view>
<!-- 3. 白色内容区域 -->
<view class="white-panel">
<!-- 内部 Tab -->
<view class="sub-tabs">
<view
class="sub-tab-item"
:class="{ active: subTab === 'market' }"
@click="subTab = 'market'"
>
{{$t('automation.a33')}}
</view>
<view class="sub-tab-item right-tab">
<v-link class="tolink" tag="view" to="/pages/ellasAlpha/history">
<text class="icon-history">🕒</text> {{$t('automation.a12')}}
</v-link>
</view>
</view>
<!-- 市场列表 -->
<view class="list-container" v-if="subTab === 'market'">
<view class="list-header">
<text class="col-name">{{ mainTab === 'stock' ? $t('automation.a3') : $t('automation.a13') }}</text>
<text class="col-price">{{$t('automation.a14')}}</text>
<text class="col-change">{{$t('automation.a15')}}</text>
</view>
<view class="list-row" v-for="(item, index) in currentList" :key="index">
<view class="col-name row-flex">
<!-- 占位图标 -->
<view class="coin-icon" :style="{ backgroundColor: item.color }">{{ item.symbol.charAt(0) }}</view>
<view class="coin-info">
<text class="coin-name">{{ item.name }}</text>
</view>
</view>
<view class="col-price">
<text class="price-text">{{ item.price }}</text>
</view>
<view class="col-change">
<text :class="['change-text', item.change > 0 ? 'text-green' : 'text-red']">
{{ item.change > 0 ? '+' : '' }}{{ item.change }}%
</text>
</view>
</view>
</view>
<!-- 历史订单 -->
<!-- <view class="history-container" v-if="subTab === 'history'">
<view class="empty-state">暫無資料</view>
</view> -->
</view>
<!-- ================= 弹窗遮罩与内容 ================= -->
<view class="modal-mask" v-if="modalType !== ''" @click="closeModal"></view>
<view class="modal-content" v-if="modalType !== ''">
<view class="modal-header">
<text class="modal-title">{{ modalType === 'deposit' ? $t('automation.a10') : $t('automation.a11') }}</text>
<text class="modal-close" @click="closeModal"></text>
</view>
<view class="modal-body">
<view class="input-label">
<text class="text-red">*</text> <text>{{$t('common.money')}}</text>
</view>
<input
class="amount-input"
type="digit"
:placeholder="$t('automation.a31')"
v-model="formAmount"
/>
<!-- 存入资金的提示 -->
<view class="tips-box" v-if="modalType === 'deposit'">
<text class="tip-text">{{$t('automation.a5')}}: {{ currentAccount.total }} {{ currency }}</text>
<text class="tip-text">{{$t('automation.a28')}}: {{ currency }}</text>
</view>
<!-- 提取资金的提示 -->
<view class="tips-box" v-if="modalType === 'withdraw'">
<text class="tip-text">{{$t('common.d22')}}: {{ currentAccount.usable }} {{ currency }}</text>
</view>
</view>
<view class="modal-footer">
<view class="btn-cancel" @click="closeModal">{{$t('automation.a29')}}</view>
<view class="btn-confirm" @click="confirmAction">{{$t('automation.a30')}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
mainTab: 'stock', // 'stock' 'crypto'
subTab: 'market', // 'market' 'history'
modalType: '', // '' | 'deposit' | 'withdraw'
formAmount: '',
//
accountData: {
stock: {
total: '0.00',
usable: '0.00',
todayProfit: '0.00',
totalProfit: '0.00'
},
crypto: {
total: '209,000.00',
usable: '90,000.00',
todayProfit: '0.00',
totalProfit: '0.00'
}
},
//
marketData: {
stock: [
{ name: 'Micron Technology...', symbol: 'MU', price: '996.00', change: -7.74, color: '#2980b9' },
{ name: 'Nvidia Corp', symbol: 'NVDA', price: '218.66', change: 1.82, color: '#27ae60' },
{ name: 'Broadcom Inc. Com...', symbol: 'AVGO', price: '418.91', change: -12.59, color: '#c0392b' },
{ name: 'Marvell Technology', symbol: 'MRVL', price: '316.43', change: 4.90, color: '#8e44ad' },
{ name: 'Alphabet Inc. Class ...', symbol: 'GOOGL', price: '372.19', change: 3.68, color: '#f39c12' },
{ name: 'Advanced Micro De...', symbol: 'AMD', price: '523.20', change: -3.56, color: '#34495e' },
],
crypto: [
{ name: 'SOL/USDC', symbol: 'SOL', price: '65.40', change: -5.26, color: '#000000' },
{ name: 'BTC/USDC', symbol: 'BTC', price: '62,533.25', change: -1.61, color: '#f39c12' },
{ name: 'GALA/USDC', symbol: 'GALA', price: '0.00', change: -5.19, color: '#7f8c8d' },
{ name: 'FIL/USDC', symbol: 'FIL', price: '0.78', change: -8.95, color: '#3498db' },
{ name: 'GRT/USDC', symbol: 'GRT', price: '0.02', change: -6.22, color: '#9b59b6' },
]
}
};
},
computed: {
currency() {
return this.mainTab === 'stock' ? 'USDT' : 'USDC';
},
currentAccount() {
return this.accountData[this.mainTab];
},
currentList() {
return this.marketData[this.mainTab];
}
},
methods: {
switchMainTab(tab) {
this.mainTab = tab;
},
openModal(type) {
this.formAmount = '';
this.modalType = type;
},
closeModal() {
this.modalType = '';
},
confirmAction() {
if (!this.formAmount) {
uni.showToast({ title: this.$t("automation.a31"), icon: 'none' });
return;
}
uni.showToast({ title: this.$t("assets.e4"), icon: 'success' });
this.closeModal();
},
goToRecord() {
// uni.showToast({ title: '', icon: 'none' });
}
}
};
</script>
<style scoped>
/* 基础容器,允许原生滚动 */
.container {
min-height: 100vh;
background-color: #ffffff;
padding-bottom: 50rpx; /* 底部留白 */
}
.scroll_height{
height: calc(100vh - 45px);
}
/* ================= 1. 顶部 Tab ================= */
.global-tabs {
display: flex;
background-color: #ffffff;
height: 90rpx;
}
.tab-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: #999;
position: relative;
}
.tab-item.active {
color: #333;
font-weight: bold;
}
.tab-item .line {
position: absolute;
bottom: 0;
width: 60rpx;
height: 6rpx;
background-color: #000;
border-radius: 4rpx;
}
/* ================= 2. 黑色面板 ================= */
.black-panel {
background-color: #000000;
color: #ffffff;
padding: 40rpx 30rpx;
}
.panel-header {
margin-bottom: 40rpx;
}
.title {
font-size: 44rpx;
font-weight: bold;
display: block;
}
.subtitle {
font-size: 24rpx;
color: #aaaaaa;
margin-top: 10rpx;
display: block;
}
/* 资产网格布局 */
.asset-grid {
display: flex;
flex-wrap: wrap;
margin-bottom: 40rpx;
}
.grid-item {
display: flex;
flex-direction: column;
}
.w-60 { width: 60%; }
.w-40 { width: 40%; }
.mt-20 { margin-top: 30rpx; }
.text-right { text-align: right; align-items: flex-end; }
.label {
font-size: 24rpx;
color: #aaaaaa;
margin-bottom: 10rpx;
}
.value {
font-size: 32rpx;
font-weight: bold;
}
.link-text {
font-size: 24rpx;
color: #ffffff;
}
/* 操作按钮 */
.action-buttons {
display: flex;
justify-content: space-around;
margin-top: 20rpx;
padding-top: 30rpx;
/* border-top: 1rpx solid #333333; */
}
.action-btn {
font-size: 28rpx;
color: #ffffff;
padding: 10rpx 40rpx;
}
/* ================= 3. 白色面板区域 ================= */
.white-panel {
background-color: #ffffff;
padding: 0 30rpx;
}
/* 内部 Tabs */
.sub-tabs {
display: flex;
justify-content: space-between;
padding: 30rpx 0;
/* border-bottom: 1rpx solid #eeeeee; */
}
.sub-tab-item {
font-size: 30rpx;
color: #666666;
}
.sub-tab-item.active {
color: #333333;
}
.right-tab {
display: flex;
align-items: center;
color: #999999;
}
.icon-history {
margin-right: 10rpx;
font-size: 28rpx;
}
/* 列表头部 */
.list-header {
display: flex;
padding: 20rpx 0;
font-size: 26rpx;
color: #999999;
border-bottom: 1rpx solid #f5f5f5;
}
.col-name { flex: 4; }
.col-price { flex: 3; text-align: left; }
.col-change { flex: 2; text-align: right; }
/* 列表行 */
.list-row {
display: flex;
align-items: center;
padding: 30rpx 0;
border-bottom: 1rpx solid #f9f9f9;
}
.row-flex {
display: flex;
align-items: center;
}
.coin-icon {
width: 48rpx;
height: 48rpx;
border-radius: 50%;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
margin-right: 20rpx;
}
.coin-name {
font-size: 28rpx;
color: #333333;
}
.price-text {
font-size: 28rpx;
color: #333333;
}
.change-text {
font-size: 28rpx;
}
/* 颜色公共类 */
.text-green { color: #00d26a; }
.text-red { color: #ff4d4f; }
/* 历史记录空状态 */
.empty-state {
text-align: center;
padding: 100rpx 0;
color: #999999;
font-size: 28rpx;
}
/* ================= 4. 弹窗样式 ================= */
.modal-mask {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 998;
}
.modal-content {
position: fixed;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
width: 85%;
background-color: #ffffff;
border-radius: 20rpx;
z-index: 999;
overflow: hidden;
}
.modal-header {
position: relative;
text-align: center;
padding: 40rpx 0 20rpx;
}
.modal-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.modal-close {
position: absolute;
right: 30rpx;
top: 30rpx;
font-size: 40rpx;
color: #999;
}
.modal-body {
padding: 20rpx 40rpx;
}
.input-label {
font-size: 28rpx;
color: #666;
margin-bottom: 20rpx;
}
.amount-input {
height: 80rpx;
border: 1rpx solid #dddddd;
border-radius: 10rpx;
padding: 0 20rpx;
font-size: 28rpx;
}
.tips-box {
margin-top: 20rpx;
display: flex;
flex-direction: column;
}
.tip-text {
font-size: 24rpx;
color: #666;
margin-top: 10rpx;
}
.modal-footer {
display: flex;
padding: 40rpx;
justify-content: space-between;
}
.btn-cancel, .btn-confirm {
width: 46%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
border-radius: 10rpx;
font-size: 30rpx;
}
.btn-cancel {
border: 2rpx solid #2979ff;
color: #2979ff;
background-color: #fff;
}
.btn-confirm {
background-color: #2979ff;
color: #fff;
}
</style>
Loading…
Cancel
Save