From 349c48e168b9f2580334422228acde7d1b21bede Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Fri, 05 Jun 2026 11:19:15 +0800
Subject: [PATCH] 1
---
src/components/Transform/perpetual-open/index.vue | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/src/components/Transform/perpetual-open/index.vue b/src/components/Transform/perpetual-open/index.vue
index 8959a8d..bd02be2 100644
--- a/src/components/Transform/perpetual-open/index.vue
+++ b/src/components/Transform/perpetual-open/index.vue
@@ -62,8 +62,11 @@
</div>
</div>
</template>
- <contract-futrue v-if="selectIndex == 2 && JSON.stringify(initFutrue.para) != '[]'" class="mb-20"
+ <contract-futrue v-if="selectIndex == 2 && hasFutruePara" class="mb-20"
:initFutrue="initFutrue" @paraId="onParaId" />
+ <div v-else-if="selectIndex == 2" class="text-grey font-26 py-20 text-center mb-20">
+ {{ $t('暂无交割周期配置,请联系客服') }}
+ </div>
<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"
:disabled="type / 1 === 1" @focus="focus = true" v-model="form.price" />
@@ -79,7 +82,7 @@
<input v-if="selectIndex == 1" placeholder="USDT" class="border-none greyBg text-center textColor"
style="width: 17rem;border-radius: 5rem;" v-model="form.amount" type="number" @input="onInput" />
- <input v-if="selectIndex == 2 && JSON.stringify(initFutrue.para) != '[]'"
+ <input v-if="selectIndex == 2 && hasFutruePara"
:placeholder="($t('最少') + initFutrue && initFutrue.para ? $t('最小金额') + initFutrue.para[paraIndex].buy_min : '')"
class="border-none greyBg text-center textColor" style="width: 17rem;border-radius: 5rem;"
v-model="form.amount" type="number" @input="onInput" />
@@ -158,15 +161,15 @@
<div class="textColor">{{ initFutrue.amount }} USDT</div>
</div>
<div class="flex font-24 text-grey justify-between mt-20"
- v-if="selectIndex == 2 && JSON.stringify(initFutrue.para) != '[]'">
+ v-if="selectIndex == 2 && hasFutruePara">
<div>{{ $t("手续费") }}</div>
<div class="textColor">
{{
(
form.amount *
(initFutrue && initFutrue.para
- ? initData.para[paraIndex].unit_fee
- : "")
+ ? initFutrue.para[paraIndex].unit_fee
+ : 0)
).toFixed(2)
}}
{{ queryType === 'cryptos' ? 'USDT' : 'USD' }}
@@ -200,7 +203,7 @@
</div>
</div>
</template>
- <template v-if="selectIndex == 2">
+ <template v-if="selectIndex == 2 && hasFutruePara">
<div class="w-full h-80 lh-80 bg-green flex text-white rounded-ban mt-10 " @click="order('open')"
v-if="userInfo.token">
<div class="font-34 relative text-center" style="flex-grow: 1">
@@ -367,7 +370,6 @@
import ContractFutrue from '@/components/Transform/contract-futrue/index.vue'
import PopupDelivery from "@/components/Transform/popup-delivery/index.vue";
import { fixDate } from "@/utils/index.js";
-import { THEME } from '@/config/theme'
import AmountSlider from "./amountSlider.vue";
import "vue-slider-component/theme/default.css";
import { _getHomeList } from "@/service/home.api";
@@ -509,6 +511,9 @@
computed: {
...mapGetters('user', ['userInfo']),
...mapGetters('home', ['currency']),
+ hasFutruePara() {
+ return Array.isArray(this.initFutrue?.para) && this.initFutrue.para.length > 0
+ },
initData() {
let obj = null
if (this.selectIndex / 1 === 1) {
@@ -536,11 +541,13 @@
// console.log("dddddd", max, this.form.lever_rate, (1 / this.form.lever_rate + this.initData.fee));
return max
+ },
+ THEME() {
+ return this.$store.state.vant.theme
}
},
data() {
return {
- THEME,
fixDate,
bfbindex: null,
bfblist: [
@@ -971,6 +978,7 @@
border: 1px solid #cbcbcb;
text-align: center;
border-radius: 10px;
+ color: #7f7f7f;
}
.btns_box {
@@ -1185,7 +1193,7 @@
.select-box {
width: 220px;
border-radius: 2.5rem;
- background: #1E1E1E;
+ background: #aaa;
margin-right: 20px;
}
--
Gitblit v1.9.3