作者 lyh

gx

@@ -19,11 +19,6 @@ class Project extends Base @@ -19,11 +19,6 @@ class Project extends Base
19 public static $projectLocationDangerous = 1; //危险项目 19 public static $projectLocationDangerous = 1; //危险项目
20 public static $storageTypeZero = 0; //默认腾讯压缩存储桶 20 public static $storageTypeZero = 0; //默认腾讯压缩存储桶
21 public static $storageTypeOne = 1; //非压缩存储桶 21 public static $storageTypeOne = 1; //非压缩存储桶
22 -  
23 - public static $storageTypeZeroFileFix = "ecdn6.globalso.com"; //非压缩存储桶  
24 - public static $storageTypeOneFileFix = "ecdn6-nc.globalso.com"; //压缩存储桶  
25 - public static $projectLocationDangerousFileFix = "globalso-v6.s3.us-west-2.amazonaws.com"; //危险项目存储桶  
26 -  
27 //项目标识集合 22 //项目标识集合
28 public static $blockItems = "blockitems"; //html循环项父级标识 23 public static $blockItems = "blockitems"; //html循环项父级标识
29 public static $blockAttrItems = "[blockitems]"; //html循环项父级属性标识 24 public static $blockAttrItems = "[blockitems]"; //html循环项父级属性标识
@@ -872,19 +872,21 @@ class CreatePageService{ @@ -872,19 +872,21 @@ class CreatePageService{
872 { 872 {
873 $projectLocation = $project->project_location; 873 $projectLocation = $project->project_location;
874 $storageType = $project->storage_type; 874 $storageType = $project->storage_type;
  875 + $cos = config('filesystems.disks.cos');
875 if ($projectLocation == Project::$projectLocationZero){ 876 if ($projectLocation == Project::$projectLocationZero){
876 //普通项目 877 //普通项目
877 if ($storageType == Project::$storageTypeZero){ 878 if ($storageType == Project::$storageTypeZero){
878 //压缩项目 879 //压缩项目
879 - $html = str_replace(Project::$storageTypeOneFileFix,Project::$storageTypeZeroFileFix,$html); 880 + $html = str_replace($cos['cdn1'],$cos['cdn'],$html);
880 }else{ 881 }else{
881 //非压缩项目 882 //非压缩项目
882 - $html = str_replace(Project::$storageTypeZeroFileFix,Project::$storageTypeOneFileFix,$html); 883 + $html = str_replace($cos['cdn'],$cos['cdn1'],$html);
883 } 884 }
884 }else{ 885 }else{
  886 + $s3 = config('filesystems.disks.s3');
885 //危险项目 887 //危险项目
886 - $html = str_replace(Project::$storageTypeOneFileFix,Project::$projectLocationDangerousFileFix,$html);  
887 - $html = str_replace(Project::$storageTypeZeroFileFix,Project::$projectLocationDangerousFileFix,$html); 888 + $html = str_replace($cos['cdn1'],$s3['cdn'],$html);
  889 + $html = str_replace($cos['cdn'],$s3['cdn'],$html);
888 } 890 }
889 return $html; 891 return $html;
890 } 892 }