作者 lyh

gx

... ... @@ -379,7 +379,7 @@ class BTemplateLogic extends BaseLogic
}
}
$this->addUpdateNotify($type,$route);
return $this->curlDelRoute($route);
return $this->curlDelRoute(['route'=>$route,'new_route'=>$route]);
}
/**
... ...
... ... @@ -113,7 +113,7 @@ class CustomTemplateLogic extends BaseLogic
}
//通知
$this->addUpdateNotify(RouteMap::SOURCE_PAGE,$info['url']);
$this->curlDelRoute($info['url']);
$this->curlDelRoute(['route'=>$info['url'],'new_route'=>$info['url']]);
return $this->success();
}
... ... @@ -213,7 +213,7 @@ class CustomTemplateLogic extends BaseLogic
}
if($info['url'] != $route){
$this->addUpdateNotify(RouteMap::SOURCE_PAGE,$route);
$this->curlDelRoute($info['url']);
$this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]);
}
return true;
}
... ... @@ -259,7 +259,7 @@ class CustomTemplateLogic extends BaseLogic
RouteMap::delRoute(RouteMap::SOURCE_PAGE, $id, $this->user['project_id']);
//生成一条删除路由记录
$info = $this->model->read(['id' => $id], ['id', 'url']);
$this->curlDelRoute($info['url']);
$this->curlDelRoute(['route'=>$info['url']]);
return $this->success();
}
... ...
... ... @@ -362,7 +362,7 @@ class VisualizationLogic extends BaseLogic
}
}
$this->addUpdateNotify($type,$route);
return $this->curlDelRoute($route);
return $this->curlDelRoute(['route'=>$route,'new_route'=>$route]);
}
/**
... ...
... ... @@ -169,8 +169,10 @@ class BaseLogic extends Logic
* @method :post
* @time :2023/11/30 14:43
*/
public function curlDelRoute($route){
$url = $this->user['domain'].'api/delHtml/?project_id='.$this->user['project_id'].'&route='.$route;
public function curlDelRoute($data){
$data['project_id'] = $this->user['project_id'];
$str = http_build_query($data);
$url = $this->user['domain'].'api/delHtml/?'.$str;
curlGet($url);
return $this->success();
}
... ...
... ... @@ -113,7 +113,7 @@ class BlogCategoryLogic extends BaseLogic
$info = $this->model->read(['id'=>$id],['id','alias']);
if($info['alias'] != $route){
$this->addUpdateNotify(RouteMap::SOURCE_BLOG_CATE,$route);
$this->curlDelRoute($info['alias']);
$this->curlDelRoute(['route'=>$info['alias'],'new_route'=>$route]);
}
return true;
}
... ... @@ -306,7 +306,7 @@ class BlogCategoryLogic extends BaseLogic
RouteMap::delRoute(RouteMap::SOURCE_BLOG_CATE, $id, $this->user['project_id']);
//生成一条删除路由记录
$info = $this->model->read(['id'=>$id],['id','alias']);
$this->curlDelRoute($info['alias']);
$this->curlDelRoute(['route'=>$info['alias']]);
return $this->success();
}
... ...
... ... @@ -63,7 +63,7 @@ class BlogLogic extends BaseLogic
$info = $this->model->read(['id'=>$id],['id','url']);
if($info['url'] != $route){
$this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route);
$this->curlDelRoute($info['url']);
$this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]);
}
return true;
}
... ... @@ -155,7 +155,7 @@ class BlogLogic extends BaseLogic
RouteMap::delRoute(RouteMap::SOURCE_BLOG, $id, $this->user['project_id']);
//生成一条删除路由记录
$info = $this->model->read(['id'=>$id],['id','url']);
$this->curlDelRoute($info['url']);
$this->curlDelRoute(['route'=>$info['url']]);
return $this->success();
}
... ...
... ... @@ -123,7 +123,7 @@ class NewsCategoryLogic extends BaseLogic
$info = $this->model->read(['id'=>$id],['id','alias']);
if($info['alias'] != $route){
$this->addUpdateNotify(RouteMap::SOURCE_NEWS_CATE,$route);
$this->curlDelRoute($info['alias']);
$this->curlDelRoute(['route'=>$info['alias'],'new_route'=>$route]);
}
return true;
}
... ... @@ -287,7 +287,7 @@ class NewsCategoryLogic extends BaseLogic
//删除路由映射
RouteMap::delRoute(RouteMap::SOURCE_NEWS_CATE, $id, $this->user['project_id']);
$info = $this->model->read(['id'=>$id],['id','alias']);
$this->curlDelRoute($info['alias']);
$this->curlDelRoute(['route'=>$info['alias']]);
return $this->success();
}
... ...
... ... @@ -95,7 +95,7 @@ class NewsLogic extends BaseLogic
$info = $this->model->read(['id' => $id], ['id', 'url']);
if ($info['url'] != $route) {
$this->addUpdateNotify(RouteMap::SOURCE_NEWS,$route);
$this->curlDelRoute($info['url']);
$this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]);
}
return true;
}
... ... @@ -267,7 +267,7 @@ class NewsLogic extends BaseLogic
RouteMap::delRoute(RouteMap::SOURCE_NEWS, $id, $this->user['project_id']);
//生成一条删除路由记录
$info = $this->model->read(['id' => $id], ['id', 'url']);
$this->curlDelRoute($info['url']);
$this->curlDelRoute(['route'=>$info['url']]);
return $this->success();
}
... ...
... ... @@ -233,7 +233,7 @@ class CategoryLogic extends BaseLogic
$info = $this->model->read(['id'=>$id],['id','route']);
if($info['route'] != $route){
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_CATE,$route);
$this->curlDelRoute($info['route']);
$this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]);
}
return true;
}
... ... @@ -278,7 +278,7 @@ class CategoryLogic extends BaseLogic
RouteMap::delRoute(RouteMap::SOURCE_PRODUCT_CATE, $id, $this->user['project_id']);
//生成一条删除路由记录
$info = $this->model->read(['id'=>$id],['id','route']);
$this->curlDelRoute($info['route']);
$this->curlDelRoute(['route'=>$info['route']]);
return $this->success();
}
... ...
... ... @@ -185,7 +185,7 @@ class KeywordLogic extends BaseLogic
RouteMap::delRoute(RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']);
//生成一条删除路由记录
$info = $this->model->read(['id'=>$id],['id','route']);
$this->curlDelRoute($info['route']);
$this->curlDelRoute(['route'=>$info['route']]);
return $this->success();
}
... ...
... ... @@ -294,7 +294,7 @@ class ProductLogic extends BaseLogic
$info = $this->model->read(['id'=>$id]);
if($info['route'] != $route){
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$route);
$this->curlDelRoute($info['route']);
$this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]);
}
return $route;
}
... ... @@ -341,7 +341,7 @@ class ProductLogic extends BaseLogic
RouteMap::delRoute(RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']);
//生成一条删除路由记录
$info = $this->model->read(['id'=>$id],['id','route']);
$this->curlDelRoute($info['route']);
$this->curlDelRoute(['route'=>$info['route']]);
return $this->success();
}
... ...