作者 lyh

geo脚本设置

@@ -43,6 +43,8 @@ class SyncMobile extends Command @@ -43,6 +43,8 @@ class SyncMobile extends Command
43 $data = $client->request('GET', $url, [ 43 $data = $client->request('GET', $url, [
44 'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号 44 'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
45 ])->getBody()->getContents(); 45 ])->getBody()->getContents();
  46 + dd($data);
  47 + if(!empty($data)){
46 $data = json_decode($data, true); 48 $data = json_decode($data, true);
47 DB::table('gl_mobile')->delete(); 49 DB::table('gl_mobile')->delete();
48 $create_time = date('Y-m-d H:i:s'); 50 $create_time = date('Y-m-d H:i:s');
@@ -53,7 +55,6 @@ class SyncMobile extends Command @@ -53,7 +55,6 @@ class SyncMobile extends Command
53 ]; 55 ];
54 DB::table('gl_mobile')->insert($param); 56 DB::table('gl_mobile')->insert($param);
55 } 57 }
56 - if(!empty($data)){  
57 $userModel = new User(); 58 $userModel = new User();
58 try { 59 try {
59 $data[] = '13083988828'; 60 $data[] = '13083988828';
@@ -665,7 +665,7 @@ if (!function_exists('getImageUrl')) { @@ -665,7 +665,7 @@ if (!function_exists('getImageUrl')) {
665 * @method :post 665 * @method :post
666 * @time :2023/7/20 16:46 666 * @time :2023/7/20 16:46
667 */ 667 */
668 - function getImageUrl($path,$storage_type = 0,$location = 0){ 668 + function getImageUrl($path,$storage_type = 0,$location = 0,$image_cdn = 1){
669 if(is_array($path)){ 669 if(is_array($path)){
670 $url =[]; 670 $url =[];
671 foreach ($path as $v){ 671 foreach ($path as $v){
@@ -683,8 +683,11 @@ if (!function_exists('getImageUrl')) { @@ -683,8 +683,11 @@ if (!function_exists('getImageUrl')) {
683 } 683 }
684 if($location == 0){ 684 if($location == 0){
685 $cos = config('filesystems.disks.cos'); 685 $cos = config('filesystems.disks.cos');
  686 + if($image_cdn == 0){//v6链接
  687 + $cosCdn = $cos['cdn2'];
  688 + }else{
686 $cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1']; 689 $cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1'];
687 -// $cosCdn = 'https://file.globalso.com';//TODO::暂时使用 690 + }
688 $url = $cosCdn.$path; 691 $url = $cosCdn.$path;
689 }else{ 692 }else{
690 $s3 = config('filesystems.disks.s3'); 693 $s3 = config('filesystems.disks.s3');