正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -263,19 +263,19 @@ class LoginController extends BaseController | @@ -263,19 +263,19 @@ class LoginController extends BaseController | ||
| 263 | $lists = $templateModel->list(); | 263 | $lists = $templateModel->list(); |
| 264 | foreach ($lists as $k => $v){ | 264 | foreach ($lists as $k => $v){ |
| 265 | // 使用正则表达式和 preg_match_all 函数来匹配多个 img 标签的 src 值 | 265 | // 使用正则表达式和 preg_match_all 函数来匹配多个 img 标签的 src 值 |
| 266 | - preg_match_all('/\"https:\/\/develop.globalso.com\/a\/image\/(.*?)\"/', $v['html'], $matches); | 266 | + preg_match_all('/\"https:\/\/admin.item.globalso.site\/a\/image\/(.*?)\"/', $v['html'], $matches); |
| 267 | if (!empty($matches[1])) { | 267 | if (!empty($matches[1])) { |
| 268 | $srcValues = $matches[1]; | 268 | $srcValues = $matches[1]; |
| 269 | - var_dump($srcValues); | ||
| 270 | - die(); | ||
| 271 | $imageModel = new Image(); | 269 | $imageModel = new Image(); |
| 272 | foreach ($srcValues as $srcValue) { | 270 | foreach ($srcValues as $srcValue) { |
| 271 | + var_dump($srcValue); | ||
| 272 | + die(); | ||
| 273 | $hash = basename($srcValue); | 273 | $hash = basename($srcValue); |
| 274 | $image_info = $imageModel->read(['hash'=>$hash]); | 274 | $image_info = $imageModel->read(['hash'=>$hash]); |
| 275 | if($image_info !== false){ | 275 | if($image_info !== false){ |
| 276 | $path = basename($image_info['path']); | 276 | $path = basename($image_info['path']); |
| 277 | $data['html'] = str_replace( | 277 | $data['html'] = str_replace( |
| 278 | - $hash, | 278 | + '/a/image/'.$hash, |
| 279 | $path, | 279 | $path, |
| 280 | $v['html'] | 280 | $v['html'] |
| 281 | ); | 281 | ); |
-
请 注册 或 登录 后发表评论