Commit 08229a37 authored by rlgy's avatar rlgy

接口数据格式修改

parent 67804f29
...@@ -145,7 +145,7 @@ class CoinService extends Coin implements CoinInterface ...@@ -145,7 +145,7 @@ class CoinService extends Coin implements CoinInterface
Yii::$app->cache->set($this->cache_key_prifx . $this->sid . '_high', $this->high, Yii::$app->cache->set($this->cache_key_prifx . $this->sid . '_high', $this->high,
Yii::$app->params['curl_cache_time']['quotation']); Yii::$app->params['curl_cache_time']['quotation']);
} else { } else {
$this->setHigh($result); return $result;
} }
return $this->high; return $this->high;
} }
...@@ -155,7 +155,7 @@ class CoinService extends Coin implements CoinInterface ...@@ -155,7 +155,7 @@ class CoinService extends Coin implements CoinInterface
*/ */
public function setHigh($high) public function setHigh($high)
{ {
$this->high = (float)sprintf("%0.2f", $high); $this->high = (float)sprintf("%0.2f", $high / 6.6);
} }
/** /**
...@@ -174,7 +174,7 @@ class CoinService extends Coin implements CoinInterface ...@@ -174,7 +174,7 @@ class CoinService extends Coin implements CoinInterface
Yii::$app->cache->set($this->cache_key_prifx . $this->sid . '_low', $this->low, Yii::$app->cache->set($this->cache_key_prifx . $this->sid . '_low', $this->low,
Yii::$app->params['curl_cache_time']['quotation']); Yii::$app->params['curl_cache_time']['quotation']);
} else { } else {
$this->setLow($result); return $result;
} }
return $this->low; return $this->low;
} }
...@@ -184,7 +184,7 @@ class CoinService extends Coin implements CoinInterface ...@@ -184,7 +184,7 @@ class CoinService extends Coin implements CoinInterface
*/ */
public function setLow($low) public function setLow($low)
{ {
$this->low = (float)sprintf("%0.2f", $low); $this->low = (float)sprintf("%0.2f", $low / 6.6);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment