From c2859ba688f5ddfd9a57bc5548f9c75b04c6a5c5 Mon Sep 17 00:00:00 2001 From: liaoxinyu Date: Fri, 3 Apr 2026 10:08:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AD=A2=E7=9B=88=E6=AD=A2?= =?UTF-8?q?=E6=8D=9F=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/contract/exchange-store.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/views/contract/exchange-store.vue b/src/views/contract/exchange-store.vue index 9a254ce..36160bc 100644 --- a/src/views/contract/exchange-store.vue +++ b/src/views/contract/exchange-store.vue @@ -540,7 +540,7 @@ export default { methods: { inputEnter(boll) { if(boll){ - this.marginSell = this.marginSell + this.marginSell = String(this.marginSell) .replace(/[^\d.]/g, "") // 移除非数字、非小数点的字符 .replace(/^(\d*\.?\d{0,2}).*$/, "$1"); // 限制最多两位小数 }else{ @@ -666,7 +666,22 @@ export default { data.amount = this.sellform.amount; data.checkbox = this.checkboxSell; } + + if(side==1&&this.checkboxBuy){ + data.tp_trigger_price = this.buyform.pri1; + data.sl_trigger_price = this.buyform.pri2; + }else{ + data.tp_trigger_price = this.sellform.pri1; + data.sl_trigger_price = this.sellform.pri2; + } Contract.openPosition(data).then(() => { + if(side==1&&this.checkboxBuy){ + this.buyform.pri1 = ""; + this.buyform.pri2 = ""; + }else{ + this.sellform.pri1 = ""; + this.sellform.pri2 = ""; + } this.contractAccount(); this.buyform.amount = 0; this.sellform.amount = 0;