|
|
@ -1855,9 +1855,9 @@ if (!function_exists('fetchStockFromSina')) { |
|
|
return [ |
|
|
return [ |
|
|
'code' => $stockCode, |
|
|
'code' => $stockCode, |
|
|
'name' => $name, |
|
|
'name' => $name, |
|
|
'price' => $price > 0 ? number_format($price, 2) : '--', |
|
|
|
|
|
'change' => $price > 0 ? (($change >= 0 ? '+' : '') . number_format($change, 2)) : '--', |
|
|
|
|
|
'changePercent' => $price > 0 ? (($changePercent >= 0 ? '+' : '') . number_format($changePercent, 2) . '%') : '--', |
|
|
|
|
|
|
|
|
'price' => $price > 0 ? number_format($price, 2) : number_format($prevClose, 2), |
|
|
|
|
|
'change' => $price > 0 ? (($change > 0 ? '+' : '') . number_format($change, 2)) : '0.00', |
|
|
|
|
|
'changePercent' => $price > 0 ? (($changePercent > 0 ? '+' : '') . number_format($changePercent, 2) . '%') : '0.00%', |
|
|
'high' => floatval($fields[4]) > 0 ? number_format(floatval($fields[4]), 2) : '--', |
|
|
'high' => floatval($fields[4]) > 0 ? number_format(floatval($fields[4]), 2) : '--', |
|
|
'low' => floatval($fields[5]) > 0 ? number_format(floatval($fields[5]), 2) : '--', |
|
|
'low' => floatval($fields[5]) > 0 ? number_format(floatval($fields[5]), 2) : '--', |
|
|
'volume' => floatval($fields[8]) > 0 ? round(floatval($fields[8]) / 1000000, 2) : '--', |
|
|
'volume' => floatval($fields[8]) > 0 ? round(floatval($fields[8]) / 1000000, 2) : '--', |
|
|
|