|
|
@ -170,8 +170,8 @@ |
|
|
</ul> |
|
|
</ul> |
|
|
<div class="px-2"> |
|
|
<div class="px-2"> |
|
|
<el-slider |
|
|
<el-slider |
|
|
:value="activeStepBuy" |
|
|
v-model="activeStepBuy" |
|
|
@input="sliderChangeBuy" |
|
|
@change="sliderChangeBuy" |
|
|
:format-tooltip="tooltip" |
|
|
:format-tooltip="tooltip" |
|
|
:marks="marks" |
|
|
:marks="marks" |
|
|
:step="25" |
|
|
:step="25" |
|
|
@ -263,8 +263,8 @@ |
|
|
</ul> |
|
|
</ul> |
|
|
<div class="px-2"> |
|
|
<div class="px-2"> |
|
|
<el-slider |
|
|
<el-slider |
|
|
:value="activeStepSell" |
|
|
v-model="activeStepSell" |
|
|
@input="sliderChangeSell" |
|
|
@change="sliderChangeSell" |
|
|
:format-tooltip="tooltip" |
|
|
:format-tooltip="tooltip" |
|
|
:marks="marks" |
|
|
:marks="marks" |
|
|
:step="25" |
|
|
:step="25" |
|
|
@ -369,6 +369,8 @@ export default { |
|
|
// |
|
|
// |
|
|
buyPercentIndex: null, |
|
|
buyPercentIndex: null, |
|
|
sellPercentIndex: null, |
|
|
sellPercentIndex: null, |
|
|
|
|
|
activeStepBuy: 0, |
|
|
|
|
|
activeStepSell: 0 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -389,6 +391,7 @@ export default { |
|
|
|
|
|
|
|
|
buyTotal: { |
|
|
buyTotal: { |
|
|
get() { |
|
|
get() { |
|
|
|
|
|
// console.log(333) |
|
|
if (!this.isMarket) { |
|
|
if (!this.isMarket) { |
|
|
return Math.multiple(this.buyorder.entrust_price, this.buyorder.amount); |
|
|
return Math.multiple(this.buyorder.entrust_price, this.buyorder.amount); |
|
|
} else { |
|
|
} else { |
|
|
@ -396,6 +399,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
set(val) { |
|
|
set(val) { |
|
|
|
|
|
// console.log(444) |
|
|
// 根据总值 计算数量 |
|
|
// 根据总值 计算数量 |
|
|
if (!this.isMarket) { |
|
|
if (!this.isMarket) { |
|
|
this.buyorder.amount = Math.division(val, this.buyorder.entrust_price); |
|
|
this.buyorder.amount = Math.division(val, this.buyorder.entrust_price); |
|
|
@ -410,7 +414,7 @@ export default { |
|
|
return Math.multiple(this.sellorder.entrust_price, this.sellorder.amount); |
|
|
return Math.multiple(this.sellorder.entrust_price, this.sellorder.amount); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
activeStepBuy(){ |
|
|
// activeStepBuy(){ |
|
|
// console.log(this.buyorder.amount, this.buyTotal, '000000') |
|
|
// console.log(this.buyorder.amount, this.buyTotal, '000000') |
|
|
// let num = 0; |
|
|
// let num = 0; |
|
|
// if(this.isMarket){ |
|
|
// if(this.isMarket){ |
|
|
@ -419,12 +423,12 @@ export default { |
|
|
// num = this.buyorder.amount / (this.fromBalance * 100); |
|
|
// num = this.buyorder.amount / (this.fromBalance * 100); |
|
|
// } |
|
|
// } |
|
|
// return num; |
|
|
// return num; |
|
|
}, |
|
|
// }, |
|
|
activeStepSell(){ |
|
|
// activeStepSell(){ |
|
|
// console.log(1111) |
|
|
// console.log(1111) |
|
|
// let num = this.sellorder.amount / (this.toBalance * 100); |
|
|
// let num = this.sellorder.amount / (this.toBalance * 100); |
|
|
// return num; |
|
|
// return num; |
|
|
}, |
|
|
// }, |
|
|
|
|
|
|
|
|
// 当前语言 |
|
|
// 当前语言 |
|
|
lang() { |
|
|
lang() { |
|
|
@ -502,8 +506,15 @@ export default { |
|
|
// console.info(this.buyTotal, '------------') |
|
|
// console.info(this.buyTotal, '------------') |
|
|
}, |
|
|
}, |
|
|
sliderChangeBuy($ev){ |
|
|
sliderChangeBuy($ev){ |
|
|
// console.log($ev, 22222); |
|
|
console.log($ev, 22222); |
|
|
this.buyTotal = Math.multiple(this.fromBalance, $ev/100); |
|
|
if (!this.buyorder.entrust_price) { |
|
|
|
|
|
this.visibles.buy.limitPrice = true; |
|
|
|
|
|
this.msgList.buy[1] = this.$t('nav.set'); |
|
|
|
|
|
this.clearAll(); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
this.buyorder.amount = Math.multiple(this.fromBalance, $ev/100); |
|
|
|
|
|
// this.buyTotal = Math.multiple(this.fromBalance, $ev/100); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
renderSellAmount(val, index) { |
|
|
renderSellAmount(val, index) { |
|
|
@ -517,6 +528,12 @@ export default { |
|
|
this.sellorder.amount = Math.multiple(this.toBalance, val); |
|
|
this.sellorder.amount = Math.multiple(this.toBalance, val); |
|
|
}, |
|
|
}, |
|
|
sliderChangeSell($ev){ |
|
|
sliderChangeSell($ev){ |
|
|
|
|
|
if (!this.sellorder.entrust_price) { |
|
|
|
|
|
this.visibles.sell.limitPrice = true; |
|
|
|
|
|
this.msgList.sell[1] = this.$t('nav.set'); |
|
|
|
|
|
this.clearAll(); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
this.sellorder.amount = Math.multiple(this.toBalance, $ev/100); |
|
|
this.sellorder.amount = Math.multiple(this.toBalance, $ev/100); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|