作者 lyh

gx

@@ -271,8 +271,10 @@ class LoginController extends BaseController @@ -271,8 +271,10 @@ class LoginController extends BaseController
271 $templateModel = new TemplateModule(); 271 $templateModel = new TemplateModule();
272 $list = $templateModel->list(); 272 $list = $templateModel->list();
273 foreach ($list as $k => $v){ 273 foreach ($list as $k => $v){
274 - $html = $this->updateHtml();  
275 - $templateModel->edit(['html'=>$html],['id'=>$v['id']]); 274 + $html = $this->updateHtml($v['html']);
  275 + if(!empty($html)){
  276 + $templateModel->edit(['html'=>$html],['id'=>$v['id']]);
  277 + }
276 } 278 }
277 return 1; 279 return 1;
278 } 280 }
@@ -286,8 +288,9 @@ class LoginController extends BaseController @@ -286,8 +288,9 @@ class LoginController extends BaseController
286 return $html; 288 return $html;
287 } 289 }
288 290
289 - public function updateHtml(){  
290 - $html = $this->re($v['html'],'admin.item.globalso.site','ecdn6.globalso.com/'); 291 + public function updateHtml($html){
  292 + $html = $this->re($html,'admin.item.globalso.site','admin.item.globalso.site/');
  293 + $html = $this->re($html,'//','/');
291 return $html; 294 return $html;
292 // $html = $this->re($v['html'],'https://develop.globalso.com/b/image/','https://ecdn6.globalso.com/public/template/'); 295 // $html = $this->re($v['html'],'https://develop.globalso.com/b/image/','https://ecdn6.globalso.com/public/template/');
293 } 296 }