From 1201bf91b3dcac3f5b69c755ff2e54c362956467 Mon Sep 17 00:00:00 2001
From: admin <344137771@qq.com>
Date: Mon, 09 Mar 2026 16:41:01 +0800
Subject: [PATCH] 1
---
src/views/cryptos/Trade/index.vue | 60 ++++++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 40 insertions(+), 20 deletions(-)
diff --git a/src/views/cryptos/Trade/index.vue b/src/views/cryptos/Trade/index.vue
index 368bc93..be1dfa8 100644
--- a/src/views/cryptos/Trade/index.vue
+++ b/src/views/cryptos/Trade/index.vue
@@ -15,6 +15,7 @@
<trade-head :isReturn="true" :backFunc="() => $router.push('/')" :symbolName="symbolName" :symbol="symbol"
:price="price" :range="range" :isTrade="true" @update-coin="onUpdate" @data="quote = $event" />
+ <div class="trade-content-bg">
<div class="trade-buy-sell flex justify-between px-30 py-30">
<trade-order-area :symbol="symbol" :symbolName="symbolName" :init-open="initOpen" :init-close="initClose"
:price="price" @ordered="onOrdered" />
@@ -23,10 +24,9 @@
v-if="symbol" :price="price" class="w-290 ml-30" />
</keep-alive>
</div>
- <div class="flex k-select-box">
+ <!-- <div class="flex k-select-box">
<div class="mt-20 mb-22 select-box" style="position:relative;">
<div class=" flex justify-between items-center w-full h-70" @click="selectBtn">
- <!-- <img src="@/assets/image/public/warn.png" alt="warn-icon" class="w-25 h-25 pl-20"/> -->
<div class="pl-16 font-28 textColor" style="width:80%;">{{ title }}</div>
<img src="../../../assets/image/public/grey-select.png" alt="select-icon" class="w-22 h-11 mr-20" />
</div>
@@ -40,7 +40,7 @@
<div class="ml-10" @click="isSelectShow = true">
<img src="../../../assets/image/selectIcon.png" alt="warn-icon" class="w-36 h-30" />
</div>
- </div>
+ </div> -->
<div class="h-16 diviLine"></div>
<div>
<div class="flex justify-between border-b-color items-center">
@@ -63,8 +63,8 @@
@cancelOrder="cancelOrder" />
</div>
<div class="py-20 px-20" v-else-if="tabType == '2'">
- <history-item unit="USDT" v-for="item in entrustList" :key="item.order_no" :coinPrice="coinPrice" :entrust="item"
- :state="item.state" @cancelOrder="cancelOrder" />
+ <history-item unit="USDT" v-for="item in entrustList" :key="item.order_no" :coinPrice="coinPrice"
+ :entrust="item" :state="item.state" @cancelOrder="cancelOrder" />
</div>
<div class="py-20 px-20" v-else>
<div class="mb-20">
@@ -76,7 +76,7 @@
:src="item.symbol ? `${HOST_URL}/symbol/${item.symbol_data}.png` : handleImage('../../../assets/loading-default.png')"
class="w-52 h-52 rounded-full mr-16" />
<p class="flex flex-col">
- <strong class="font-28 textColor mb-6">{{ item.symbol.toUpperCase() }}</strong>
+ <strong class="font-28 textColor mb-6">{{ strToArr(item.full_name.toUpperCase(), '/')[0] }}</strong>
<span class="font-20 text-grey">{{ item.full_name }}</span>
</p>
</div>
@@ -98,7 +98,7 @@
:src="item.symbol ? `${HOST_URL}/symbol/${item.symbol_data}.png` : handleImage('../../../assets/loading-default.png')"
class="w-52 h-52 rounded-full mr-16" />
<p class="flex flex-col">
- <strong class="font-28 textColor mb-6">{{ item.symbol.toUpperCase() }}</strong>
+ <strong class="font-28 textColor mb-6">{{ strToArr(item.full_name.toUpperCase(), '/')[0] }}</strong>
<span class="font-20 text-grey">{{ item.full_name }}</span>
</p>
</div>
@@ -126,7 +126,7 @@
<k-line-charts :update-key="updateKey" :update-data="quote" :symbol="symbol" v-if="symbol && showCharts"
:showBottom="false" />
</div> -->
-
+
<!-- <div class="fixed-box">
<div class="flex justify-between items-center px-30 py-20" @click.stop="handleClickShowKlineChart()">
<span class="font-30 textColor2">{{ symbol.toUpperCase() }} {{ $t('k线图表') }}</span>
@@ -140,9 +140,8 @@
</div> -->
<van-action-sheet class="action-sheet" v-model:show="isSelectShow" @select="onSelect" :actions="actions"
:cancel-text="$t('取消')" close-on-click-action @cancel="onCancel" />
-
+ </div>
</div>
-
</div>
</template>
@@ -154,6 +153,7 @@
import KLineCharts from '@/components/Transform/kline-charts/index.vue'
import historyItem from '@/components/Transform/history-item/index.vue'
import fxKline from '@/components/fx-kline/index.vue'
+import { strToArr } from '@/utils/utis'
import Axios from '@/service/trading'
import { _getHomeList } from '@/service/home.api'
@@ -279,9 +279,12 @@
this.getExchangeRate()
},
methods: {
+ strToArr,
handleImage,
...mapActions('home', [SET_COIN_LIST]),
onUpdate(symbol) { // 更新
+ console.log("symbol", symbol);
+
this.symbol = symbol
this.closeSocket()
this.init(symbol)
@@ -391,13 +394,15 @@
this.initClose = res
})
}
-
if (this.userInfo.token) {
this.getWallet()
this.timer3 = setInterval(() => {
this.getOrderList();
}, 2000)
}
+ }
+ else {
+ showFailToast(this.$t('请先登录'))
}
},
init(symbol) { // 初始化页面
@@ -543,6 +548,12 @@
#cryptos {
background-color: $mainbgWhiteColor;
+
+ .trade-content-bg {
+ background: #fff;
+ border-radius: 15px;
+ }
+
:v-deep(.px-4) {
padding-left: 30px !important;
padding-right: 30px !important;
@@ -553,11 +564,11 @@
padding-bottom: 30px !important;
}
- .diviLine{
+ .diviLine {
background: $mainbgWhiteColor;
}
- .border-b-color{
+ .border-b-color {
border-bottom-color: $inp_b;
padding-bottom: 5px;
}
@@ -603,6 +614,8 @@
border-top-right-radius: 20px;
padding: 0 30px;
box-sizing: border-box;
+ // background-color: #fff !important;
+ border-radius: 10px;
}
.my-swipe {
@@ -646,12 +659,12 @@
.select-box {
width: 220px;
-
- background: $inp-b;
-
margin-right: 20px;
- }
+ @include themify() {
+ background: themed("input_background") !important;
+ }
+ }
}
.z-100 {
@@ -660,8 +673,12 @@
.option-box {
z-index: 99;
- background: $inp-b;
- box-shadow: 0px 0px 0.1875rem 0.1875rem $inp-b;
+
+ @include themify() {
+ background: themed("input_background");
+ box-shadow: 0px 0px 0.1875rem 0.1875rem themed("input_background");
+ color: themed("text_color");
+ }
}
:deep(.van-action-sheet__content) {
@@ -669,7 +686,10 @@
.van-action-sheet__item {
background: transparent;
- color: $text_color;
+
+ @include themify() {
+ color: themed("text_color");
+ }
}
}
--
Gitblit v1.9.3