From c6ccd498aa419327de7c64e03f989964eeb5d278 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Wed, 16 Jul 2025 16:26:11 +0800
Subject: [PATCH] 退出二次确认
---
src/components/Transform/list-quotation/index.vue | 123 ++++++++---------------------------------
1 files changed, 24 insertions(+), 99 deletions(-)
diff --git a/src/components/Transform/list-quotation/index.vue b/src/components/Transform/list-quotation/index.vue
index 6472474..d74095e 100644
--- a/src/components/Transform/list-quotation/index.vue
+++ b/src/components/Transform/list-quotation/index.vue
@@ -1,41 +1,26 @@
<template>
<div class="list-quatation">
- <!-- <ex-tabs @tabs="onTabs"></ex-tabs> -->
<van-list>
- <!-- <van-cell>
- <div class="flex items-center w-full text-grey font-26">
- <p class="left text-left">
- <span>{{ $t('交易对') }}
- </span>
- </p>
- <p class="mid text-right">
- {{ $t('最新价') }}
- </p>
- <p class="right text-right">
- {{ active == 3 ? $t('成交额') : $t('24h涨跌幅') }}
- </p>
- </div>
- </van-cell> -->
<!-- 热门 -->
<div class="flex items-end justify-between" style="margin: 14px 0;">
- <div class="block text-22 font-medium" >{{$t('Market')}}</div>
+ <div class="block text-22 font-medium">{{ $t('Market') }}</div>
<div class="relative text-13" @click="toggleDropdown">
<div class="flex px-20 justify-between rounded-full bg-black text-white min-w-140 box-border">
<div class="block">{{ $t(topTitle) }}</div>
- <van-icon name="play" style="align-content:center;transform: rotate(90deg);"/>
+ <van-icon name="play" style="align-content:center;transform: rotate(90deg);" />
</div>
- <div class="px-16 py-20 bg-black text-white flex flex-col absolute min-w-140 box-border top-25 rounded-11 leading-28" style="z-index:999;margin-top: 0.8rem;" v-show="isTopShow">
+ <div
+ class="px-16 py-20 bg-black text-white flex flex-col absolute min-w-140 box-border top-25 rounded-11 leading-28"
+ style="z-index:999;margin-top: 0.8rem;" v-show="isTopShow">
<div @click="changeType('货币兑换', 2)">{{ $t('货币兑换') }}</div>
- <div @click="changeType('外汇交易', 1)">{{ $t('外汇交易') }}</div>
- <!-- <div>期貨</div>
- <div>收藏</div> -->
+ <div @click="changeType('外汇交易', 1)">{{ $t('外汇交易') }}</div>
</div>
</div>
</div>
<transition-group :name="type" tag="div">
- <div v-if="active == 0" :key="active">
+ <div>
<van-cell v-for="item in listData" :key="item.id" style="background-color: #f0f0f0;margin-bottom: 10px;">
<ul class="flex justify-between w-full items-center" @click="onItemClick(item)">
<li class="flex items-center left">
@@ -46,74 +31,24 @@
<span class="flex items-end font-32 flex items-center">
<span class="textColor font-600 font-30">{{ item.name || '--'
}}</span>
- <!-- <span class="font-24 text-grey" style="position: relative; top: 1px">
- /USDT
- </span> -->
- <!-- <span class="font-24 text-grey" style="position: relative; top: 1px">
- {{ item.name && item.name.replace(item.symbol.toUpperCase(), '') || '--' }}</span> -->
</span>
<span class="font-24 text-grey text-left">{{ (item.amount * 1).toFixed(2) }}</span>
</p>
</li>
<li class="flex flex-col items-end mid">
<p class="textColor font-32 font-600">{{ item.close || '--' }}</p>
- <!-- <p class="font-24 text-grey">{{ currency.currency_symbol }}
- {{ item.close && item.symbol_data.toUpperCase() == 'SHIB' ? (item.close * currency.rate).toFixed(8) : (item.close *
- currency.rate).toFixed(2) || '--' }}</p> -->
</li>
<li class="right flex items-center justify-end">
- <p class="w-153 font-31 h-71 bg-green text-white border-0 text-center btn" v-if="item.change_ratio > 0">
- {{ (item.change_ratio === 0 ? 0 : item.change_ratio) }}%</p>
- <p class="w-153 font-31 h-71 bg-red text-white border-0 text-center btn" v-else>
- {{ (item.change_ratio === 0 ? 0 : item.change_ratio) }}%</p>
- </li>
- </ul>
- </van-cell>
- </div>
- <div v-else :key="active">
- <van-cell v-for="item in showList" :key="item.id">
- <ul class="flex justify-between w-full items-center" @click="onItemClick(item)">
- <li class="flex items-center left">
- <img :src="`${HOST_URL}/symbol/${item.symbol_data}.png`" alt="logo"
- class="w-72 h-72 mr-16" />
- <p class="flex flex-col">
- <span class="flex items-end font-32 flex items-center">
- <span class="textColor font-600 font-30">{{ item.symbol_data && item.symbol_data.toUpperCase() || '--'
- }}</span>
- <!-- <span class="font-24 text-grey" style="position: relative; top: 1px">
- {{ item.name && item.name.replace(item.symbol.toUpperCase(), '') || '--' }}</span> -->
- <!-- <span class="font-24 text-grey" style="position: relative; top: 1px">
- /USDT
- </span> -->
- </span>
- <span class="font-24 text-grey text-left">{{ $t('成交量') + ' ' + (item.amount * 1).toFixed(2) }}</span>
+ <p class="w-153 font-31 h-71 text-white border-0 text-center btn"
+ :class="item.change_ratio > 0 ? 'bg-green' : 'bg-red'">
+ {{ item.change_ratio === 0 ? 0 : item.change_ratio }}%
</p>
- </li>
- <li class="flex flex-col items-end mid">
- <p class="textColor font-32 font-600">{{ item.close }}</p>
- <!-- <p class="font-24 text-grey">{{ currency.currency_symbol }} {{ item.close && item.symbol_data.toUpperCase() == 'SHIB' ? (item.close * currency.rate).toFixed(8) : (item.close *
- currency.rate).toFixed(2) || '--' }}</p> -->
- </li>
- <li class="right flex items-center justify-end text-right">
- <div v-if="active == 3" class="textColor w-182 font-700 font-24">
- {{ (item.volume * 1).toFixed(2) }}
- </div>
- <template v-else>
- <p class="w-153 font-31 h-71 bg-green text-white border-0 text-center btn" v-if="item.change_ratio_str > 0 || item.change_ratio > 0">
- +{{ item.change_ratio_str }}%</p>
- <p class="w-153 font-31 h-71 bg-red text-white border-0 text-center btn" v-else>
- {{ (item.change_ratio_str === 0 ? 0 : '--') }}%</p>
- </template>
</li>
</ul>
</van-cell>
</div>
</transition-group>
</van-list>
- <!-- <div class="flex flex-col justify-center items-center pb-58 mt-20" @click="$router.push('/quotes/?active=3')" v-if="showMore">
- <p class="text-grey font-28 mb-8">{{ $t('查看') }}</p>
- <img src="./icon-arrow_more.png" alt="more" class="w-24 h-10"/>
- </div> -->
</div>
</template>
<script>
@@ -138,6 +73,7 @@
type: 'left' //left 从左往右 right 从有王座
}
},
+
props: {
showMore: {
type: Boolean,
@@ -161,21 +97,20 @@
[List.name]: List,
[Cell.name]: Cell,
ExTabs
- },
- mounted() {
+ }, mounted() {
this.SET_CURRENCY()
},
methods: {
...mapActions('home', [SET_CURRENCY]),
- changeType(tit, val){
+ changeType(tit, val) {
this.topTitle = tit
this.topValue = val
this.$emit('onfetchQList', val)
},
- toggleDropdown(){
- if(this.isTopShow){
+ toggleDropdown() {
+ if (this.isTopShow) {
this.isTopShow = false
- }else{
+ } else {
this.isTopShow = true
}
},
@@ -183,25 +118,14 @@
if (this.topValue == 2) { //现货
setStorage('symbol', item.symbol)
this.$router.push({
- path: `/cryptos/perpetualContract/${item.symbol}`,
- query: { selectIndex: 2 }
+ path: `/cryptos/perpetualContract/${item.symbol}`,
+ query: { selectIndex: 2 }
});
} else {
setStorage('symbol', item.symbol)
- // /cryptos/perpetualContract/btcusdt?selectIndex=2
this.$router.push({
- path:`/cryptos/trade/${item.symbol}`,
- // path: `/cryptos/perpetualContract/${item.symbol}`,
- // query: { selectIndex: 2 }
+ path: `/cryptos/trade/${item.symbol}`,
});
- // this.$router.push({
- // path: `/foreign/deliveryContract/${item.symbol}`,
- // query: { type: 'cryptos' }
- // });
- // this.$router.push({
- // path: `/cryptos/perpetualContract/${item.symbol}`,
- // query: { type: 'cryptos' }
- // });
}
},
handleImage(url) {
@@ -252,7 +176,7 @@
} else if (this.active == 3) {
this.showList = [...this.listData].sort(this.compare("volume", 'up'))
}
- this.$forceUpdate()
+ this.$forceUpdate();
}
}
}
@@ -320,15 +244,16 @@
color: #242629;
}
-.text-grey{
+.text-grey {
// color: #8c8c8c;
}
-#cryptos .list-quatation .van-cell{
+#cryptos .list-quatation .van-cell {
padding: 24px !important;
border-radius: 1rem;
}
-.list-quatation{
+
+.list-quatation {
margin: 0 20px;
}
</style>
--
Gitblit v1.9.3