|
...
|
...
|
@@ -15,6 +15,8 @@ use App\Http\Logic\Bside\User\UserLoginLogic; |
|
|
|
use App\Models\File\Image;
|
|
|
|
use App\Models\Service\Service;
|
|
|
|
use App\Models\SmsLog;
|
|
|
|
use App\Models\Template\BTemplate;
|
|
|
|
use App\Models\Template\Template;
|
|
|
|
use App\Models\Template\TemplateModule;
|
|
|
|
use App\Models\User\User as UserModel;
|
|
|
|
use App\Utils\EncryptUtils;
|
|
...
|
...
|
@@ -118,19 +120,30 @@ class LoginController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
public function ceshi(){
|
|
|
|
$imageModel = new Image();
|
|
|
|
$list = $imageModel->list(['path'=>['like','%/p/1/image_other/2023-08/%']]);
|
|
|
|
$templateModel = new Template();
|
|
|
|
$list = $templateModel->list();
|
|
|
|
foreach ($list as $k => $v){
|
|
|
|
$data = [
|
|
|
|
'path'=>'/public/template/'.basename($v['path']),
|
|
|
|
'hash'=>$v['hash'],
|
|
|
|
'size'=>$v['size'],
|
|
|
|
'type'=>$v['type'],
|
|
|
|
'is_cos'=>1,
|
|
|
|
'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
];
|
|
|
|
DB::table('gl_images')->insert($data);
|
|
|
|
$data['html'] = str_replace(
|
|
|
|
'https://develop.globalso.com/a/image/',
|
|
|
|
'https://ecdn6.globalso.com/public/template/',
|
|
|
|
$v['html']
|
|
|
|
);
|
|
|
|
$data['head_html'] = str_replace(
|
|
|
|
'https://develop.globalso.com/a/image/',
|
|
|
|
'https://ecdn6.globalso.com/public/template/',
|
|
|
|
$data['head_html']
|
|
|
|
);
|
|
|
|
$data['main_html'] = str_replace(
|
|
|
|
'https://develop.globalso.com/a/image/',
|
|
|
|
'https://ecdn6.globalso.com/public/template/',
|
|
|
|
$v['main_html']
|
|
|
|
);
|
|
|
|
$data['footer_html'] = str_replace(
|
|
|
|
'https://develop.globalso.com/a/image/',
|
|
|
|
'https://ecdn6.globalso.com/public/template/',
|
|
|
|
$v['footer_html']
|
|
|
|
);
|
|
|
|
$templateModel->edit($data,['id'=>$v['id']]);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
...
|
...
|
|