diff --git a/app/common.php b/app/common.php index 7bd1a86..7470603 100644 --- a/app/common.php +++ b/app/common.php @@ -1855,9 +1855,9 @@ if (!function_exists('fetchStockFromSina')) { return [ 'code' => $stockCode, '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) : '--', 'low' => floatval($fields[5]) > 0 ? number_format(floatval($fields[5]), 2) : '--', 'volume' => floatval($fields[8]) > 0 ? round(floatval($fields[8]) / 1000000, 2) : '--', diff --git a/app/controller/frontend/StockController.php b/app/controller/frontend/StockController.php index 83a226c..2513f67 100644 --- a/app/controller/frontend/StockController.php +++ b/app/controller/frontend/StockController.php @@ -23,7 +23,7 @@ class StockController extends BaseController } } $change = (string)($stock['change'] ?? '--'); - $color = ''; + $color = '#2e353a'; if ($change !== '--' && $change !== '') { if ($change[0] === '+') { $color = '#ef4335'; diff --git a/public/themes/dist_static/static/css/investment.css b/public/themes/dist_static/static/css/investment.css index 0be6105..8351179 100644 --- a/public/themes/dist_static/static/css/investment.css +++ b/public/themes/dist_static/static/css/investment.css @@ -212,7 +212,7 @@ display: flex; align-items: baseline; margin-bottom: 5rem; - color: var(--color-primary); + /*color: var(--color-primary);*/ } .iv-stock__price { font-family: "D-DIN-PRO", "MiSans VF", sans-serif;