diff --git a/public/themes/website/1/zh/demo/components/footer.html b/public/themes/website/1/zh/demo/components/footer.html index 0b15f12..f75aed5 100644 --- a/public/themes/website/1/zh/demo/components/footer.html +++ b/public/themes/website/1/zh/demo/components/footer.html @@ -7,11 +7,10 @@ RAYNEN 睿能科技 - +{php} +// 获取股票信息 +$stockInfo = getStockInfo('603933'); +// 判断涨跌颜色 +$priceColor = ''; +if ($stockInfo['change'] !== '--') { +$changeVal = floatval(str_replace(['+', '-'], '', $stockInfo['change'])); +if ($stockInfo['change'][0] === '+') { +$priceColor = 'color: #ef4335'; // 上涨红色 +} elseif ($stockInfo['change'][0] === '-') { +$priceColor = 'color: #00b894'; // 下跌绿色 +} +} +{/php} diff --git a/public/themes/website/1/zh/demo/investment.html b/public/themes/website/1/zh/demo/investment.html index 011f665..98cc91c 100644 --- a/public/themes/website/1/zh/demo/investment.html +++ b/public/themes/website/1/zh/demo/investment.html @@ -140,21 +140,6 @@ {/hcTaglib:category} - - {php} - // 获取股票信息 - $stockInfo = getStockInfo('603933'); - // 判断涨跌颜色 - $priceColor = ''; - if ($stockInfo['change'] !== '--') { - $changeVal = floatval(str_replace(['+', '-'], '', $stockInfo['change'])); - if ($stockInfo['change'][0] === '+') { - $priceColor = 'color: #ef4335'; // 上涨红色 - } elseif ($stockInfo['change'][0] === '-') { - $priceColor = 'color: #00b894'; // 下跌绿色 - } - } - {/php}

股票信息

@@ -162,7 +147,7 @@

股票代码:{$stockInfo.code}

{$stockInfo.price} - + {$stockInfo.change}  {$stockInfo.changePercent}
- 股票走势图 + 睿能科技分时走势图
@@ -289,6 +274,50 @@ + + \ No newline at end of file