Commit f00956da authored by hj's avatar hj

更新提交

parent a817ac0f
......@@ -34,7 +34,7 @@ class ChemicalsMsdsService
}
preg_match('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i',$msds_html, $bodyStyle);
$bodyStyle['bodyStyle'] = "<style>body{ font-family: 'msyh'; font-size: 0.8rem; font-weight: bold; display: block;}.container { padding-right: 5px;padding-left: 5px;margin-right: auto;margin-left: auto;width: 90%;} " .
$bodyStyle['bodyStyle'] = "<style>body{ font-family: 'msyh'; font-size: 0.8rem; font-weight: bold; display: block;} h2{font-size: 1.2rem; text-align: center;}.container { padding-right: 5px;padding-left: 5px;margin-right: auto;margin-left: auto;width: 90%;} " .
$bodyStyle['bodyStyle']."</style><body><div class='container'>";
// 格式化处理
......@@ -60,7 +60,7 @@ class ChemicalsMsdsService
if($dlContent['dlContent']){
$newMsdsHtml = '';
foreach($dlContent['dlContent'] as $key => $dl){
$msds_html = str_replace($dlContent['title'][$key],'<h2 style="font-size: 20px; text-align: center;" align="center">'.$dlContent['title'][$key].'</h2>', $msds_html);
$msds_html = str_replace($dlContent['title'][$key],'<h2>'.$dlContent['title'][$key].'</h2>', $msds_html);
if($key == 0){
$dlHtml = '';
if($dlContent['title'][$key]){
......
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