From 872daddd00287cd44963483ba15f997d25a3da53 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Sat, 05 Jul 2025 11:54:34 +0800
Subject: [PATCH] stye
---
src/assets/css/copy.scss | 2
src/views/news/index.vue | 12 +++-
src/components/Transform/deliveryContract/position.vue | 2
src/components/fx-kline/index.vue | 14 +++-
src/config/theme.js | 2
src/components/Transform/perpetual-order/index.vue | 6 +
src/views/cryptos/PerpetualContract/index.vue | 6 +-
src/views/cryptos/Trade/index.vue | 16 ++++-
src/components/Transform/trade-head/index.vue | 21 +++---
src/components/fx-footer/index.vue | 4
src/views/foreign/CoinChart.vue | 5 +
src/assets/init.scss | 2
src/config/index.js | 4
src/components/Transform/contract-futrue/index.vue | 10 ++
src/components/Transform/contract-header/index.vue | 29 +++++----
src/components/Transform/perpetual-open/index.vue | 22 ++++---
src/components/Transform/cryptos-trade-deep-data/index.vue | 1
src/views/foreign/foreignPerpetualContract/deliveryContract.vue | 2
18 files changed, 100 insertions(+), 60 deletions(-)
diff --git a/src/assets/css/copy.scss b/src/assets/css/copy.scss
index 8e8728e..bbba488 100644
--- a/src/assets/css/copy.scss
+++ b/src/assets/css/copy.scss
@@ -55,7 +55,7 @@
$blue: #1194F7;
$light-blue: #1199FA;
$red: #de5d56;
-$green: #3a7ff6;
+$green: #2ebd85;
$purple: #9A4DFD;
$night: #131a2e;
// 第三版
diff --git a/src/assets/init.scss b/src/assets/init.scss
index 5edafa3..3ea5fc5 100644
--- a/src/assets/init.scss
+++ b/src/assets/init.scss
@@ -56,7 +56,7 @@
$blue: #1194F7;
$light-blue: #1199FA;
$red: #de5d56;
- $green: #3a7ff6;
+ $green: #2ebd85;
$purple: #9A4DFD;
$night: #f5f7fa;
// overwrite vant
diff --git a/src/components/Transform/contract-futrue/index.vue b/src/components/Transform/contract-futrue/index.vue
index 70c5f7e..8df8c70 100644
--- a/src/components/Transform/contract-futrue/index.vue
+++ b/src/components/Transform/contract-futrue/index.vue
@@ -6,10 +6,12 @@
<li v-for="(item, index) in initFutrue.para" v-if="initFutrue.para" :key="item.uuid"
class="h-92 flex items-center mb-22" @click="onSelect(item, index)">
<p class="w-95 h-full flex justify-center items-center font-22 flex-1"
- :class="active === item.para_id ? 'bg-light-blue text-white' : 'delivery_left_tab_background textColor'">{{ item.time_num +
+ :class="active === item.para_id ? 'bg-light-blue text-white' : 'delivery_left_tab_background textColor'"
+ >{{ item.time_num +
item.time_unit.substr(0, 1) }}</p>
<p class="w-125 h-full flex justify-center items-center font-22 flex-1"
- :class="active === item.para_id ? 'bg-dark-blue text-white' : 'delivery_tab_background textColor'">{{
+ :class="active === item.para_id ? 'bg-dark-blue text-white' : 'delivery_tab_background textColor'"
+ >{{
item.profit_ratio }}%</p>
</li>
</ul>
@@ -65,4 +67,8 @@
.bg-dark-blue {
background: #1255A3;
}
+
+ul li p{
+ color: #fff;
+}
</style>
diff --git a/src/components/Transform/contract-header/index.vue b/src/components/Transform/contract-header/index.vue
index 7051af4..68242f9 100644
--- a/src/components/Transform/contract-header/index.vue
+++ b/src/components/Transform/contract-header/index.vue
@@ -5,7 +5,7 @@
<div class="pl-30 pr-30">
<div class="flex justify-start pt-45 before">
<div class="flex items-center ">
- <img src="@/assets/image/icon_back_1.png" class="w-35 h-35 back" alt="" @click="jump()">
+ <img src="@/assets/image/icon_back.png" class="w-35 h-35 back" alt="" @click="jump()">
<img src="@/assets/theme/dark/image/black-convert.png" alt="convert-img" class="w-35 h-35" @click="onSidebar">
<div class="flex pl-21 textColor" @click="onSidebar">
<div class="font-35">{{ symbolName.toUpperCase() || '--' }}</div>
@@ -20,7 +20,7 @@
@click="jump" />
</div> -->
</div>
- <div class="flex justify-between pt-34">
+ <div class="flex justify-between pt-34" v-if="!selectIndex==2">
<button class="tabBtn w-368 h-74 lh-74 border-none rounded"
:class="selectIndex == 1 ? 'select-active' : 'no-select'" @click="changeTab(1)">
{{ $t('永续合约') }}</button>
@@ -173,17 +173,18 @@
}
},
jump() {
- if (this.$route.query?.from === 'trade') {
- this.$router.push('/trade/index?tabActive=1')
- return
- }
- if (this.$route.query.type == 'indices') {
- this.$router.push('/quotes/index')
- } else if (this.$route.query.type == 'US-stocks') {
- this.$router.push('/quotes/index?tabActive=3')
- } else {
- this.$router.push('/quotes/index?tabActive=1')
- }
+ this.$router.go(-1)
+ // if (this.$route.query?.from === 'trade') {
+ // this.$router.push('/trade/index?tabActive=1')
+ // return
+ // }
+ // if (this.$route.query.type == 'indices') {
+ // this.$router.push('/quotes/index')
+ // } else if (this.$route.query.type == 'US-stocks') {
+ // this.$router.push('/quotes/index?tabActive=3')
+ // } else {
+ // this.$router.push('/quotes/index?tabActive=1')
+ // }
},
klineJump() {
this.$router.push(`/cryptos/trendDetails/${this.symbol}?type=${this.queryType}`)
@@ -237,7 +238,7 @@
.select-one-active {
background-color: $red;
- color: $text_color;
+ color: #fff;
border: none;
}
diff --git a/src/components/Transform/cryptos-trade-deep-data/index.vue b/src/components/Transform/cryptos-trade-deep-data/index.vue
index 55558cb..4d4a696 100644
--- a/src/components/Transform/cryptos-trade-deep-data/index.vue
+++ b/src/components/Transform/cryptos-trade-deep-data/index.vue
@@ -1,5 +1,6 @@
<template>
<div class="deep-data">
+ <!-- 币币交易 右侧跳动的数 -->
<div class="flex justify-between text-grey font-24">
<div>
<div>{{ $t('价格') }}</div>
diff --git a/src/components/Transform/deliveryContract/position.vue b/src/components/Transform/deliveryContract/position.vue
index e4e59b9..8bb133b 100644
--- a/src/components/Transform/deliveryContract/position.vue
+++ b/src/components/Transform/deliveryContract/position.vue
@@ -146,7 +146,7 @@
font-style: normal;
font-weight: 400;
font-size: 26.4981px;
- color: $text_color;
+ color: #fff;
}
.position-tag-title {
diff --git a/src/components/Transform/perpetual-open/index.vue b/src/components/Transform/perpetual-open/index.vue
index 7bff1de..5911de5 100644
--- a/src/components/Transform/perpetual-open/index.vue
+++ b/src/components/Transform/perpetual-open/index.vue
@@ -21,7 +21,7 @@
</div>
<div class="pt-30 pb-20">
<div class="flex">
- <div class="w-440 flex flex-col">
+ <div class="w-440 flex flex-col" :style="selectIndex==2 ? 'width:100%' : ''">
<template v-if="selectIndex == 1">
<div class="flex items-center h-66 rounded-lg text-grey">
<p class="font-28 flex-1 flex items-center justify-center h-66 "
@@ -48,28 +48,28 @@
<contract-futrue v-if="selectIndex == 2 && JSON.stringify(initFutrue.para) != '[]'" class="mb-20"
:initFutrue="initFutrue" @paraId="onParaId" />
<div class="h-76 lh-76 greyBg mb-30 flex pr-20 justify-center rounded-lg textColor" v-if="selectIndex == 1">
- <input placeholder="" class="greyBg w-full pl-20 h-76 border-none text-left rounded-lg"
+ <input placeholder="" class=" w-full pl-20 h-76 border-none text-left rounded-lg"
:disabled="type / 1 === 1" @focus="focus = true" v-model="form.price" />
<span class="ml-20">{{ queryType === 'cryptos' ? 'USDT' : 'USD' }}</span>
</div>
- <div class="w-440 flex items-center greyBg h-76 lh-76 rounded-lg" v-if="initFutrue">
+ <div class="w-440 flex items-center h-76 lh-76 rounded-lg" v-if="initFutrue" >
<div v-if="selectIndex == 1 && initFutrue.para && initFutrue.para.length > 0"
class="w-80 flex items-center justify-center" style="height:100%;" @click="onReduce">
<img src="../../../assets/image/public/reduce.png" alt="add" class="w-30 h-6" />
</div>
- <input v-if="selectIndex == 1" :placeholder="$t('张数')" class="border-none greyBg text-center textColor"
+ <input v-if="selectIndex == 1" :placeholder="$t('张数')" class="border-none text-center textColor"
style="width: 156px;" v-model="form.amount" type="number" @input="onInput" />
<input v-if="selectIndex == 2 && JSON.stringify(initFutrue.para) != '[]'"
:placeholder="($t('最少') + initFutrue && initFutrue.para ? $t('最小金额') + initFutrue.para[paraIndex].buy_min : '')"
- class="border-none greyBg text-center textColor" style="width: 156px;" v-model="form.amount" type="number"
+ class="border-none text-center ipt_min" style="width: 156px;background-color: #f0f0f0;" v-model="form.amount" type="number"
@input="onInput" />
<div class="w-80 flex items-center justify-center" style="height:100%;">
<template v-if="selectIndex == 1">
<img @click="onAdd" src="../../../assets/image/public/add.png" alt="reduce" class="w-30 h-30" />
</template>
<template v-else>
- <span class="textColor">{{ queryType === 'cryptos' ? 'USDT' : 'USD' }}</span>
+ <span class="text-grey">{{ queryType === 'cryptos' ? 'USDT' : 'USD' }}</span>
</template>
</div>
</div>
@@ -197,7 +197,7 @@
@click="$router.push('/login')">{{ $t('logIn') }}</div>
</div>
</div>
- <div class="ml-30">
+ <div class="ml-30" v-if="!selectIndex==2">
<div class="w-290 flex justify-between text-grey font-22">
<div>
<div>{{ $t("价格") }}</div>
@@ -360,7 +360,7 @@
},
selectIndex: {
type: [String, Number],
- default: 1
+ default: 2
},
currentType: {
type: String,
@@ -1044,7 +1044,7 @@
justify-content: flex-end;
// padding-right: 40px;
align-items: center;
-
+s
.select-box {
width: 220px;
@@ -1057,4 +1057,8 @@
.deep-div {
min-height: 370px;
}
+
+#cryptos .ipt_min::placeholder {
+ color: #868C9A;
+}
</style>
diff --git a/src/components/Transform/perpetual-order/index.vue b/src/components/Transform/perpetual-order/index.vue
index d4f517d..dc1c487 100644
--- a/src/components/Transform/perpetual-order/index.vue
+++ b/src/components/Transform/perpetual-order/index.vue
@@ -190,10 +190,12 @@
// padding-bottom: 16px;
// color: $text-color;
position: relative;
+ color: #fff !important;
+ background-color: #000;
// padding: 15px 0;
- color: $text_color;
+ // color: $text_color;
border-radius: 8px;
- background-color: $color_main
+ // background-color: $color_main
}
// .active-line::after {
diff --git a/src/components/Transform/trade-head/index.vue b/src/components/Transform/trade-head/index.vue
index fddbef9..993e374 100644
--- a/src/components/Transform/trade-head/index.vue
+++ b/src/components/Transform/trade-head/index.vue
@@ -7,7 +7,7 @@
<div class="flex items-center">
<!-- 没有切换模式的 -->
- <img v-if="isReturn" src="@/assets/image/icon_back_1.png" @click="backPath()" class="w-40 h-40 back mr-50"
+ <img v-if="isReturn" src="@/assets/image/icon_back.png" @click="backPath()" class="w-40 h-40 back mr-50"
alt="">
<template v-if="!isChange">
<img src="../../../assets/theme/dark/image/black-convert.png" alt="convert-img" class="w-35 h-35"
@@ -16,7 +16,7 @@
<!-- 在切换模式下 -->
<template v-if="isChange">
<template v-if="isNight">
- <img src="../../../assets/image/icon_back_1.png" class="w-40 h-40 back mr-50" alt="" @click="backPath()">
+ <img src="../../../assets/image/icon_back.png" class="w-40 h-40 back mr-50" alt="" @click="backPath()">
<img src="./white-convert.png" alt="convert-img" class="w-35 h-35" @click="onSidebar" />
</template>
<template v-else>
@@ -290,17 +290,18 @@
this.$emit('changeNight', !this.isNight)
},
backPath() {
- if (this.$route.query?.from === 'trade') {
- this.$router.push('/trade/index?tabActive=1')
- } else if (this.$route.query.isOptional == 1) {
- this.$router.push('/optional/index')
- }
+ this.$router.go(-1)
+ // if (this.$route.query?.from === 'trade') {
+ // this.$router.push('/trade/index?tabActive=1')
+ // } else if (this.$route.query.isOptional == 1) {
+ // this.$router.push('/optional/index')
+ // }
// else if (this.$route.query.isOptional == 2){
// this.$router.push('/optional/search')
// }
- else {
- this.$router.push('/quotes/index?tabActive=1')
- }
+ // else {
+ // this.$router.push('/quotes/index?tabActive=1')
+ // }
},
//打开自选弹窗
openCurrency() {
diff --git a/src/components/fx-footer/index.vue b/src/components/fx-footer/index.vue
index 54cca41..c74e5a8 100644
--- a/src/components/fx-footer/index.vue
+++ b/src/components/fx-footer/index.vue
@@ -15,12 +15,12 @@
</template>
</van-tabbar-item>
<!-- /foreign -->
- <van-tabbar-item name="trade" :to="'/foreign/deliveryContract/'+jgSymbol">
+ <!-- <van-tabbar-item name="trade" :to="'/foreign/deliveryContract/'+jgSymbol">
<span :class="[active === 'trade' ? 'active' : '']">{{ $t('trade') }}</span>
<template #icon="props">
<img :src="active === 'trade' ? icon.trade.active : icon.trade.inactive" />
</template>
- </van-tabbar-item>
+ </van-tabbar-item> -->
<!-- <van-tabbar-item name="funds" to="/cryptos/funds">
<span>{{ $t('资金') }}</span>
<template #icon="props">
diff --git a/src/components/fx-kline/index.vue b/src/components/fx-kline/index.vue
index 8b6c323..b0489d7 100644
--- a/src/components/fx-kline/index.vue
+++ b/src/components/fx-kline/index.vue
@@ -72,7 +72,11 @@
socket.value = new WebSocket(`${WS_URL}/1/${props.symbol}`)
socket.value.onmessage = (evt) => {
const { data } = evt
- const { code, data: _data } = JSON.parse(data)
+ let { code, data: _data } = JSON.parse(data)
+ // _data[0].high = Math.floor(Math.random() * 100) + 1
+ // _data[0].low = Math.floor(Math.random() * 100) + 1
+ // _data[0].close = Math.floor(Math.random() * 100) + 1
+ // _data[0].open = Math.floor(Math.random() * 100) + 1
if (code / 1 === 0) {
emits('data', _data[0])
updateCharts(_data[0])
@@ -154,8 +158,10 @@
width: quotesStore.stage === 'timeSharing' ? 0 : null,
}
})
+ // quotesStore[SET_STAGE]({ stage: 'timeSharing', seconds: 1000 })
+
if (!quotesStore.stage) {
- quotesStore[SET_STAGE]({ stage: '1min', seconds: 1 * 60 * 1000 })
+ quotesStore[SET_STAGE]({ stage: '1min', seconds: 1000 })
}
emits('loading', true)
@@ -202,8 +208,10 @@
}
})
if (!quotesStore.stage) {
- quotesStore[SET_STAGE]({ stage: '1min', seconds: 1 * 60 * 1000 })
+ quotesStore[SET_STAGE]({ stage: '1min', seconds: 1000 })
}
+ // quotesStore[SET_STAGE]({ stage: 'timeSharing', seconds: 1000 })
+
// console.log(data.value)
nextTick(() => {
diff --git a/src/config/index.js b/src/config/index.js
index cb1ded3..dd96314 100644
--- a/src/config/index.js
+++ b/src/config/index.js
@@ -34,8 +34,8 @@
export const defaultSeconds = 1 * 24 * 60 * 60 * 1000
// const ENV_DEV = 'zhapi.coinbtcs.com' // dev
-// const ENV_DEV = 'openapi.yanshiz.com' // dev
-const ENV_DEV = '192.168.10.18:8086' // dev
+const ENV_DEV = 'openapi.yanshiz.com' // dev
+// const ENV_DEV = '192.168.10.18:8086' // dev
// const ENV_PRO = 'qheufhj.site' // app域名
diff --git a/src/config/theme.js b/src/config/theme.js
index 3f9ec7d..538d70e 100644
--- a/src/config/theme.js
+++ b/src/config/theme.js
@@ -1,3 +1,3 @@
-let theme = 'dark'
+let theme = 'day' // 'dark'
export const THEME = theme
\ No newline at end of file
diff --git a/src/views/cryptos/PerpetualContract/index.vue b/src/views/cryptos/PerpetualContract/index.vue
index 49a97b6..e3446bb 100644
--- a/src/views/cryptos/PerpetualContract/index.vue
+++ b/src/views/cryptos/PerpetualContract/index.vue
@@ -187,8 +187,8 @@
</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>
- <van-icon class="textColor font-20" :name="showCharts ? 'arrow-down' : 'arrow-up'"></van-icon>
+ <span class="font-30 textColor2" style="color:#fff;">{{ symbol.toUpperCase() }} {{ $t('k线图表') }}</span>
+ <van-icon class="font-30" style="color:#fff;" :name="showCharts ? 'arrow-down' : 'arrow-up'"></van-icon>
</div>
<!-- <section class="indicator-index-container" v-if="showKlineChart">
<div class="indicator-index-box">
@@ -462,7 +462,7 @@
//console.log('下单后更新数据')
},
onTab(evt) { // 点击tab后的回调
- console.log('evt', evt)
+ console.log('evt2', evt)
this.clearTimer()
// this.clearTimeout()
this.curTab = evt
diff --git a/src/views/cryptos/Trade/index.vue b/src/views/cryptos/Trade/index.vue
index dc2f4ce..cab2d98 100644
--- a/src/views/cryptos/Trade/index.vue
+++ b/src/views/cryptos/Trade/index.vue
@@ -1,5 +1,6 @@
<template>
<div id="cryptos">
+ <!-- 调节跳动深度 -->
<div class="pb-108 no_touch">
<!-- <div class="px-30 pt-20">
<div class="flex h-88 w-full box-border border-solid-grey rounded-lg">
@@ -128,8 +129,8 @@
</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>
- <van-icon class="textColor font-20" :name="showCharts ? 'arrow-down' : 'arrow-up'"></van-icon>
+ <span class="font-30 textColor2" style="">{{ symbol.toUpperCase() }} {{ $t('k线图表') }}</span>
+ <van-icon class="textColor font-28" :name="showCharts ? 'arrow-down' : 'arrow-up'"></van-icon>
</div>
<!-- <section class="indicator-index-container" v-if="showKlineChart">
<div class="indicator-index-box">
@@ -659,7 +660,7 @@
.select-box {
width: 220px;
- background: #1E1E1E;
+ background: #f5f5f5;
margin-right: 20px;
}
@@ -672,6 +673,8 @@
.option-box {
z-index: 99;
+ background-color: #f5f5f5;
+ box-shadow: 0px 0px 0.1875rem 0.1875rem #f5f5f5;
}
:deep(.van-action-sheet__content) {
@@ -807,4 +810,11 @@
color: $text_color;
}
}
+
+.diviLine{
+ background-color: #f5f5f5;
+}
+.textColor2, .textColor{
+ color: #fff;
+}
</style>
diff --git a/src/views/foreign/CoinChart.vue b/src/views/foreign/CoinChart.vue
index a301ff4..76f775d 100644
--- a/src/views/foreign/CoinChart.vue
+++ b/src/views/foreign/CoinChart.vue
@@ -28,7 +28,7 @@
<div class="flex-l">
<p class="first-line red">{{ priceFormat(chartData?.close) }}</p>
<p class="second-line">
- <span class="red">{{ chartData?.change_ratio ? `${chartData?.change_ratio}%` : '--' }}</span>
+ <span class="red">{{ chartData?.change_ratio_str ? `${chartData?.change_ratio_str}%` : '--' }}</span>
</p>
</div>
<div class="flex-r">
@@ -145,7 +145,7 @@
</div>
<div class="text-right font-12">
<div class="textColor">{{ item.close || '--' }}</div>
- <div class="value" :class="item.change_ratio > 0 ? 'green' : 'red'">{{ item.change_ratio
+ <div class="value" :class="item.change_ratio_str > 0 ? 'green' : 'red'">{{ item.change_ratio_str
|| '--'
}}%</div>
</div>
@@ -298,6 +298,7 @@
// 事件
const onData = (data) => {
+ console.log('onData:',data)
chartData.value = data
noData.value = false
}
diff --git a/src/views/foreign/foreignPerpetualContract/deliveryContract.vue b/src/views/foreign/foreignPerpetualContract/deliveryContract.vue
index 0f98ad4..6099be8 100644
--- a/src/views/foreign/foreignPerpetualContract/deliveryContract.vue
+++ b/src/views/foreign/foreignPerpetualContract/deliveryContract.vue
@@ -145,7 +145,7 @@
}
const onTab = (evt) => { // 点击tab后的回调
- console.log('evt', evt)
+ console.log('evt1', evt)
clearTimer()
curTab.value = evt
if (curTab.value == 'fetchFutrueHoldList') {
diff --git a/src/views/news/index.vue b/src/views/news/index.vue
index f5bfdde..4a65e19 100644
--- a/src/views/news/index.vue
+++ b/src/views/news/index.vue
@@ -63,11 +63,17 @@
</div>
<div class="text-center">{{t('理財')}}</div>
</div>
- <div class="flex-1 flex flex-col items-center">
- <!-- <div class="w-40 h-40 rounded-full flex items-center justify-center">
+ <div class="flex-1 flex flex-col items-center" @click="goToPage('/cryptos/trade/btcusdt')">
+ <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>
- <div class="text-center">模拟交易</div> -->
+ <div class="text-center">{{t('币币交易')}}</div>
+ </div>
+ <div class="flex-1 flex flex-col items-center" @click="goToPage('/cryptos/perpetualContract/btcusdt?type=cryptos&selectIndex=2')">
+ <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>
+ <div class="text-center">{{t('交割合约')}}</div>
</div>
<div class="flex-1 flex flex-col items-center" @click="copyInviteLink">
<div class="w-40 h-40 rounded-full flex items-center justify-center">
--
Gitblit v1.9.3