正在显示
1 个修改的文件
包含
15 行增加
和
13 行删除
| @@ -124,20 +124,22 @@ class LoginController extends BaseController | @@ -124,20 +124,22 @@ class LoginController extends BaseController | ||
| 124 | $templateModel = new TemplateModule(); | 124 | $templateModel = new TemplateModule(); |
| 125 | $list = $templateModel->list(); | 125 | $list = $templateModel->list(); |
| 126 | foreach ($list as $k => $v){ | 126 | foreach ($list as $k => $v){ |
| 127 | - preg_match_all('/\"https:\/\/develop.globalso.com\/b\/image\/(.*?)\"/', $v['html'], $matches); | ||
| 128 | - if (!empty($matches[1])) { | ||
| 129 | - $srcValues = $matches[1]; | ||
| 130 | - $imageModel = new Image(); | ||
| 131 | - $html = $v['html']; | ||
| 132 | - foreach ($srcValues as $srcValue) { | ||
| 133 | - $image_info = $imageModel->read(['hash' => $srcValue]); | ||
| 134 | - if ($image_info !== false) { | ||
| 135 | - $path = basename($image_info['path']); | ||
| 136 | - $html = $this->re($html, $srcValue, $path); | ||
| 137 | - } | ||
| 138 | - } | 127 | + $html = $this->re($v['html'],'https://develop.globalso.com/a/image/','https://ecdn6.globalso.com/public/template/'); |
| 128 | + $html = $this->re($html,'https://develop.globalso.com/b/image/','https://ecdn6.globalso.com/public/template/'); | ||
| 129 | +// preg_match_all('/\"https:\/\/develop.globalso.com\/b\/image\/(.*?)\"/', $v['html'], $matches); | ||
| 130 | +// if (!empty($matches[1])) { | ||
| 131 | +// $srcValues = $matches[1]; | ||
| 132 | +// $imageModel = new Image(); | ||
| 133 | +// $html = $v['html']; | ||
| 134 | +// foreach ($srcValues as $srcValue) { | ||
| 135 | +// $image_info = $imageModel->read(['hash' => $srcValue]); | ||
| 136 | +// if ($image_info !== false) { | ||
| 137 | +// $path = basename($image_info['path']); | ||
| 138 | +// $html = $this->re($html, $srcValue, $path); | ||
| 139 | +// } | ||
| 140 | +// } | ||
| 139 | $templateModel->edit(['html'=>$html],['id'=>$v['id']]); | 141 | $templateModel->edit(['html'=>$html],['id'=>$v['id']]); |
| 140 | - } | 142 | +// } |
| 141 | } | 143 | } |
| 142 | return 1; | 144 | return 1; |
| 143 | } | 145 | } |
-
请 注册 或 登录 后发表评论