|
|
@ -397,7 +397,7 @@ export default { |
|
|
|
|
|
|
|
|
// 有新交易时触发 给限价单设定初始价格 |
|
|
// 有新交易时触发 给限价单设定初始价格 |
|
|
newTrade(newVal, oldVal) { |
|
|
newTrade(newVal, oldVal) { |
|
|
if (!this.isMarket) { |
|
|
// if (!this.isMarket ) { |
|
|
|
|
|
|
|
|
// 新交易对有trade数据 |
|
|
// 新交易对有trade数据 |
|
|
if (!oldVal && newVal) { // 没值到初始化值 |
|
|
if (!oldVal && newVal) { // 没值到初始化值 |
|
|
@ -411,7 +411,7 @@ export default { |
|
|
this.cachePrice = null; |
|
|
this.cachePrice = null; |
|
|
this.reset(); |
|
|
this.reset(); |
|
|
} |
|
|
} |
|
|
} |
|
|
// } |
|
|
}, |
|
|
}, |
|
|
symbol(){ |
|
|
symbol(){ |
|
|
this.getCoinInfo() |
|
|
this.getCoinInfo() |
|
|
@ -491,7 +491,7 @@ export default { |
|
|
handleSellOrder() { |
|
|
handleSellOrder() { |
|
|
// 执行前端的有效性验证 |
|
|
// 执行前端的有效性验证 |
|
|
if (!this.chkValidate(this.sellorder, this.sellTotal, "sell")) return; |
|
|
if (!this.chkValidate(this.sellorder, this.sellTotal, "sell")) return; |
|
|
|
|
|
// console.info(this.sellTotal) |
|
|
const baseArgs = { |
|
|
const baseArgs = { |
|
|
symbol: this.pair.to.concat('/', this.pair.from), |
|
|
symbol: this.pair.to.concat('/', this.pair.from), |
|
|
type: this.type, |
|
|
type: this.type, |
|
|
@ -513,11 +513,13 @@ export default { |
|
|
// 如果没有newTrade时 则没有缓存价格 重置为最小值0 |
|
|
// 如果没有newTrade时 则没有缓存价格 重置为最小值0 |
|
|
// 由于输入框去除了精度空值 这里还需要手动设置精度值 |
|
|
// 由于输入框去除了精度空值 这里还需要手动设置精度值 |
|
|
let price = this.cachePrice || 0; |
|
|
let price = this.cachePrice || 0; |
|
|
|
|
|
// console.info(price) |
|
|
|
|
|
// console.info(this.priceDecimals) |
|
|
this.buyorder.entrust_price = Math.omitTo(price, this.priceDecimals); |
|
|
this.buyorder.entrust_price = Math.omitTo(price, this.priceDecimals); |
|
|
this.buyorder.trigger_price = Math.omitTo(price, this.priceDecimals); |
|
|
this.buyorder.trigger_price = Math.omitTo(price, this.priceDecimals); |
|
|
|
|
|
|
|
|
this.sellorder.entrust_price = Math.omitTo(price, this.priceDecimals); |
|
|
this.sellorder.entrust_price = Math.omitTo(price, this.priceDecimals); |
|
|
|
|
|
// console.info(this.sellorder.entrust_price) |
|
|
this.sellorder.trigger_price = Math.omitTo(price, this.priceDecimals); |
|
|
this.sellorder.trigger_price = Math.omitTo(price, this.priceDecimals); |
|
|
|
|
|
|
|
|
// 清空数量 |
|
|
// 清空数量 |
|
|
|