From 8c51de06d839339f428ca0691099fe60740765cf Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Sat, 05 Jul 2025 18:36:11 +0800
Subject: [PATCH] style
---
src/views/news/index.vue | 2
src/views/optional/index.vue | 15 +++-
src/components/Transform/deliveryContract/position.vue | 2
src/views/login/index.vue | 3 +
src/components/Transform/perpetual-order/index.vue | 7 ++
src/views/cryptos/PerpetualContract/index.vue | 21 +++---
src/views/certificationCenter/index.vue | 5 +
src/i18n/zhcn.js | 11 ++-
src/views/my/newindex.vue | 6 +
src/assets/init.scss | 4
src/components/Transform/list-quotation/index.vue | 2
src/views/cryptos/index.vue | 1
src/assets/css/variable.scss | 2
src/views/cryptos/Recharge/rechargeList.vue | 6 +-
src/components/Transform/contract-futrue/index.vue | 3
src/components/Transform/contract-header/index.vue | 7 +-
src/components/Transform/perpetual-open/index.vue | 41 +++++++------
src/views/foreign/foreignPerpetualContract/deliveryContract.vue | 4
18 files changed, 84 insertions(+), 58 deletions(-)
diff --git a/src/assets/css/variable.scss b/src/assets/css/variable.scss
index 7598553..7b29c3e 100644
--- a/src/assets/css/variable.scss
+++ b/src/assets/css/variable.scss
@@ -40,7 +40,7 @@
$US_tabActice_background: #3640f0;
$lable_color: #B6BDD4;
$cont_background: #f6f6f6;
-$delivery_left_tab_background: #f0f0f0;
+$delivery_left_tab_background: #c8cad2;
$delivery_tab_background: #f0f0f0;
$search_background: #1B233B;
$pledgeLoan_background:#00E3FF;
diff --git a/src/assets/init.scss b/src/assets/init.scss
index 3ea5fc5..3a67205 100644
--- a/src/assets/init.scss
+++ b/src/assets/init.scss
@@ -341,11 +341,11 @@
}
.bg-dark-blue {
- background: #000;
+ background: #1255a3;
}
.bg-light-blue {
- background: #000;
+ background: #1d91ff;
}
.bg-f5 {
diff --git a/src/components/Transform/contract-futrue/index.vue b/src/components/Transform/contract-futrue/index.vue
index 8df8c70..ca97557 100644
--- a/src/components/Transform/contract-futrue/index.vue
+++ b/src/components/Transform/contract-futrue/index.vue
@@ -56,8 +56,7 @@
.bgDark {
-
- background: 242424
+ background: #242424;
}
.bg-light-blue {
diff --git a/src/components/Transform/contract-header/index.vue b/src/components/Transform/contract-header/index.vue
index 68242f9..260b714 100644
--- a/src/components/Transform/contract-header/index.vue
+++ b/src/components/Transform/contract-header/index.vue
@@ -20,10 +20,11 @@
@click="jump" />
</div> -->
</div>
- <div class="flex justify-between pt-34" v-if="!selectIndex==2">
- <button class="tabBtn w-368 h-74 lh-74 border-none rounded"
+ <!-- v-if="!selectIndex==2" -->
+ <div class="flex justify-between pt-34" >
+ <!-- <button class="tabBtn w-368 h-74 lh-74 border-none rounded"
:class="selectIndex == 1 ? 'select-active' : 'no-select'" @click="changeTab(1)">
- {{ $t('永续合约') }}</button>
+ {{ $t('永续合约') }}</button> -->
<button class="tabBtn w-368 h-74 lh-74 border-none rounded"
:class="selectIndex == 2 ? 'select-one-active' : 'no-select'" @click="changeTab(2)">
{{ queryType == 'cryptos' ? $t('交割合约') : $t('期货交易') }}</button>
diff --git a/src/components/Transform/deliveryContract/position.vue b/src/components/Transform/deliveryContract/position.vue
index 8bb133b..50576f0 100644
--- a/src/components/Transform/deliveryContract/position.vue
+++ b/src/components/Transform/deliveryContract/position.vue
@@ -44,7 +44,7 @@
<span class="position-text1">{{ $t('操作') }}</span>
<span class="position-text2 colorMain" @click="onDetail(item)">{{ $t('详情') }}</span>
</div>
- <div style="margin-top: 33px;width: 100%;height: 1px;float: left;" class="bgDark"></div>
+ <div style="margin-top: 33px;width: 100%;height: 1px;float: left;background-color: #e5e7ed;" class="bgDark"></div>
</div>
</div>
diff --git a/src/components/Transform/list-quotation/index.vue b/src/components/Transform/list-quotation/index.vue
index fae11c0..c6aa564 100644
--- a/src/components/Transform/list-quotation/index.vue
+++ b/src/components/Transform/list-quotation/index.vue
@@ -174,7 +174,7 @@
// /cryptos/perpetualContract/btcusdt?selectIndex=2
this.$router.push({
path: `/cryptos/perpetualContract/${item.symbol}`,
- query: { type: 'cryptos', selectIndex: 2 }
+ query: { selectIndex: 2 }
});
// this.$router.push({
// path: `/foreign/deliveryContract/${item.symbol}`,
diff --git a/src/components/Transform/perpetual-open/index.vue b/src/components/Transform/perpetual-open/index.vue
index 5911de5..2bfdce5 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" :style="selectIndex==2 ? 'width:100%' : ''">
+ <div class="w-440 flex flex-col">
<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=" w-full pl-20 h-76 border-none text-left rounded-lg"
+ <input placeholder="" class="greyBg 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 h-76 lh-76 rounded-lg" v-if="initFutrue" >
+ <div class="w-440 flex items-center greyBg h-76 lh-76 rounded-lg" style="background-color:#f5f5f5;" 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 text-center textColor"
+ <input v-if="selectIndex == 1" :placeholder="$t('张数')" class="border-none greyBg 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 text-center ipt_min" style="width: 156px;background-color: #f0f0f0;" v-model="form.amount" type="number"
+ class="border-none greyBg text-center textColor" style="width: 156px;background-color:#f5f5f5;" v-model="form.amount" type="number"
@input="onInput" />
- <div class="w-80 flex items-center justify-center" style="height:100%;">
+ <div class="w-80 flex items-center justify-center" style="height:100%;background-color:#f5f5f5;">
<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="text-grey">{{ queryType === 'cryptos' ? 'USDT' : 'USD' }}</span>
+ <span class="textColor">{{ 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" v-if="!selectIndex==2">
+ <div class="ml-30">
<div class="w-290 flex justify-between text-grey font-22">
<div>
<div>{{ $t("价格") }}</div>
@@ -812,7 +812,9 @@
if (this.selectIndex / 1 === 1) {
this.$refs.sliderRef.emptyValue()
}
- this.$emit('ordered', emitFunc)
+ if (this.$emit) {
+ // this.$emit('ordered', emitFunc)
+ }
_getBalance().then(data => { // 刷新余额
this.$store.commit('user/SET_USERINFO', { balance: data.money })
})
@@ -965,9 +967,11 @@
right: 0;
top: 90px;
width: 100%;
- background-color: $grey_bg;
+ background-color: #f5f5f5;
+ box-shadow: 0px 0px 0.1875rem 0.1875rem #f5f5f5;
+ // background-color: $grey_bg;
text-align: center;
- box-shadow: 0px 0px 3px 3px $grey_bg;
+ // box-shadow: 0px 0px 3px 3px $grey_bg;
border-radius: 4px;
color: $text-color;
z-index: 10;
@@ -1044,21 +1048,22 @@
justify-content: flex-end;
// padding-right: 40px;
align-items: center;
-s
+
.select-box {
width: 220px;
- background: #1E1E1E;
+ background: #f5f5f5;
margin-right: 20px;
}
}
-
+.diviLine{
+ background-color: #f5f5f5;
+}
+.textColor2, .textColor{
+ color: #fff;
+}
.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 dc1c487..730138b 100644
--- a/src/components/Transform/perpetual-order/index.vue
+++ b/src/components/Transform/perpetual-order/index.vue
@@ -191,7 +191,7 @@
// color: $text-color;
position: relative;
color: #fff !important;
- background-color: #000;
+ background-color: #3a7ff6;
// padding: 15px 0;
// color: $text_color;
border-radius: 8px;
@@ -217,4 +217,9 @@
color: $text_color;
}
}
+
+.border-b-color{
+ border-bottom: 1px solid #e5e7ed !important;
+ padding-bottom: 10px;
+}
</style>
diff --git a/src/i18n/zhcn.js b/src/i18n/zhcn.js
index 17badf8..4123a81 100644
--- a/src/i18n/zhcn.js
+++ b/src/i18n/zhcn.js
@@ -1689,6 +1689,7 @@
"历史记录": "历史记录",
"充值": "充值",
"提现": "提现",
+ '兑换': '兑换',
"数字币地址转账": "数字币地址转账",
"数字货币": "数字货币",
"充值详情": "充值详情",
@@ -2747,13 +2748,13 @@
'美股指数': '美股指数',
'公告中心': '公告中心',
'搜索更多服务': '搜索更多服务',
- '股票':'股票',
- '买家':'买家',
- '卖家':'卖家',
- '已存入交易所账户,请放心付款':'已存入交易所账户,请放心付款',
+ '股票': '股票',
+ '买家': '买家',
+ '卖家': '卖家',
+ '已存入交易所账户,请放心付款': '已存入交易所账户,请放心付款',
'请输入推荐码': '请输入推荐码',
'请输入正确的推荐码': '请输入正确的推荐码',
- '余额不足':'余额不足',
+ '余额不足': '余额不足',
"未实现盈亏(USD)": "未实现盈亏(USD)",
"证件号码长度超过50": "证件号码长度超过50",
"实名姓名长度超过50": "实名姓名长度超过50",
diff --git a/src/views/certificationCenter/index.vue b/src/views/certificationCenter/index.vue
index 7944e3b..966e30c 100644
--- a/src/views/certificationCenter/index.vue
+++ b/src/views/certificationCenter/index.vue
@@ -505,7 +505,7 @@
border-radius: 0.5rem;
line-height: 45px;
height: 45px;
- color: $text_color;
+ color: #fff;
}
.text-red {
@@ -642,4 +642,7 @@
padding-bottom: 10px;
border-bottom: 1px solid $border_color;
}
+.gn-span{
+ color: #fff;
+}
</style>
\ No newline at end of file
diff --git a/src/views/cryptos/PerpetualContract/index.vue b/src/views/cryptos/PerpetualContract/index.vue
index e3446bb..c1a3290 100644
--- a/src/views/cryptos/PerpetualContract/index.vue
+++ b/src/views/cryptos/PerpetualContract/index.vue
@@ -84,11 +84,12 @@
</div>
</section>
<div class="mainBackground rounded-view" key="x">
- <PerpetualOpen class="pl-30 pr-30" :key="keyIndex + 'a'" :selectIndex="selectIndex" :symbol="symbol"
+ <!-- 永续合约 -->
+ <!-- <PerpetualOpen class="pl-30 pr-30" :key="keyIndex + 'a'" :selectIndex="selectIndex" :symbol="symbol"
:green-data="bids" :red-data="asks" :price="price" :init-open="initOpen" :init-close="initClose"
:init-futrue="initFutrue" :currentType="currentType" @changeValueBack="changeValueBack"
@changeCurrentType="changeCurrentType" @ordered="onOrdered">
- </PerpetualOpen>
+ </PerpetualOpen> -->
<div class="line"></div>
<!-- 委托/持仓-->
<PerpetualOrder class="pl-30 pr-30" :key="keyIndex + 'b'" :symbol="symbol" :order-cur="orderCur"
@@ -449,15 +450,13 @@
this.clearTimer()
// this.clearTimeout()
this.initParam(this.symbol, evt) // 重新初始化
- // TODO: 这里要做判断
- if (this.selectIndex / 1 === 1) {
- this[this.curTab](this.symbol) // 重新调取记录
- console.log('this.curTab', this.curTab)
- } else { // 交割合约
- this[this.curTab](this.symbol)
- // this.show = true
- console.log('curTab', evt, this.curTab)
-
+ // 判断方法是否存在
+ const fn = this[this.curTab];
+ if (typeof fn === 'function') {
+ fn.call(this, this.symbol);
+ console.log('[onOrdered] 调用方法:', this.curTab, '参数:', this.symbol, '事件:', evt);
+ } else {
+ console.warn(`[onOrdered] curTab 方法不存在: ${this.curTab}`);
}
//console.log('下单后更新数据')
},
diff --git a/src/views/cryptos/Recharge/rechargeList.vue b/src/views/cryptos/Recharge/rechargeList.vue
index 036856d..333fc8d 100644
--- a/src/views/cryptos/Recharge/rechargeList.vue
+++ b/src/views/cryptos/Recharge/rechargeList.vue
@@ -29,7 +29,7 @@
</div>
</div>
</div>
- <div class="textColor mt-40">
+ <!-- <div class="textColor mt-40">
<div class="pl-36 pr-36 h-90 lh-90 border-b-color flex justify-between font-28" v-for="(item, index) in list"
:key="index" @click="toPath(item.url)">
<div class="flex items-center">
@@ -40,7 +40,7 @@
<van-icon class="textColor1" name="arrow" />
</div>
</div>
- </div>
+ </div> -->
</div>
</div>
</template>
@@ -104,7 +104,7 @@
// }
},
backFunc() {
- this.$router.push('/quotes/index?tabActive=1')
+ this.$router.back()
},
selectSymbol(symbol) {
this.$router.push({
diff --git a/src/views/cryptos/index.vue b/src/views/cryptos/index.vue
index a035f16..172e0b3 100644
--- a/src/views/cryptos/index.vue
+++ b/src/views/cryptos/index.vue
@@ -142,6 +142,7 @@
if (!(list instanceof Array)) {
return
}
+ // console.log('接口:_getHomeList 热门:',list)
this.loading = false
// this.qList = list.slice(0,10);
this.qList = list;
diff --git a/src/views/foreign/foreignPerpetualContract/deliveryContract.vue b/src/views/foreign/foreignPerpetualContract/deliveryContract.vue
index 6099be8..e04677b 100644
--- a/src/views/foreign/foreignPerpetualContract/deliveryContract.vue
+++ b/src/views/foreign/foreignPerpetualContract/deliveryContract.vue
@@ -134,7 +134,7 @@
const onOrdered = (evt) => { // 下单过后的回调
clearTimer()
// this.clearTimeout()
- console.log(evt)
+ console.log('下单过后的回调onOrdered:',evt)
initParam(currentSymbol.value, evt) // 重新初始化
// TODO: 这里要做判断
if (curTab.value == 'fetchFutrueHoldList') {
@@ -361,7 +361,7 @@
.line {
height: 6px;
- background: $selectSymbol_background;
+ background: #f5f5f5;
}
@keyframes animate1 {
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 3dcca4f..0b908f1 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -208,4 +208,7 @@
.noTips {
margin-top: 22px;
}
+.colorMain{
+ color: #1194F7;
+}
</style>
\ No newline at end of file
diff --git a/src/views/my/newindex.vue b/src/views/my/newindex.vue
index 78df43f..387eafe 100644
--- a/src/views/my/newindex.vue
+++ b/src/views/my/newindex.vue
@@ -131,7 +131,11 @@
]
})
const onRoute = (path) => {
- console.log(path)
+ console.log(path, userStore)
+ if (!userStore.userInfo || !userStore.userInfo.token) {
+ router.push('/login')
+ return
+ }
router.push(path)
}
onMounted(() => {
diff --git a/src/views/news/index.vue b/src/views/news/index.vue
index 4a65e19..2d62c93 100644
--- a/src/views/news/index.vue
+++ b/src/views/news/index.vue
@@ -69,7 +69,7 @@
</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="flex-1 flex flex-col items-center" @click="goToPage('/cryptos/perpetualContract/btcusdt?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>
diff --git a/src/views/optional/index.vue b/src/views/optional/index.vue
index 714a89d..bbaa8d1 100644
--- a/src/views/optional/index.vue
+++ b/src/views/optional/index.vue
@@ -4,17 +4,17 @@
<div class="text-17 font-medium block">{{ t('总额') }}</div>
<div class="text-34 font-medium block">{{symbol}}</div>
<div class="flex items-center mt-20">
- <div class="flex items-center rounded-14 bg-#3640f0 px-10">
+ <div class="flex items-center rounded-14 bg-#3640f0 px-10" @click="goTo('/cryptos/recharge/rechargeList')">
<div class="text-13 font-bold">{{ t('充值') }}</div>
</div>
- <div class="flex items-center rounded-14 bg-#3640f0 px-10 ml-10">
+ <div class="flex items-center rounded-14 bg-#3640f0 px-10 ml-10" @click="goTo('/cryptos/withdraw/withdrawPage')">
<div class="text-13 font-bold">{{ t('提现') }}</div>
</div>
- <div class="flex items-center rounded-14 bg-#3640f0 px-10 ml-10">
+ <div class="flex items-center rounded-14 bg-#3640f0 px-10 ml-10" @click="goTo('/cryptos/exchangePage')">
<div class="text-13 font-bold">{{ t('兑换') }}</div>
</div>
<div class="flex flex-1 justify-end">
- <img src="@/assets/imgs/icon-order.png" class="w-14 h-15" draggable="false">
+ <!-- <img src="@/assets/imgs/icon-order.png" class="w-14 h-15" draggable="false"> -->
</div>
</div>
</div>
@@ -57,8 +57,9 @@
import { ref, onMounted } from 'vue';
import { _getContractBySymbolType, _contractOrder } from '@/service/etf.api';
import { useI18n } from "vue-i18n";
+import {useRouter} from 'vue-router';
const { t } = useI18n()
-
+const router = useRouter();
onMounted(() => {
getSymbol();
@@ -79,6 +80,10 @@
symbol.value = response.money_contract || symbol.value;
};
+const goTo = (url) => {
+ router.push(url);
+
+}
const getOrderList = async () => {
const params = {
--
Gitblit v1.9.3