|
@@ -195,12 +195,13 @@ class AdService implements AdServiceInterface
|
|
|
$web = AdPlace::where($where)
|
|
|
->leftJoin("website","website.id","ad_place.website_id")
|
|
|
->select("website.*","ad_place.name",'ad_place.ad_tag')
|
|
|
+
|
|
|
->first();
|
|
|
if(empty($web)){
|
|
|
return Result::error("广告位不存在");
|
|
|
}
|
|
|
// 自助建站广告位-广告位编辑同步模板数据-------fr----start
|
|
|
-
|
|
|
+ // return Result::success($web);
|
|
|
$website_column_arr_id = json_decode($web['website_column_arr_id'],true);
|
|
|
Db::beginTransaction();
|
|
|
try{
|
|
@@ -219,6 +220,8 @@ class AdService implements AdServiceInterface
|
|
|
if(array_key_exists( $page,$oldtemplate_data['ad'])){
|
|
|
$ad_places = $oldtemplate_data['ad'][$page];
|
|
|
}
|
|
|
+ // return Result::success($ad_places);
|
|
|
+
|
|
|
foreach($ad_places as $key=>$val){
|
|
|
if($template_data['ad_tag'] == $val['ad_tag']){
|
|
|
$ad_place[$key] = [
|
|
@@ -231,6 +234,8 @@ class AdService implements AdServiceInterface
|
|
|
'thumb'=>$template_data['thumb'], //广告位默认图可更改
|
|
|
'typeid'=>$val['typeid'],
|
|
|
'ad_tag'=>$val['ad_tag'],
|
|
|
+ 'ad_url'=>$template_data['ad_url'], //广告位默认链接可更改
|
|
|
+
|
|
|
];
|
|
|
$template_ad = $ad_place[$key];
|
|
|
}else{
|
|
@@ -238,6 +243,8 @@ class AdService implements AdServiceInterface
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ // return Result::success($ad_place);
|
|
|
+
|
|
|
// 保存的模板中的广告位相关信息
|
|
|
$oldtemplate_data['ad'][$page] = $ad_place;
|
|
|
|