作者 赵彬吉
... ... @@ -96,8 +96,6 @@ class DomainInfo extends Command
'cert' => ''
];
$result = $this->curlRequest($url, $param);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($param['domain'], true) . PHP_EOL, FILE_APPEND);
}
public static function getTopDomain ($url) {
... ...
... ... @@ -305,7 +305,6 @@ class FileController
public function setUrl(){
//A端上传
if(isset($this->param['refer_type']) && $this->param['refer_type'] == 1){
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入222', true) . PHP_EOL, FILE_APPEND);
$this->path = $this->uploads['path_a'].'/'.$this->file_type[$this->param['refer']].'/'.date('Y-m');
}else{
//B端上传,upload_method 为 1时 强制上传到本地
... ...
... ... @@ -273,20 +273,14 @@ class ProductLogic extends BaseLogic
$param['gallery'] = Arr::a2s($param['gallery'] ?? []);
}
if(isset($param['files'])){
foreach ($param['files'] as $k => $v){
$v['url'] = str_replace_url($v['url']);
$param['files'][$k] = $v;
}
$param['files']['url'] = str_replace_url($param['files']['url']);
$param['files'] = Arr::a2s($param['files'] ?? []);
}
if(isset($param['video'])){
foreach ($param['video'] as $k => $v){
$v['url'] = str_replace_url($v['url']);
$param['video'][$k] = $v;
}
$param['video']['url'] = str_replace_url($param['video']['url']);
$param['video'] = Arr::a2s($param['video'] ?? []);
}
if(isset($param['keyword_id'])){
if(isset($param['keyword_id']) && !empty($param['keyword_id'])){
$param['keyword_id'] = ','.Arr::arrToSet($param['keyword_id']).',';
}
$param['attrs'] = Arr::a2s($param['attrs'] ?? []);
... ...
... ... @@ -175,11 +175,8 @@ class Product extends Base
public function getFilesAttribute($value){
if(!empty($value)){
$value = Arr::s2a($value);
foreach ($value as $k => $v){
if(!empty($v['url'])){
$v['url'] = getImageUrl($v['url']);
}
$value[$k] = $v;
if(!empty($value['url'])){
$value['url'] = getImageUrl($value['url']);
}
}
return $value;
... ... @@ -195,11 +192,9 @@ class Product extends Base
public function getVideoAttribute($value){
if(!empty($value)){
$value = Arr::s2a($value);
foreach ($value as $k => $v){
if(!empty($v['url'])){
$v['url'] = getImageUrl($v['url']);
}
$value[$k] = $v;
$value = Arr::s2a($value);
if(!empty($value['url'])){
$value['url'] = getImageUrl($value['url']);
}
}
return $value;
... ...