Bladeren bron

调整表格结构

龚成明 2 jaren geleden
bovenliggende
commit
7f0490eefc
1 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 4 3
      scripts/one-pro.js

+ 4 - 3
scripts/one-pro.js

@@ -53,7 +53,7 @@ const orderHandler = function(context, task) {
   })
   })
 }
 }
 
 
-const table = new TableKit(['pair', 'binance', 'order price', 'profit', 'next time'], 20)
+const table = new TableKit(['pair', 'binance', 'order price', 'profit', 'next time', 'percentage'], 20)
 const showInfo = function(context, task) {
 const showInfo = function(context, task) {
   const logger = task.logger
   const logger = task.logger
   const tokenMap = context.tokenMap
   const tokenMap = context.tokenMap
@@ -67,7 +67,7 @@ const showInfo = function(context, task) {
     const BinancePrice = token.BinancePrice ? token.BinancePrice : NaN
     const BinancePrice = token.BinancePrice ? token.BinancePrice : NaN
     const DiffPrice = token.DiffPrice
     const DiffPrice = token.DiffPrice
     const percentage = NumKit.getSubFloat((DiffPrice / OneInchPrice) * 100, 2)
     const percentage = NumKit.getSubFloat((DiffPrice / OneInchPrice) * 100, 2)
-    const orderPrice = token.orderPrice ? token.orderPrice : NaN
+    const orderPrice = token.orderPrice ? token.orderPrice : ''
     const orderPercentage = NumKit.getSubFloat(((BinancePrice - orderPrice) / orderPrice) * 100, 2)
     const orderPercentage = NumKit.getSubFloat(((BinancePrice - orderPrice) / orderPrice) * 100, 2)
     const nextTimeStr = token.nextHandleTime ? TimeKit.getTimeByMillisecond(token.nextHandleTime) : ''
     const nextTimeStr = token.nextHandleTime ? TimeKit.getTimeByMillisecond(token.nextHandleTime) : ''
 
 
@@ -76,7 +76,8 @@ const showInfo = function(context, task) {
       return OneInchPrice && BinancePrice
       return OneInchPrice && BinancePrice
     })()
     })()
 
 
-    const rows = [pair.toString(), BinancePrice.toString(), orderPrice.toString(), orderPercentage.toString().concat('%'), nextTimeStr]
+    const rows = [pair.toString(), BinancePrice.toString(), orderPrice.toString(),
+      orderPercentage.toString().concat('%'), nextTimeStr, percentage.toString().concat('%')]
 
 
     // 识别到在拉盘
     // 识别到在拉盘
     token.isLong = (() => {
     token.isLong = (() => {