作者 lyh

gx

... ... @@ -528,7 +528,7 @@ if (!function_exists('str_replace_url')) {
if (isset($urlParts['host'])) {
$domain = $urlParts['host'];
// 使用 str_replace 函数删除域名信息
$urlWithoutDomain = str_replace($domain, '', $url);
$urlWithoutDomain = str_replace($domain.'upload', '', $url);
return $urlWithoutDomain;
} else {
return $url;
... ...
... ... @@ -257,13 +257,7 @@ class LoginController extends BaseController
public function ceshi(){
$data = [
'code'=>Code::USER_LOGIN_ERROE,
'message'=>'当前用户未绑定账户,请绑定后',
];
$webSocket = new Socket();
$webSocket->send('hello');
$response = $webSocket->receive();
$webSocket->close();
$url = "https://develop.globalso.com/upload/m/file/2023-08/64e86d1942c4c67754.psd";
return str_replace_url($url);
}
}
... ...
... ... @@ -69,7 +69,7 @@ class ATemplateModuleLogic extends BaseLogic
if(isset($param['images']) && !empty($param['images'])){
$arr_images = [];
foreach ($param['images'] as $v){
$arr_images[] = $v;
$arr_images[] = str_replace_url($v);
}
$param['images'] = implode(',',$arr_images);
}
... ...