|
|
|
@ -103,7 +103,7 @@ |
|
|
|
<span class="input-group-text">{{ $t("contract.e2") }}</span> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
<div class="px-2" v-if="this.tab == 1"> |
|
|
|
<div class="px-2 mb-4" v-if="this.tab == 1"> |
|
|
|
<el-slider |
|
|
|
:value="activeStep" |
|
|
|
@input="sliderChange" |
|
|
|
@ -113,8 +113,8 @@ |
|
|
|
></el-slider> |
|
|
|
</div> |
|
|
|
<!-- 开仓 --> |
|
|
|
<div v-if="tab == 1"> |
|
|
|
<div class="d-flex justify-content-between"> |
|
|
|
<div v-if="tab == 1" class="kaicang"> |
|
|
|
<div class="d-flex justify-content-between mb-3"> |
|
|
|
<!-- <div>{{ $t("contract.e3") }}:</div> --> |
|
|
|
<div>{{ $t("contract.e1") }}:</div> |
|
|
|
|
|
|
|
@ -145,11 +145,11 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="exchange_button" v-if="tab == 1"> |
|
|
|
<div class="px-2 flex-fill mb-4"> |
|
|
|
<div class="px-1 flex-fill mb-4"> |
|
|
|
<button |
|
|
|
@click="ifOpenPosition(1)" |
|
|
|
type="button" |
|
|
|
class="sub w-24/24 btn-success btn btn-sm" |
|
|
|
class="sub w-24/24 btn-success btn btn-sm mb-3" |
|
|
|
> |
|
|
|
{{ $t("contract.d0") }} |
|
|
|
<!-- <span class="fn-12"> ({{ $t("contract.e6") }}) </span> --> |
|
|
|
@ -159,11 +159,11 @@ |
|
|
|
<!-- {{ $t("contract.e2") }} --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="px-2 flex-fill"> |
|
|
|
<div class="px-1 flex-fill"> |
|
|
|
<button |
|
|
|
@click="ifOpenPosition(2)" |
|
|
|
type="button" |
|
|
|
class="sub w-24/24 btn-danger btn btn-sm" |
|
|
|
class="sub w-24/24 btn-danger btn btn-sm mb-3" |
|
|
|
> |
|
|
|
{{ $t("contract.d2") }} |
|
|
|
<!-- <span class="fn-12"> ({{ $t("contract.e8") }}) </span> --> |
|
|
|
@ -401,33 +401,41 @@ export default { |
|
|
|
}, |
|
|
|
// 提示 |
|
|
|
ifOpenPosition(side) { |
|
|
|
let typeStr = |
|
|
|
this.form.type == 1 |
|
|
|
? `${this.form.entrust_price}${this.$t("contract.f0")}` |
|
|
|
: this.$t("contract.d9"); |
|
|
|
let decStr = |
|
|
|
this.tab == 1 |
|
|
|
? `${this.$t("contract.d5")}${this.form.amount}${this.$t( |
|
|
|
"contract.e2" |
|
|
|
)}${side == 1 ? this.$t("contract.f1") : this.$t("contract.f2")}` |
|
|
|
: `${this.$t("contract.d6")}${this.form.amount}${this.$t( |
|
|
|
"contract.e2" |
|
|
|
)}`; |
|
|
|
if (this.tab == 1) { |
|
|
|
this.openPosition(side); |
|
|
|
} else { |
|
|
|
this.closePosition(side); |
|
|
|
} |
|
|
|
|
|
|
|
// let typeStr = |
|
|
|
// this.form.type == 1 |
|
|
|
// ? `${this.form.entrust_price}${this.$t("contract.f0")}` |
|
|
|
// : this.$t("contract.d9"); |
|
|
|
// let decStr = |
|
|
|
// this.tab == 1 |
|
|
|
// ? `${this.$t("contract.d5")}${this.form.amount}${this.$t( |
|
|
|
// "contract.e2" |
|
|
|
// )}${side == 1 ? this.$t("contract.f1") : this.$t("contract.f2")}` |
|
|
|
// : `${this.$t("contract.d6")}${this.form.amount}${this.$t( |
|
|
|
// "contract.e2" |
|
|
|
// )}`; |
|
|
|
|
|
|
|
|
|
|
|
// `${this.$t("contract.f3")}${typeStr}${this.form.lever_rate}${this.$t( |
|
|
|
// "contract.f4" |
|
|
|
// )}${decStr}?` |
|
|
|
this.$confirm( |
|
|
|
`${this.$t("contract.f3")}${typeStr}${this.form.lever_rate} |
|
|
|
${this.$t("contract.f4")}${this.$t("contract.d5")}?` |
|
|
|
) |
|
|
|
.then(res => { |
|
|
|
if (this.tab == 1) { |
|
|
|
this.openPosition(side); |
|
|
|
} else { |
|
|
|
this.closePosition(side); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(res => {}); |
|
|
|
// this.$confirm( |
|
|
|
// `${this.$t("contract.f3")}${typeStr}${this.form.lever_rate} |
|
|
|
// ${this.$t("contract.f4")}${this.$t("contract.d5")}?` |
|
|
|
// ) |
|
|
|
// .then(res => { |
|
|
|
// if (this.tab == 1) { |
|
|
|
// this.openPosition(side); |
|
|
|
// } else { |
|
|
|
// this.closePosition(side); |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// .catch(res => {}); |
|
|
|
}, |
|
|
|
// 开仓 |
|
|
|
openPosition(side) { |
|
|
|
@ -465,5 +473,10 @@ export default { |
|
|
|
<style scoped="scoped"> |
|
|
|
.exchange_button{ |
|
|
|
display: flex; |
|
|
|
font-size: 16px !important; |
|
|
|
} |
|
|
|
.btn,.kaicang{ |
|
|
|
font-size: 0.9rem; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
|