作者 lyh

gx

... ... @@ -19,11 +19,6 @@ class Project extends Base
public static $projectLocationDangerous = 1; //危险项目
public static $storageTypeZero = 0; //默认腾讯压缩存储桶
public static $storageTypeOne = 1; //非压缩存储桶
public static $storageTypeZeroFileFix = "ecdn6.globalso.com"; //非压缩存储桶
public static $storageTypeOneFileFix = "ecdn6-nc.globalso.com"; //压缩存储桶
public static $projectLocationDangerousFileFix = "globalso-v6.s3.us-west-2.amazonaws.com"; //危险项目存储桶
//项目标识集合
public static $blockItems = "blockitems"; //html循环项父级标识
public static $blockAttrItems = "[blockitems]"; //html循环项父级属性标识
... ...
... ... @@ -872,19 +872,21 @@ class CreatePageService{
{
$projectLocation = $project->project_location;
$storageType = $project->storage_type;
$cos = config('filesystems.disks.cos');
if ($projectLocation == Project::$projectLocationZero){
//普通项目
if ($storageType == Project::$storageTypeZero){
//压缩项目
$html = str_replace(Project::$storageTypeOneFileFix,Project::$storageTypeZeroFileFix,$html);
$html = str_replace($cos['cdn1'],$cos['cdn'],$html);
}else{
//非压缩项目
$html = str_replace(Project::$storageTypeZeroFileFix,Project::$storageTypeOneFileFix,$html);
$html = str_replace($cos['cdn'],$cos['cdn1'],$html);
}
}else{
$s3 = config('filesystems.disks.s3');
//危险项目
$html = str_replace(Project::$storageTypeOneFileFix,Project::$projectLocationDangerousFileFix,$html);
$html = str_replace(Project::$storageTypeZeroFileFix,Project::$projectLocationDangerousFileFix,$html);
$html = str_replace($cos['cdn1'],$s3['cdn'],$html);
$html = str_replace($cos['cdn'],$s3['cdn'],$html);
}
return $html;
}
... ...