From 8ac3be32a450caf642c4fcdc8fcdbc64d52968a6 Mon Sep 17 00:00:00 2001 From: ltlzx <942659938@qq.com> Date: Mon, 28 Mar 2022 13:32:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B8=81=E5=B8=81=E5=8D=96?= =?UTF-8?q?=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/exchange/index.vue | 2 +- src/views/exchange/make-deal.vue | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) 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); // 清空数量