diff --git a/src/views/exchange/index.vue b/src/views/exchange/index.vue index c714728..683e68e 100644 --- a/src/views/exchange/index.vue +++ b/src/views/exchange/index.vue @@ -167,7 +167,7 @@ export default { }, watch: { - // 切换symbol时更新路由 + // 切换symbol时更新路由 symbol(newVal, oldVal) { // 取消订阅 或者关闭连接 防止干扰下次值 diff --git a/src/views/exchange/make-deal.vue b/src/views/exchange/make-deal.vue index a275566..fcdf52b 100644 --- a/src/views/exchange/make-deal.vue +++ b/src/views/exchange/make-deal.vue @@ -397,7 +397,7 @@ export default { // 有新交易时触发 给限价单设定初始价格 newTrade(newVal, oldVal) { - if (!this.isMarket) { + // if (!this.isMarket ) { // 新交易对有trade数据 if (!oldVal && newVal) { // 没值到初始化值 @@ -411,7 +411,7 @@ export default { this.cachePrice = null; this.reset(); } - } + // } }, symbol(){ this.getCoinInfo() @@ -491,7 +491,7 @@ export default { handleSellOrder() { // 执行前端的有效性验证 if (!this.chkValidate(this.sellorder, this.sellTotal, "sell")) return; - + // console.info(this.sellTotal) const baseArgs = { symbol: this.pair.to.concat('/', this.pair.from), type: this.type, @@ -513,11 +513,13 @@ export default { // 如果没有newTrade时 则没有缓存价格 重置为最小值0 // 由于输入框去除了精度空值 这里还需要手动设置精度值 let price = this.cachePrice || 0; - + // console.info(price) + // console.info(this.priceDecimals) this.buyorder.entrust_price = Math.omitTo(price, this.priceDecimals); this.buyorder.trigger_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); // 清空数量