|
...
|
...
|
@@ -119,24 +119,14 @@ class LoginController extends BaseController |
|
|
|
$this->response('success',Code::SUCCESS,strtolower($str));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function ceshi(){
|
|
|
|
$templateModel = new TemplateModule();
|
|
|
|
$list = $templateModel->list();
|
|
|
|
foreach ($list as $k => $v){
|
|
|
|
preg_match_all('/\"https:\/\/develop.globalso.com\/a\/image\/(.*?)\"/', $v['html'], $matches);
|
|
|
|
if (!empty($matches[1])) {
|
|
|
|
$srcValues = $matches[1];
|
|
|
|
$imageModel = new Image();
|
|
|
|
$html = $v['html'];
|
|
|
|
foreach ($srcValues as $srcValue) {
|
|
|
|
$image_info = $imageModel->read(['hash' => $srcValue]);
|
|
|
|
if ($image_info !== false) {
|
|
|
|
$path = basename($image_info['path']);
|
|
|
|
$html = $this->re($html, $srcValue, $path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$templateModel->edit(['html'=>$html],['id'=>$v['id']]);
|
|
|
|
unset($v['id']);
|
|
|
|
$data = $v;
|
|
|
|
DB::table('gl_public_template_module_copy')->insert($data);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
...
|
...
|
@@ -155,5 +145,24 @@ class LoginController extends BaseController |
|
|
|
$html = $this->re($v['html'],'https://develop.globalso.com/b/image/','https://ecdn6.globalso.com/public/template/');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function updateCe(){
|
|
|
|
$templateModel = new TemplateModule();
|
|
|
|
$list = [];
|
|
|
|
foreach ($list as $k => $v){
|
|
|
|
preg_match_all('/\"https:\/\/develop.globalso.com\/a\/image\/(.*?)\"/', $v['html'], $matches);
|
|
|
|
if (!empty($matches[1])) {
|
|
|
|
$srcValues = $matches[1];
|
|
|
|
$imageModel = new Image();
|
|
|
|
$html = $v['html'];
|
|
|
|
foreach ($srcValues as $srcValue) {
|
|
|
|
$image_info = $imageModel->read(['hash' => $srcValue]);
|
|
|
|
if ($image_info !== false) {
|
|
|
|
$path = basename($image_info['path']);
|
|
|
|
$html = $this->re($html, $srcValue, $path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$templateModel->edit(['html'=>$html],['id'=>$v['id']]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|