作者 zhl

u

@@ -164,6 +164,7 @@ class SyncProject extends Command @@ -164,6 +164,7 @@ class SyncProject extends Command
164 'from_order_id' => $param['from_order_id'], 164 'from_order_id' => $param['from_order_id'],
165 'aicc' => $param['exclusive_aicc'], 165 'aicc' => $param['exclusive_aicc'],
166 'hagro' => $param['exclusive_hagro'], 166 'hagro' => $param['exclusive_hagro'],
  167 + 'notice_order_id' => $param['id'],
167 ], 168 ],
168 'deploy_build' => [ 169 'deploy_build' => [
169 'service_duration' => $param['years'], 170 'service_duration' => $param['years'],
@@ -18,9 +18,12 @@ use App\Helper\Socket; @@ -18,9 +18,12 @@ use App\Helper\Socket;
18 use App\Helper\Translate; 18 use App\Helper\Translate;
19 use App\Helper\Wechat; 19 use App\Helper\Wechat;
20 use App\Http\Logic\Bside\User\UserLoginLogic; 20 use App\Http\Logic\Bside\User\UserLoginLogic;
  21 +use App\Models\File\Image;
21 use App\Models\Project\Project; 22 use App\Models\Project\Project;
22 use App\Models\Service\Service; 23 use App\Models\Service\Service;
23 use App\Models\Sms\SmsLog; 24 use App\Models\Sms\SmsLog;
  25 +use App\Models\Template\Template;
  26 +use App\Models\Template\TemplateModule;
24 use App\Models\User\User as UserModel; 27 use App\Models\User\User as UserModel;
25 use App\Utils\EncryptUtils; 28 use App\Utils\EncryptUtils;
26 use \Illuminate\Support\Facades\Cache; 29 use \Illuminate\Support\Facades\Cache;
@@ -257,8 +260,34 @@ class LoginController extends BaseController @@ -257,8 +260,34 @@ class LoginController extends BaseController
257 260
258 261
259 public function ceshi(){ 262 public function ceshi(){
260 - $url = "https://develop.globalso.com/upload/m/file/2023-08/64e86d1942c4c67754.psd";  
261 - $urlParts = parse_url($url);  
262 - str_replace('/upload', '', $urlParts['path']); 263 + $templateModel = new TemplateModule();
  264 + $list = $templateModel->list();
  265 + foreach ($list as $k => $v){
  266 + // 使用正则表达式和 preg_match_all 函数来匹配多个 img 标签的 src 值
  267 + preg_match_all('/\"https:\/\/admin.item.globalso.site\/a\/image\/(.*?)\"/', $v['html'], $matches);
  268 + if (!empty($matches[1])) {
  269 + $srcValues = $matches[1];
  270 + $imageModel = new Image();
  271 + $html = $v['html'];
  272 + foreach ($srcValues as $srcValue) {
  273 + $image_info = $imageModel->read(['hash'=>$srcValue]);
  274 + if($image_info !== false){
  275 + $path = basename($image_info['path']);
  276 + $html = $this->re($html,'/a/image/'.$srcValue,$path);
  277 + }
  278 + }
  279 + $templateModel->edit(['html'=>$html],['id'=>$v['id']]);
  280 + }
  281 + }
  282 + return 1;
  283 + }
  284 +
  285 + public function re(&$html,$srcValue,$path){
  286 + $html = str_replace(
  287 + $srcValue,
  288 + $path,
  289 + $html
  290 + );
  291 + return $html;
263 } 292 }
264 } 293 }
@@ -77,7 +77,7 @@ class WebSettingLogic extends BaseLogic @@ -77,7 +77,7 @@ class WebSettingLogic extends BaseLogic
77 'route' => 'all' 77 'route' => 'all'
78 ]; 78 ];
79 $string = http_build_query($param); 79 $string = http_build_query($param);
80 - $urlStr = 'https://'.$this->user['domain'].'/api/updateHtmlNotify?' . $string; 80 + $urlStr = 'https://'.$this->user['domain'].'/api/updateHtmlNotify/?' . $string;
81 http_get($urlStr); 81 http_get($urlStr);
82 return $this->success(); 82 return $this->success();
83 } 83 }