|
@@ -543,24 +543,25 @@ function info_domain_image($data,$field){
|
|
|
}
|
|
|
foreach($data as $key => $val){
|
|
|
if(in_array($key,$field)){
|
|
|
- $data[$key] = one_domain_image($val);
|
|
|
+ $more = strpos($key,'images');
|
|
|
+ $data[$key] = one_domain_image($val,$more);
|
|
|
}
|
|
|
}
|
|
|
return $data;
|
|
|
}
|
|
|
//支持单个字段,需要增加domain_cdnurl
|
|
|
//支持image,images
|
|
|
-function one_domain_image($one){
|
|
|
+function one_domain_image($one,$more = false){
|
|
|
if(!$one){
|
|
|
return $one;
|
|
|
}
|
|
|
- if(strpos($one,',')){
|
|
|
+ if(strpos($one,',') || $more !== false){
|
|
|
//逗号隔开的多个图片
|
|
|
$one = explode(',',$one);
|
|
|
foreach($one as $k => $v){
|
|
|
$one[$k] = localpath_to_netpath($v);
|
|
|
}
|
|
|
- $one = implode(',',$one);
|
|
|
+// $one = implode(',',$one);
|
|
|
}else{
|
|
|
$one = localpath_to_netpath($one);
|
|
|
}
|
|
@@ -574,10 +575,9 @@ function localpath_to_netpath($path)
|
|
|
} elseif (strrpos($path, 'http') !== false) {
|
|
|
return $path;
|
|
|
} else {
|
|
|
- return config('site.domain_cdnurl') . str_replace("\\", "/", $path);
|
|
|
+ return config('domain_cdnurl') . str_replace("\\", "/", $path);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
//秒 转换 日月分
|
|
|
function Sec2Time($time){
|
|
|
if(is_numeric($time)){
|