正在显示
1 个修改的文件
包含
25 行增加
和
12 行删除
| @@ -15,6 +15,8 @@ use App\Http\Logic\Bside\User\UserLoginLogic; | @@ -15,6 +15,8 @@ use App\Http\Logic\Bside\User\UserLoginLogic; | ||
| 15 | use App\Models\File\Image; | 15 | use App\Models\File\Image; |
| 16 | use App\Models\Service\Service; | 16 | use App\Models\Service\Service; |
| 17 | use App\Models\SmsLog; | 17 | use App\Models\SmsLog; |
| 18 | +use App\Models\Template\BTemplate; | ||
| 19 | +use App\Models\Template\Template; | ||
| 18 | use App\Models\Template\TemplateModule; | 20 | use App\Models\Template\TemplateModule; |
| 19 | use App\Models\User\User as UserModel; | 21 | use App\Models\User\User as UserModel; |
| 20 | use App\Utils\EncryptUtils; | 22 | use App\Utils\EncryptUtils; |
| @@ -118,19 +120,30 @@ class LoginController extends BaseController | @@ -118,19 +120,30 @@ class LoginController extends BaseController | ||
| 118 | } | 120 | } |
| 119 | 121 | ||
| 120 | public function ceshi(){ | 122 | public function ceshi(){ |
| 121 | - $imageModel = new Image(); | ||
| 122 | - $list = $imageModel->list(['path'=>['like','%/p/1/image_other/2023-08/%']]); | 123 | + $templateModel = new Template(); |
| 124 | + $list = $templateModel->list(); | ||
| 123 | foreach ($list as $k => $v){ | 125 | foreach ($list as $k => $v){ |
| 124 | - $data = [ | ||
| 125 | - 'path'=>'/public/template/'.basename($v['path']), | ||
| 126 | - 'hash'=>$v['hash'], | ||
| 127 | - 'size'=>$v['size'], | ||
| 128 | - 'type'=>$v['type'], | ||
| 129 | - 'is_cos'=>1, | ||
| 130 | - 'created_at'=>date('Y-m-d H:i:s'), | ||
| 131 | - 'updated_at'=>date('Y-m-d H:i:s'), | ||
| 132 | - ]; | ||
| 133 | - DB::table('gl_images')->insert($data); | 126 | + $data['html'] = str_replace( |
| 127 | + 'https://develop.globalso.com/a/image/', | ||
| 128 | + 'https://ecdn6.globalso.com/public/template/', | ||
| 129 | + $v['html'] | ||
| 130 | + ); | ||
| 131 | + $data['head_html'] = str_replace( | ||
| 132 | + 'https://develop.globalso.com/a/image/', | ||
| 133 | + 'https://ecdn6.globalso.com/public/template/', | ||
| 134 | + $data['head_html'] | ||
| 135 | + ); | ||
| 136 | + $data['main_html'] = str_replace( | ||
| 137 | + 'https://develop.globalso.com/a/image/', | ||
| 138 | + 'https://ecdn6.globalso.com/public/template/', | ||
| 139 | + $v['main_html'] | ||
| 140 | + ); | ||
| 141 | + $data['footer_html'] = str_replace( | ||
| 142 | + 'https://develop.globalso.com/a/image/', | ||
| 143 | + 'https://ecdn6.globalso.com/public/template/', | ||
| 144 | + $v['footer_html'] | ||
| 145 | + ); | ||
| 146 | + $templateModel->edit($data,['id'=>$v['id']]); | ||
| 134 | } | 147 | } |
| 135 | return 1; | 148 | return 1; |
| 136 | } | 149 | } |
-
请 注册 或 登录 后发表评论