Browse Source

修改合约的止盈止损

master
liaoxinyu 3 weeks ago
parent
commit
d0ebea9cdc
  1. 3
      src/i18n/index.js
  2. 15
      src/views/contract/exchange-store.vue

3
src/i18n/index.js

@ -39,7 +39,8 @@ if (querystring.includes('lang')) {
// 加载i18n语言包 // 加载i18n语言包
const i18n = new VueI18n({ const i18n = new VueI18n({
locale: local, // 默认语言 locale: local, // 默认语言
messages: { en, cn,tw,kor,jp,de,fin,fra,it,pl,pt,spa,swe,ukr,tr } // 文件列表 messages: { en, cn,tw,kor,jp,de,fin,fra,it,pl,pt,spa,swe,ukr,tr } ,// 文件列表
silentFallbackWarn: true,
}); });
// 加载element语言包 // 加载element语言包

15
src/views/contract/exchange-store.vue

@ -656,7 +656,22 @@ export default {
data.amount = this.sellform.amount; data.amount = this.sellform.amount;
data.checkbox = this.checkboxSell; 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(() => { 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.contractAccount();
this.buyform.amount = 0; this.buyform.amount = 0;
this.sellform.amount = 0; this.sellform.amount = 0;

Loading…
Cancel
Save