Commit a5127559 authored by hj's avatar hj

更新提交

parent 88581dec
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
namespace App\Services; namespace App\Services;
use App\Repositories\Contracts\PlatformCustomerRepository; use App\Repositories\Contracts\PlatformCustomerRepository;
use App\Services\CustomerService;
use App\Support\Traits\Helpers; use App\Support\Traits\Helpers;
class AuthService class AuthService
......
...@@ -134,10 +134,10 @@ trait MsdsTrait ...@@ -134,10 +134,10 @@ trait MsdsTrait
public function getEnMsds($msds_html, $params) public function getEnMsds($msds_html, $params)
{ {
if(!empty($params)) { if(!empty($params)) {
$msds_html = preg_replace('/<th[\s]*?class=[\\\'|\"]width-pc-30[\\\'|\"]>Company<\/th>[\s\S]*?<td[\s]*?class=[\\\'|\"]width-pc-70[\\\'|\"]>[\s\S]*?<\/td>/i', '<th class="width-pc-30">Company:</th> <td class="width-pc-70">' . $params['company_name'] . '</td>', $msds_html); $msds_html = preg_replace('/<th[\s]*?class=[\\\'|\"]width-pc-30[\\\'|\"]>Company<\/th>[\s\S]*?<td[\s]*?class=[\\\'|\"]width-pc-70[\\\'|\"]>[\s\S]*?<\/td>/i', '<th class="width-pc-30">Company:</th> <td class="width-pc-70">' . $params['company_name'] . '</td>', $msds_html);
$msds_html = preg_replace('/<th[\s]*?class=[\\\'|\"]width-pc-30[\\\'|\"]>Address<\/th>[\s\S]*?<td[\s]*?class=[\\\'|\"]width-pc-70[\\\'|\"]>[\s\S]*?<\/td>/i', '<th class="width-pc-30">Address:</dt> <td>' . $params['company_address'] . '</td>', $msds_html); $msds_html = preg_replace('/<th[\s]*?class=[\\\'|\"]width-pc-30[\\\'|\"]>Address<\/th>[\s\S]*?<td[\s]*?class=[\\\'|\"]width-pc-70[\\\'|\"]>[\s\S]*?<\/td>/i', '<th class="width-pc-30">Address:</dt> <td>' . $params['company_address'] . '</td>', $msds_html);
$msds_html = preg_replace('/<th[\s]*?class=[\\\'|\"]width-pc-30[\\\'|\"]>Fax<\/th>[\s\S]*?<td[\s]*?class=[\\\'|\"]width-pc-70[\\\'|\"]>[\s\S]*?<\/td>/i', '<th class="width-pc-30">Fax:</dt> <td>' . $params['company_fax'] . '</td>', $msds_html); $msds_html = preg_replace('/<th[\s]*?class=[\\\'|\"]width-pc-30[\\\'|\"]>Fax<\/th>[\s\S]*?<td[\s]*?class=[\\\'|\"]width-pc-70[\\\'|\"]>[\s\S]*?<\/td>/i', '<th class="width-pc-30">Fax:</dt> <td>' . $params['company_fax'] . '</td>', $msds_html);
$msds_html = preg_replace('/<th[\s]*?class=[\\\'|\"]width-pc-30[\\\'|\"]>Telephone<\/th>[\s\S]*?<td[\s]*?class=[\\\'|\"]width-pc-70[\\\'|\"]>[\s\S]*?<\/td>/i', '<th class="width-pc-30">Telephone:</dt> <td>' . $params['company_phone'] . '</td>', $msds_html); $msds_html = preg_replace('/<th[\s]*?class=[\\\'|\"]width-pc-30[\\\'|\"]>Telephone<\/th>[\s\S]*?<td[\s]*?class=[\\\'|\"]width-pc-70[\\\'|\"]>[\s\S]*?<\/td>/i', '<th class="width-pc-30">Telephone:</dt> <td>' . $params['company_phone'] . '</td>', $msds_html);
} }
...@@ -161,6 +161,10 @@ trait MsdsTrait ...@@ -161,6 +161,10 @@ trait MsdsTrait
$msds_html = preg_replace('/<\/body>/', '</body>', preg_replace('/@body@/', $bodyStyle['bodyStyle'], $msds_html)); $msds_html = preg_replace('/<\/body>/', '</body>', preg_replace('/@body@/', $bodyStyle['bodyStyle'], $msds_html));
//$msds_html = preg_replace('/@body@/', $newMsdsHtml, $msds_html); //$msds_html = preg_replace('/@body@/', $newMsdsHtml, $msds_html);
if(preg_match('/<div[\s]*?class=[\\\'|\"]sds-ghs[\\\'|\"]>/i', $msds_html)){
$msds_html = str_replace('<div class="sds-ghs">','<div class="sds-ghs"><h2 style="height:100px;margin: 1.83em 0"><img src="'.$params['company_logo'].'" style="text-align:center;height:90px;"></h2>', $msds_html);
}
return $msds_html; return $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