Commit 15dd5ea9 authored by hj's avatar hj

更新提交

parent 6cfbe5bc
...@@ -34,7 +34,7 @@ class ChemicalsMsdsService ...@@ -34,7 +34,7 @@ class ChemicalsMsdsService
} }
preg_match('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i',$msds_html, $bodyStyle); preg_match('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i',$msds_html, $bodyStyle);
$bodyStyle['bodyStyle'] = "<style>body{ font-family: 'msyh'; font-size: 0.7rem; font-weight: normal; display: block;} h2{font-size: 2.2rem; text-align: center;}.container { padding-right: 5px;padding-left: 5px;margin-right: auto;margin-left: auto;width: 100%;} .sds-cn dd p { font-weight: normal; margin-left: 20px; }" . $bodyStyle['bodyStyle'] = "<style>body{ font-family: 'msyh'; font-size: 0.8rem; font-weight: normal; display: block;} h2{font-size: 2.0rem; text-align: center;}.container { padding-right: 5px;padding-left: 5px;margin-right: auto;margin-left: auto;width: 100%;} .sds-cn dd p { font-weight: normal; margin-left: 20px; }" .
$bodyStyle['bodyStyle']."</style><body>"; $bodyStyle['bodyStyle']."</style><body>";
// 格式化处理 // 格式化处理
...@@ -64,7 +64,7 @@ class ChemicalsMsdsService ...@@ -64,7 +64,7 @@ class ChemicalsMsdsService
if($dlContent['dlContent']){ if($dlContent['dlContent']){
$newMsdsHtml = ''; $newMsdsHtml = '';
foreach($dlContent['dlContent'] as $key => $dl){ foreach($dlContent['dlContent'] as $key => $dl){
$msds_html = str_replace($dlContent['title'][$key],'<h2 style="font-size: 1.6rem;font-weight: bold">'.$dlContent['title'][$key].'</h2>', $msds_html); $msds_html = str_replace($dlContent['title'][$key],'<h2 style="font-size: 1.3rem;font-weight: bold">'.$dlContent['title'][$key].'</h2>', $msds_html);
if(in_array($key, [0,5,9])){ if(in_array($key, [0,5,9])){
$dlHtml = ''; $dlHtml = '';
if($dlContent['title'][$key]){ if($dlContent['title'][$key]){
...@@ -110,12 +110,12 @@ class ChemicalsMsdsService ...@@ -110,12 +110,12 @@ class ChemicalsMsdsService
} }
preg_match('/(?<title>第[\s]*?3[\s\S]+?)<table[\s]*?class=[\\\'|\"]table-text-center avoid-page-break-inside[\\\'|\"]>[\s\S]*?<\/table>/i', $content['content'], $tableContent); preg_match('/(?<title>第[\s]*?3[\s\S]+?)<table[\s]*?class=[\\\'|\"]table-text-center avoid-page-break-inside[\\\'|\"]>[\s\S]*?<\/table>/i', $content['content'], $tableContent);
if($tableContent['title']){ if($tableContent['title']){
$msds_html = str_replace($tableContent['title'],'<h2 style="font-size: 1.6rem;font-weight: bold">'.$tableContent['title'].'</h2>', $msds_html); $msds_html = str_replace($tableContent['title'],'<h2 style="font-size: 1.3rem;font-weight: bold">'.$tableContent['title'].'</h2>', $msds_html);
} }
preg_match('/(?<title>第4[\s\S]*?)<dl>[\s\S]*?<\/dl>/i', $content['content'], $dlContent); preg_match('/(?<title>第4[\s\S]*?)<dl>[\s\S]*?<\/dl>/i', $content['content'], $dlContent);
if($dlContent['title']){ if($dlContent['title']){
$msds_html = str_replace($dlContent['title'],'<h2 style="font-size: 1.6rem;font-weight: bold">'.$dlContent['title'].'</h2>', $msds_html); $msds_html = str_replace($dlContent['title'],'<h2 style="font-size: 1.3rem;font-weight: bold">'.$dlContent['title'].'</h2>', $msds_html);
} }
} }
} }
......
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