正在显示
1 个修改的文件
包含
6 行增加
和
3 行删除
| @@ -271,9 +271,11 @@ class LoginController extends BaseController | @@ -271,9 +271,11 @@ 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(); | 274 | + $html = $this->updateHtml($v['html']); |
| 275 | + if(!empty($html)){ | ||
| 275 | $templateModel->edit(['html'=>$html],['id'=>$v['id']]); | 276 | $templateModel->edit(['html'=>$html],['id'=>$v['id']]); |
| 276 | } | 277 | } |
| 278 | + } | ||
| 277 | return 1; | 279 | return 1; |
| 278 | } | 280 | } |
| 279 | 281 | ||
| @@ -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 | } |
-
请 注册 或 登录 后发表评论