正在显示
1 个修改的文件
包含
1 行增加
和
49 行删除
| @@ -266,54 +266,6 @@ class LoginController extends BaseController | @@ -266,54 +266,6 @@ class LoginController extends BaseController | ||
| 266 | } | 266 | } |
| 267 | return $data; | 267 | return $data; |
| 268 | } | 268 | } |
| 269 | - | ||
| 270 | - public function ceshi(){ | ||
| 271 | - $templateModel = new TemplateModule(); | ||
| 272 | - $list = $templateModel->list(); | ||
| 273 | - foreach ($list as $k => $v){ | ||
| 274 | - $html = $this->updateHtml($v['html']); | ||
| 275 | - if(!empty($html)){ | ||
| 276 | - $templateModel->edit(['html'=>$html],['id'=>$v['id']]); | ||
| 277 | - } | ||
| 278 | - } | ||
| 279 | - return 1; | ||
| 280 | - } | ||
| 281 | - | ||
| 282 | - public function re(&$html,$srcValue,$path){ | ||
| 283 | - $html = str_replace( | ||
| 284 | - $srcValue, | ||
| 285 | - $path, | ||
| 286 | - $html | ||
| 287 | - ); | ||
| 288 | - return $html; | ||
| 289 | - } | ||
| 290 | - | ||
| 291 | - public function updateHtml($html){ | ||
| 292 | - $html = $this->re($html,'admin.item.globalso.site','admin.item.globalso.site/'); | ||
| 293 | - $html = $this->re($html,'//','/'); | ||
| 294 | - return $html; | ||
| 295 | -// $html = $this->re($v['html'],'https://develop.globalso.com/b/image/','https://ecdn6.globalso.com/public/template/'); | ||
| 296 | - } | ||
| 297 | - | ||
| 298 | - public function updateCe(){ | ||
| 299 | - $templateModel = new TemplateModule(); | ||
| 300 | - $list = []; | ||
| 301 | - foreach ($list as $k => $v){ | ||
| 302 | - preg_match_all('/\"https:\/\/develop.globalso.com\/a\/image\/(.*?)\"/', $v['html'], $matches); | ||
| 303 | - if (!empty($matches[1])) { | ||
| 304 | - $srcValues = $matches[1]; | ||
| 305 | - $imageModel = new Image(); | ||
| 306 | - $html = $v['html']; | ||
| 307 | - foreach ($srcValues as $srcValue) { | ||
| 308 | - $image_info = $imageModel->read(['hash' => $srcValue]); | ||
| 309 | - if ($image_info !== false) { | ||
| 310 | - $path = basename($image_info['path']); | ||
| 311 | - $html = $this->re($html, $srcValue, $path); | ||
| 312 | - } | ||
| 313 | - } | ||
| 314 | - } | ||
| 315 | - $templateModel->edit(['html'=>$html],['id'=>$v['id']]); | ||
| 316 | - } | ||
| 317 | - } | 269 | + |
| 318 | 270 | ||
| 319 | } | 271 | } |
-
请 注册 或 登录 后发表评论