Merge remote-tracking branch 'origin/master' into akun
正在显示
16 个修改的文件
包含
76 行增加
和
31 行删除
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | use App\Models\File\Image; | 3 | use App\Models\File\Image; |
| 4 | +use App\Models\File\File; | ||
| 4 | use App\Models\RouteMap\RouteMap; | 5 | use App\Models\RouteMap\RouteMap; |
| 5 | use App\Services\CosService; | 6 | use App\Services\CosService; |
| 6 | use App\Utils\EncryptUtils; | 7 | use App\Utils\EncryptUtils; |
| @@ -456,11 +457,11 @@ if (!function_exists('getImageUrl')) { | @@ -456,11 +457,11 @@ if (!function_exists('getImageUrl')) { | ||
| 456 | * @method :post | 457 | * @method :post |
| 457 | * @time :2023/7/20 16:46 | 458 | * @time :2023/7/20 16:46 |
| 458 | */ | 459 | */ |
| 459 | - function getImageUrl($path,$location = 0,$storage_type = 0){ | 460 | + function getImageUrl($path,$storage_type = 0){ |
| 460 | if(is_array($path)){ | 461 | if(is_array($path)){ |
| 461 | $url =[]; | 462 | $url =[]; |
| 462 | foreach ($path as $v){ | 463 | foreach ($path as $v){ |
| 463 | - $url[] = getImageUrl($v,$location,$storage_type); | 464 | + $url[] = getImageUrl($v,$storage_type); |
| 464 | } | 465 | } |
| 465 | }else{ | 466 | }else{ |
| 466 | if(empty($path)){ | 467 | if(empty($path)){ |
| @@ -472,7 +473,12 @@ if (!function_exists('getImageUrl')) { | @@ -472,7 +473,12 @@ if (!function_exists('getImageUrl')) { | ||
| 472 | if(substr($path,0,2) == '//'){ | 473 | if(substr($path,0,2) == '//'){ |
| 473 | return 'https:'.$path; | 474 | return 'https:'.$path; |
| 474 | } | 475 | } |
| 475 | - if($location == 0){ | 476 | + $imageModel = new Image(); |
| 477 | + $imageInfo = $imageModel->read(['path'=>$path],'is_cos'); | ||
| 478 | + if($imageInfo === false){ | ||
| 479 | + return ''; | ||
| 480 | + } | ||
| 481 | + if($imageInfo['is_cos'] == 1){ | ||
| 476 | $cos = config('filesystems.disks.cos'); | 482 | $cos = config('filesystems.disks.cos'); |
| 477 | $cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1']; | 483 | $cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1']; |
| 478 | $url = $cosCdn.$path; | 484 | $url = $cosCdn.$path; |
| @@ -494,11 +500,11 @@ if (!function_exists('getFileUrl')) { | @@ -494,11 +500,11 @@ if (!function_exists('getFileUrl')) { | ||
| 494 | * @method :post | 500 | * @method :post |
| 495 | * @time :2023/7/20 16:46 | 501 | * @time :2023/7/20 16:46 |
| 496 | */ | 502 | */ |
| 497 | - function getFileUrl($path,$location = 0,$storage_type = 0){ | 503 | + function getFileUrl($path,$storage_type = 0){ |
| 498 | if(is_array($path)){ | 504 | if(is_array($path)){ |
| 499 | $url =[]; | 505 | $url =[]; |
| 500 | foreach ($path as $v){ | 506 | foreach ($path as $v){ |
| 501 | - $url[] = getFileUrl($v,$location,$storage_type); | 507 | + $url[] = getFileUrl($v,$storage_type); |
| 502 | } | 508 | } |
| 503 | }else{ | 509 | }else{ |
| 504 | if(empty($path)){ | 510 | if(empty($path)){ |
| @@ -510,7 +516,12 @@ if (!function_exists('getFileUrl')) { | @@ -510,7 +516,12 @@ if (!function_exists('getFileUrl')) { | ||
| 510 | if(substr($path,0,2) == '//'){ | 516 | if(substr($path,0,2) == '//'){ |
| 511 | return 'https:'.$path; | 517 | return 'https:'.$path; |
| 512 | } | 518 | } |
| 513 | - if($location == 0){ | 519 | + $fileModel = new File(); |
| 520 | + $fileInfo = $fileModel->read(['path'=>$path],'is_cos'); | ||
| 521 | + if($fileInfo === false){ | ||
| 522 | + return ''; | ||
| 523 | + } | ||
| 524 | + if($fileInfo['is_cos'] == 1){ | ||
| 514 | $cos = config('filesystems.disks.cos'); | 525 | $cos = config('filesystems.disks.cos'); |
| 515 | $cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1']; | 526 | $cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1']; |
| 516 | $url = $cosCdn.$path; | 527 | $url = $cosCdn.$path; |
| @@ -568,7 +579,8 @@ if (!function_exists('str_replace_url')) { | @@ -568,7 +579,8 @@ if (!function_exists('str_replace_url')) { | ||
| 568 | $cos = config('filesystems.disks.cos'); | 579 | $cos = config('filesystems.disks.cos'); |
| 569 | $cosCdn = $cos['cdn']; | 580 | $cosCdn = $cos['cdn']; |
| 570 | $cosCdn1 = $cos['cdn1']; | 581 | $cosCdn1 = $cos['cdn1']; |
| 571 | - if($url && ((strpos($url,$cosCdn) !== false) || (strpos($url,$cosCdn1) !== false))){ | 582 | + $cosCdn2 = config('filesystems.disks.s3')['cdn']; |
| 583 | + if($url && ((strpos($url,$cosCdn) !== false) || (strpos($url,$cosCdn1) !== false) || (strpos($url,$cosCdn2) !== false))){ | ||
| 572 | // 外部URL无需解析 | 584 | // 外部URL无需解析 |
| 573 | // 使用 parse_url 函数来解析 URL | 585 | // 使用 parse_url 函数来解析 URL |
| 574 | $urlParts = parse_url($url); | 586 | $urlParts = parse_url($url); |
| @@ -58,6 +58,38 @@ class OptimizeController extends BaseController | @@ -58,6 +58,38 @@ class OptimizeController extends BaseController | ||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | /** | 60 | /** |
| 61 | + * @remark :导出数据 | ||
| 62 | + * @name :importOptimize | ||
| 63 | + * @author :lyh | ||
| 64 | + * @method :post | ||
| 65 | + * @time :2024/1/25 14:36 | ||
| 66 | + */ | ||
| 67 | + public function importOptimize(Project $project){ | ||
| 68 | + $query = $project->select(['gl_project.title AS title', | ||
| 69 | + 'gl_project_deploy_optimize.domain AS domain', | ||
| 70 | + 'gl_project.is_translate AS is_translate', | ||
| 71 | + 'gl_project.is_translate_tag AS is_translate_tag', | ||
| 72 | + 'gl_project_deploy_optimize.optimist_mid AS optimize_optimist_mid']) | ||
| 73 | + ->leftJoin('gl_project_deploy_optimize', 'gl_project.id', '=', 'gl_project_deploy_optimize.project_id') | ||
| 74 | + ->leftJoin('gl_project_online_check', 'gl_project.id', '=', 'gl_project_online_check.project_id'); | ||
| 75 | + $query = $query->whereIn('gl_project.type',[2,4]);//TODO::2,4代表优化项目 | ||
| 76 | + $query->where(function ($subQuery) { | ||
| 77 | + $subQuery->orwhere('gl_project_online_check.qa_status',1)->orwhere('gl_project.is_upgrade',1); | ||
| 78 | + }); | ||
| 79 | + $lists = $query->orderBy('gl_project_deploy_optimize.start_date','desc')->get()->toArray(); | ||
| 80 | + if(!empty($lists)){ | ||
| 81 | + $manageModel = new ManageHr(); | ||
| 82 | + $domainModel = new DomainInfo(); | ||
| 83 | + foreach ($lists as $k => $v){ | ||
| 84 | + $v['optimize_optimist'] = $manageModel->getName($v['optimize_optimist_mid']); | ||
| 85 | + $v['domain'] = !empty($v['domain']) ? $domainModel->getDomain($v['domain']) : ''; | ||
| 86 | + $lists[$k] = $v; | ||
| 87 | + } | ||
| 88 | + } | ||
| 89 | + $this->response('success',Code::SUCCESS,$lists); | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + /** | ||
| 61 | * @remark :统计数量 | 93 | * @remark :统计数量 |
| 62 | * @name :getGNum | 94 | * @name :getGNum |
| 63 | * @author :lyh | 95 | * @author :lyh |
| @@ -38,7 +38,7 @@ class BlogController extends BaseController | @@ -38,7 +38,7 @@ class BlogController extends BaseController | ||
| 38 | foreach ($lists['list'] as $k => $v){ | 38 | foreach ($lists['list'] as $k => $v){ |
| 39 | $v['category_name'] = $this->categoryName($v['category_id'],$data); | 39 | $v['category_name'] = $this->categoryName($v['category_id'],$data); |
| 40 | $v['url'] = $this->user['domain'] . getRouteMap(RouteMap::SOURCE_BLOG,$v['id']); | 40 | $v['url'] = $this->user['domain'] . getRouteMap(RouteMap::SOURCE_BLOG,$v['id']); |
| 41 | - $v['image_link'] = getImageUrl($v['image'],$this->user['project_location'],$this->user['storage_type']); | 41 | + $v['image_link'] = getImageUrl($v['image'],$this->user['storage_type']); |
| 42 | $v['operator_name'] = $user->getName($v['operator_id']); | 42 | $v['operator_name'] = $user->getName($v['operator_id']); |
| 43 | $v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_BLOG,BTemplate::IS_DETAIL,$template_id,$v['id']); | 43 | $v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_BLOG,BTemplate::IS_DETAIL,$template_id,$v['id']); |
| 44 | $lists['list'][$k] = $v; | 44 | $lists['list'][$k] = $v; |
| @@ -37,7 +37,7 @@ class CustomModuleContentController extends BaseController | @@ -37,7 +37,7 @@ class CustomModuleContentController extends BaseController | ||
| 37 | $data = $this->getAllCategoryName(); | 37 | $data = $this->getAllCategoryName(); |
| 38 | foreach ($lists['list'] as $k=>$v){ | 38 | foreach ($lists['list'] as $k=>$v){ |
| 39 | $v['category_name'] = $this->categoryName($v['category_id'],$data); | 39 | $v['category_name'] = $this->categoryName($v['category_id'],$data); |
| 40 | - $v['image_link'] = getImageUrl($v['image'],$this->user['project_location'],$this->user['storage_type']); | 40 | + $v['image_link'] = getImageUrl($v['image'],$this->user['storage_type']); |
| 41 | $v['operator_name'] = (new User())->getName($v['operator_id']); | 41 | $v['operator_name'] = (new User())->getName($v['operator_id']); |
| 42 | $lists['list'][$k] = $v; | 42 | $lists['list'][$k] = $v; |
| 43 | } | 43 | } |
| @@ -41,7 +41,7 @@ class NewsController extends BaseController | @@ -41,7 +41,7 @@ class NewsController extends BaseController | ||
| 41 | foreach ($lists['list'] as $k => $v){ | 41 | foreach ($lists['list'] as $k => $v){ |
| 42 | $v['category_name'] = $this->categoryName($v['category_id'],$data); | 42 | $v['category_name'] = $this->categoryName($v['category_id'],$data); |
| 43 | $v['url'] = $this->user['domain'].getRouteMap(RouteMap::SOURCE_NEWS,$v['id']); | 43 | $v['url'] = $this->user['domain'].getRouteMap(RouteMap::SOURCE_NEWS,$v['id']); |
| 44 | - $v['image_link'] = getImageUrl($v['image'],$this->user['project_location'],$this->user['storage_type']); | 44 | + $v['image_link'] = getImageUrl($v['image'],$this->user['storage_type']); |
| 45 | $v['operator_name'] = $user->getName($v['operator_id']); | 45 | $v['operator_name'] = $user->getName($v['operator_id']); |
| 46 | $v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_NEWS,BTemplate::IS_DETAIL,$template_id,$v['id']); | 46 | $v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_NEWS,BTemplate::IS_DETAIL,$template_id,$v['id']); |
| 47 | $lists['list'][$k] = $v; | 47 | $lists['list'][$k] = $v; |
| @@ -41,7 +41,7 @@ class CategoryController extends BaseController | @@ -41,7 +41,7 @@ class CategoryController extends BaseController | ||
| 41 | foreach ($list as $k =>$v){ | 41 | foreach ($list as $k =>$v){ |
| 42 | $v['url'] = $this->user['domain'] . $v['route'].'/'; | 42 | $v['url'] = $this->user['domain'] . $v['route'].'/'; |
| 43 | $v['product_num'] = Category::getProductNum($v['id']); | 43 | $v['product_num'] = Category::getProductNum($v['id']); |
| 44 | - $v['image_link'] = getImageUrl($v['image'],$this->user['project_location'],$this->user['storage_type']); | 44 | + $v['image_link'] = getImageUrl($v['image'],$this->user['storage_type']); |
| 45 | $v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_PRODUCT,BTemplate::IS_LIST,$template_id,$v['id']); | 45 | $v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_PRODUCT,BTemplate::IS_LIST,$template_id,$v['id']); |
| 46 | $list[$k] = $v; | 46 | $list[$k] = $v; |
| 47 | } | 47 | } |
| @@ -78,25 +78,25 @@ class ProductController extends BaseController | @@ -78,25 +78,25 @@ class ProductController extends BaseController | ||
| 78 | public function getHandleFileImage($v){ | 78 | public function getHandleFileImage($v){ |
| 79 | //ToDo::处理图片及文件 | 79 | //ToDo::处理图片及文件 |
| 80 | if(!empty($v['thumb']) && !empty($v['thumb']['url'])){ | 80 | if(!empty($v['thumb']) && !empty($v['thumb']['url'])){ |
| 81 | - $v['thumb']['url'] = getImageUrl($v['thumb']['url'],$this->user['project_location'] ?? 0,$this->user['storage_type'] ?? 0); | 81 | + $v['thumb']['url'] = getImageUrl($v['thumb']['url'],$this->user['storage_type'] ?? 0); |
| 82 | } | 82 | } |
| 83 | if(!empty($v['gallery'])){ | 83 | if(!empty($v['gallery'])){ |
| 84 | foreach ($v['gallery'] as $gallery_k => $gallery_v){ | 84 | foreach ($v['gallery'] as $gallery_k => $gallery_v){ |
| 85 | - $gallery_v['url'] = getImageUrl($gallery_v['url'],$this->user['project_location'] ?? 0,$this->user['storage_type'] ?? 0); | 85 | + $gallery_v['url'] = getImageUrl($gallery_v['url'],$this->user['storage_type'] ?? 0); |
| 86 | $v['gallery'][$gallery_k] = $gallery_v; | 86 | $v['gallery'][$gallery_k] = $gallery_v; |
| 87 | } | 87 | } |
| 88 | } | 88 | } |
| 89 | if(!empty($v['icon'])){ | 89 | if(!empty($v['icon'])){ |
| 90 | foreach ($v['icon'] as $icon_k => $icon_v){ | 90 | foreach ($v['icon'] as $icon_k => $icon_v){ |
| 91 | - $icon_v = getImageUrl($icon_v,$this->user['project_location'] ?? 0,$this->user['storage_type'] ?? 0); | 91 | + $icon_v = getImageUrl($icon_v,$this->user['storage_type'] ?? 0); |
| 92 | $v['icon'][$icon_k] = $icon_v; | 92 | $v['icon'][$icon_k] = $icon_v; |
| 93 | } | 93 | } |
| 94 | } | 94 | } |
| 95 | if(!empty($v['video']) && !empty($v['video']['url'])){ | 95 | if(!empty($v['video']) && !empty($v['video']['url'])){ |
| 96 | - $v['video']['url'] = getImageUrl($v['video']['url'],$this->user['project_location'] ?? 0,$this->user['storage_type'] ?? 0); | 96 | + $v['video']['url'] = getImageUrl($v['video']['url'],$this->user['storage_type'] ?? 0); |
| 97 | } | 97 | } |
| 98 | if(!empty($v['files']) && !empty($v['files']['url'])){ | 98 | if(!empty($v['files']) && !empty($v['files']['url'])){ |
| 99 | - $v['files']['url'] = getImageUrl($v['files']['url'],$this->user['project_location'] ?? 0,$this->user['storage_type'] ?? 0); | 99 | + $v['files']['url'] = getImageUrl($v['files']['url'],$this->user['storage_type'] ?? 0); |
| 100 | } | 100 | } |
| 101 | return $this->success($v); | 101 | return $this->success($v); |
| 102 | } | 102 | } |
| @@ -330,7 +330,7 @@ class ProductController extends BaseController | @@ -330,7 +330,7 @@ class ProductController extends BaseController | ||
| 330 | $arr = json_decode($info['values']); | 330 | $arr = json_decode($info['values']); |
| 331 | foreach ($arr as $k1=>$v1){ | 331 | foreach ($arr as $k1=>$v1){ |
| 332 | $v1 = (array)$v1; | 332 | $v1 = (array)$v1; |
| 333 | - $v1['url'] = getImageUrl($v1['url'],$this->user['project_location'],$this->user['storage_type']); | 333 | + $v1['url'] = getImageUrl($v1['url'],$this->user['storage_type']); |
| 334 | $arr[$k1] = $v1; | 334 | $arr[$k1] = $v1; |
| 335 | } | 335 | } |
| 336 | $v['values'] = $arr; | 336 | $v['values'] = $arr; |
| @@ -339,9 +339,9 @@ class ProductController extends BaseController | @@ -339,9 +339,9 @@ class ProductController extends BaseController | ||
| 339 | foreach ($arr1 as $k1=>$v1){ | 339 | foreach ($arr1 as $k1=>$v1){ |
| 340 | $v1 = (array)$v1; | 340 | $v1 = (array)$v1; |
| 341 | if(isset($v1['url'])){ | 341 | if(isset($v1['url'])){ |
| 342 | - $v1['url'] = getFileUrl($v1['url'],$this->user['project_location'],$this->user['storage_type']); | 342 | + $v1['url'] = getFileUrl($v1['url'],$this->user['storage_type']); |
| 343 | }else{ | 343 | }else{ |
| 344 | - $v1 = getFileUrl($v1,$this->user['project_location'],$this->user['storage_type']); | 344 | + $v1 = getFileUrl($v1,$this->user['storage_type']); |
| 345 | } | 345 | } |
| 346 | $arr1[$k1] = $v1; | 346 | $arr1[$k1] = $v1; |
| 347 | } | 347 | } |
| @@ -25,7 +25,7 @@ class WebSettingImageController extends BaseController | @@ -25,7 +25,7 @@ class WebSettingImageController extends BaseController | ||
| 25 | public function lists(WebSettingImage $webSettingImage){ | 25 | public function lists(WebSettingImage $webSettingImage){ |
| 26 | $list = $webSettingImage->list([],'id',['id','image','type']); | 26 | $list = $webSettingImage->list([],'id',['id','image','type']); |
| 27 | foreach ($list as $k=>$v){ | 27 | foreach ($list as $k=>$v){ |
| 28 | - $v['image'] = getImageUrl($v['image'],$this->user['project_location'],$this->user['storage_type']); | 28 | + $v['image'] = getImageUrl($v['image'],$this->user['storage_type']); |
| 29 | $list[$k] = $v; | 29 | $list[$k] = $v; |
| 30 | } | 30 | } |
| 31 | $this->response('success',Code::SUCCESS,$list); | 31 | $this->response('success',Code::SUCCESS,$list); |
| @@ -22,7 +22,7 @@ class BTemplateController extends BaseController | @@ -22,7 +22,7 @@ class BTemplateController extends BaseController | ||
| 22 | $lists = $BTemplateLogic->publicTemplateLists($this->map,$this->page,$this->row,$this->order); | 22 | $lists = $BTemplateLogic->publicTemplateLists($this->map,$this->page,$this->row,$this->order); |
| 23 | if(!empty($lists) && !empty($lists['list'])){ | 23 | if(!empty($lists) && !empty($lists['list'])){ |
| 24 | foreach ($lists['list'] as $k => &$v){ | 24 | foreach ($lists['list'] as $k => &$v){ |
| 25 | - $v['image_link'] = getImageUrl($v['image'],$this->user['project_location'],$this->user['storage_type']); | 25 | + $v['image_link'] = getImageUrl($v['image'],$this->user['storage_type']); |
| 26 | $lists['list'][$k] = $v; | 26 | $lists['list'][$k] = $v; |
| 27 | } | 27 | } |
| 28 | } | 28 | } |
| @@ -336,7 +336,7 @@ class FileController | @@ -336,7 +336,7 @@ class FileController | ||
| 336 | $fileModel = new File(); | 336 | $fileModel = new File(); |
| 337 | $lists = $fileModel->list($this->map,'id',['id','hash','type','path','created_at','name']); | 337 | $lists = $fileModel->list($this->map,'id',['id','hash','type','path','created_at','name']); |
| 338 | foreach ($lists as $k => $v){ | 338 | foreach ($lists as $k => $v){ |
| 339 | - $v['file_link'] = getFileUrl($v['path'],$this->cache['project_location'] ?? 0,$this->cache['storage_type'] ?? 0); | 339 | + $v['file_link'] = getFileUrl($v['path'],$this->cache['storage_type'] ?? 0); |
| 340 | $lists[$k] = $v; | 340 | $lists[$k] = $v; |
| 341 | } | 341 | } |
| 342 | $this->response('success',Code::SUCCESS,$lists); | 342 | $this->response('success',Code::SUCCESS,$lists); |
| @@ -352,7 +352,7 @@ class FileController | @@ -352,7 +352,7 @@ class FileController | ||
| 352 | public function responseData($path, $name){ | 352 | public function responseData($path, $name){ |
| 353 | $data = [ | 353 | $data = [ |
| 354 | 'file'=>$path, | 354 | 'file'=>$path, |
| 355 | - 'file_link'=>getFileUrl($path,$this->cache['project_location'] ?? 0,$this->cache['storage_type'] ?? 0), | 355 | + 'file_link'=>getFileUrl($path,$this->cache['storage_type'] ?? 0), |
| 356 | 'name'=>$name, | 356 | 'name'=>$name, |
| 357 | 'file_download'=>url('a/download_files?path='.$path) | 357 | 'file_download'=>url('a/download_files?path='.$path) |
| 358 | ]; | 358 | ]; |
| @@ -363,7 +363,7 @@ class ImageController extends Controller | @@ -363,7 +363,7 @@ class ImageController extends Controller | ||
| 363 | $lists = $imageModel->lists($this->map,$this->page,$this->row); | 363 | $lists = $imageModel->lists($this->map,$this->page,$this->row); |
| 364 | if(!empty($lists) && !empty($lists['list'])){ | 364 | if(!empty($lists) && !empty($lists['list'])){ |
| 365 | foreach ($lists['list'] as $k => $v){ | 365 | foreach ($lists['list'] as $k => $v){ |
| 366 | - $v['image_link'] = getImageUrl($v['path'],$this->cache['project_location'] ?? 0,$this->cache['storage_type'] ?? 0); | 366 | + $v['image_link'] = getImageUrl($v['path'],$this->cache['storage_type'] ?? 0); |
| 367 | $lists['list'][$k] = $v; | 367 | $lists['list'][$k] = $v; |
| 368 | } | 368 | } |
| 369 | } | 369 | } |
| @@ -429,7 +429,7 @@ class ImageController extends Controller | @@ -429,7 +429,7 @@ class ImageController extends Controller | ||
| 429 | public function responseData($path = '', $name = ''){ | 429 | public function responseData($path = '', $name = ''){ |
| 430 | $data = [ | 430 | $data = [ |
| 431 | 'image'=>$path, | 431 | 'image'=>$path, |
| 432 | - 'image_link'=>getImageUrl($path,$this->cache['project_location'] ?? 0,$this->cache['storage_type'] ?? 0), | 432 | + 'image_link'=>getImageUrl($path,$this->cache['storage_type'] ?? 0), |
| 433 | 'name'=>$name, | 433 | 'name'=>$name, |
| 434 | 'image_download'=>url('a/download_images?path='.$path) | 434 | 'image_download'=>url('a/download_images?path='.$path) |
| 435 | ]; | 435 | ]; |
| @@ -101,7 +101,7 @@ class BlogLogic extends BaseLogic | @@ -101,7 +101,7 @@ class BlogLogic extends BaseLogic | ||
| 101 | //获取标签名称 | 101 | //获取标签名称 |
| 102 | $blogLabelLogic = new BlogLabelLogic(); | 102 | $blogLabelLogic = new BlogLabelLogic(); |
| 103 | $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']); | 103 | $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']); |
| 104 | - $info['image_link'] = getImageUrl($info['image'],$this->user['project_location'],$this->user['storage_type']); | 104 | + $info['image_link'] = getImageUrl($info['image'],$this->user['storage_type']); |
| 105 | return $this->success($info); | 105 | return $this->success($info); |
| 106 | } | 106 | } |
| 107 | 107 |
| @@ -39,7 +39,7 @@ class CustomModuleContentLogic extends BaseLogic | @@ -39,7 +39,7 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 39 | if($info === false){ | 39 | if($info === false){ |
| 40 | $this->fail('当前数据不存在或已被删除'); | 40 | $this->fail('当前数据不存在或已被删除'); |
| 41 | } | 41 | } |
| 42 | - $info['image'] = getImageUrl($info['image'],$this->user['project_location'],$this->user['storage_type']); | 42 | + $info['image'] = getImageUrl($info['image'],$this->user['storage_type']); |
| 43 | $info['extend'] = $this->getExtendInfo($info['module_id'],$info['id']); | 43 | $info['extend'] = $this->getExtendInfo($info['module_id'],$info['id']); |
| 44 | return $this->success($info); | 44 | return $this->success($info); |
| 45 | } | 45 | } |
| @@ -86,14 +86,14 @@ class CustomModuleContentLogic extends BaseLogic | @@ -86,14 +86,14 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 86 | $arr = json_decode($info['values']); | 86 | $arr = json_decode($info['values']); |
| 87 | foreach ($arr as $k1=>$v1){ | 87 | foreach ($arr as $k1=>$v1){ |
| 88 | $v1 = (array)$v1; | 88 | $v1 = (array)$v1; |
| 89 | - $v1['url'] = getImageUrl($v1['url'],$this->user['project_location'],$this->user['storage_type']); | 89 | + $v1['url'] = getImageUrl($v1['url'],$this->user['storage_type']); |
| 90 | $arr[$k1] = $v1; | 90 | $arr[$k1] = $v1; |
| 91 | } | 91 | } |
| 92 | $v['values'] = $arr; | 92 | $v['values'] = $arr; |
| 93 | }elseif($v['type'] == 4){ | 93 | }elseif($v['type'] == 4){ |
| 94 | $arr1 = json_decode($info['values']); | 94 | $arr1 = json_decode($info['values']); |
| 95 | foreach ($arr1 as $k1=>$v1){ | 95 | foreach ($arr1 as $k1=>$v1){ |
| 96 | - $v1 = getFileUrl($v1,$this->user['project_location'],$this->user['storage_type']); | 96 | + $v1 = getFileUrl($v1,$this->user['storage_type']); |
| 97 | $arr1[$k1] = $v1; | 97 | $arr1[$k1] = $v1; |
| 98 | } | 98 | } |
| 99 | $v['values'] = $arr1; | 99 | $v['values'] = $arr1; |
| @@ -147,7 +147,7 @@ class NewsLogic extends BaseLogic | @@ -147,7 +147,7 @@ class NewsLogic extends BaseLogic | ||
| 147 | $this->fail('error'); | 147 | $this->fail('error'); |
| 148 | } | 148 | } |
| 149 | $info['category_id'] = explode(',',trim($info['category_id'],',')); | 149 | $info['category_id'] = explode(',',trim($info['category_id'],',')); |
| 150 | - $info['image_link'] = getImageUrl($info['image'],$this->user['project_location'],$this->user['storage_type']); | 150 | + $info['image_link'] = getImageUrl($info['image'],$this->user['storage_type']); |
| 151 | return $this->success($info); | 151 | return $this->success($info); |
| 152 | } | 152 | } |
| 153 | 153 |
| @@ -32,7 +32,7 @@ class CategoryLogic extends BaseLogic | @@ -32,7 +32,7 @@ class CategoryLogic extends BaseLogic | ||
| 32 | foreach ($data as &$v){ | 32 | foreach ($data as &$v){ |
| 33 | $v['url'] = $this->user['domain'] . $v['route'] ; | 33 | $v['url'] = $this->user['domain'] . $v['route'] ; |
| 34 | $v['product_num'] = Category::getProductNum($v['id']); | 34 | $v['product_num'] = Category::getProductNum($v['id']); |
| 35 | - $v['image_link'] = getImageUrl($v['image'],$this->user['project_location'],$this->user['storage_type']); | 35 | + $v['image_link'] = getImageUrl($v['image'],$this->user['storage_type']); |
| 36 | } | 36 | } |
| 37 | if(!$map){ | 37 | if(!$map){ |
| 38 | $data = Arr::listToTree($data); | 38 | $data = Arr::listToTree($data); |
| @@ -262,6 +262,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -262,6 +262,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 262 | Route::prefix('optimize')->group(function () { | 262 | Route::prefix('optimize')->group(function () { |
| 263 | // Route::any('/empowerDomain', [Aside\Optimize\OptimizeController::class, 'empowerDomain'])->name('admin.optimize_empowerDomain'); | 263 | // Route::any('/empowerDomain', [Aside\Optimize\OptimizeController::class, 'empowerDomain'])->name('admin.optimize_empowerDomain'); |
| 264 | Route::any('/', [Aside\Optimize\OptimizeController::class, 'lists'])->name('admin.optimize_lists');//优化中台 | 264 | Route::any('/', [Aside\Optimize\OptimizeController::class, 'lists'])->name('admin.optimize_lists');//优化中台 |
| 265 | + Route::any('/importOptimize', [Aside\Optimize\OptimizeController::class, 'importOptimize'])->name('admin.optimize_importOptimize');//导出数据 | ||
| 265 | Route::any('/getAiPrefix', [Aside\Optimize\OptimizeController::class, 'getAiPrefix'])->name('admin.optimize_getAiPrefix');//获取Ai前后缀 | 266 | Route::any('/getAiPrefix', [Aside\Optimize\OptimizeController::class, 'getAiPrefix'])->name('admin.optimize_getAiPrefix');//获取Ai前后缀 |
| 266 | Route::any('/saveAiPrefix', [Aside\Optimize\OptimizeController::class, 'saveAiPrefix'])->name('admin.optimize_saveAiPrefix');//保存Ai前后缀 | 267 | Route::any('/saveAiPrefix', [Aside\Optimize\OptimizeController::class, 'saveAiPrefix'])->name('admin.optimize_saveAiPrefix');//保存Ai前后缀 |
| 267 | Route::any('/setRobots', [Aside\Optimize\OptimizeController::class, 'setRobots'])->name('admin.optimize_setRobots');//设置robots开关 | 268 | Route::any('/setRobots', [Aside\Optimize\OptimizeController::class, 'setRobots'])->name('admin.optimize_setRobots');//设置robots开关 |
-
请 注册 或 登录 后发表评论