|
...
|
...
|
@@ -12,16 +12,10 @@ namespace App\Http\Controllers\Bside; |
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Helper\Translate;
|
|
|
|
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\Sms\SmsLog;
|
|
|
|
use App\Models\User\User as UserModel;
|
|
|
|
use App\Utils\EncryptUtils;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
use Mrgoon\AliSms\AliSms;
|
|
|
|
|
|
|
|
class LoginController extends BaseController
|
|
...
|
...
|
@@ -120,62 +114,4 @@ class LoginController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function ceshi(){
|
|
|
|
$templateModel = new TemplateModule();
|
|
|
|
$list = $templateModel->list();
|
|
|
|
foreach ($list as $k => $v){
|
|
|
|
$html = $this->re($v['html'],'https://develop.globalso.com/a/image/','https://ecdn6.globalso.com/public/template/');
|
|
|
|
$html = $this->re($html,'https://develop.globalso.com/b/image/','https://ecdn6.globalso.com/public/template/');
|
|
|
|
// preg_match_all('/\"https:\/\/develop.globalso.com\/b\/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']]);
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function re(&$html,$srcValue,$path){
|
|
|
|
$html = str_replace(
|
|
|
|
$srcValue,
|
|
|
|
$path,
|
|
|
|
$html
|
|
|
|
);
|
|
|
|
return $html;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function updateHtml(){
|
|
|
|
$html = $this->re($v['html'],'https://develop.globalso.com/a/image/','https://ecdn6.globalso.com/public/template/');
|
|
|
|
$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']]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|