正在显示
11 个修改的文件
包含
22 行增加
和
20 行删除
| @@ -379,7 +379,7 @@ class BTemplateLogic extends BaseLogic | @@ -379,7 +379,7 @@ class BTemplateLogic extends BaseLogic | ||
| 379 | } | 379 | } |
| 380 | } | 380 | } |
| 381 | $this->addUpdateNotify($type,$route); | 381 | $this->addUpdateNotify($type,$route); |
| 382 | - return $this->curlDelRoute($route); | 382 | + return $this->curlDelRoute(['route'=>$route,'new_route'=>$route]); |
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | /** | 385 | /** |
| @@ -113,7 +113,7 @@ class CustomTemplateLogic extends BaseLogic | @@ -113,7 +113,7 @@ class CustomTemplateLogic extends BaseLogic | ||
| 113 | } | 113 | } |
| 114 | //通知 | 114 | //通知 |
| 115 | $this->addUpdateNotify(RouteMap::SOURCE_PAGE,$info['url']); | 115 | $this->addUpdateNotify(RouteMap::SOURCE_PAGE,$info['url']); |
| 116 | - $this->curlDelRoute($info['url']); | 116 | + $this->curlDelRoute(['route'=>$info['url'],'new_route'=>$info['url']]); |
| 117 | return $this->success(); | 117 | return $this->success(); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| @@ -213,7 +213,7 @@ class CustomTemplateLogic extends BaseLogic | @@ -213,7 +213,7 @@ class CustomTemplateLogic extends BaseLogic | ||
| 213 | } | 213 | } |
| 214 | if($info['url'] != $route){ | 214 | if($info['url'] != $route){ |
| 215 | $this->addUpdateNotify(RouteMap::SOURCE_PAGE,$route); | 215 | $this->addUpdateNotify(RouteMap::SOURCE_PAGE,$route); |
| 216 | - $this->curlDelRoute($info['url']); | 216 | + $this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]); |
| 217 | } | 217 | } |
| 218 | return true; | 218 | return true; |
| 219 | } | 219 | } |
| @@ -259,7 +259,7 @@ class CustomTemplateLogic extends BaseLogic | @@ -259,7 +259,7 @@ class CustomTemplateLogic extends BaseLogic | ||
| 259 | RouteMap::delRoute(RouteMap::SOURCE_PAGE, $id, $this->user['project_id']); | 259 | RouteMap::delRoute(RouteMap::SOURCE_PAGE, $id, $this->user['project_id']); |
| 260 | //生成一条删除路由记录 | 260 | //生成一条删除路由记录 |
| 261 | $info = $this->model->read(['id' => $id], ['id', 'url']); | 261 | $info = $this->model->read(['id' => $id], ['id', 'url']); |
| 262 | - $this->curlDelRoute($info['url']); | 262 | + $this->curlDelRoute(['route'=>$info['url']]); |
| 263 | return $this->success(); | 263 | return $this->success(); |
| 264 | } | 264 | } |
| 265 | 265 |
| @@ -362,7 +362,7 @@ class VisualizationLogic extends BaseLogic | @@ -362,7 +362,7 @@ class VisualizationLogic extends BaseLogic | ||
| 362 | } | 362 | } |
| 363 | } | 363 | } |
| 364 | $this->addUpdateNotify($type,$route); | 364 | $this->addUpdateNotify($type,$route); |
| 365 | - return $this->curlDelRoute($route); | 365 | + return $this->curlDelRoute(['route'=>$route,'new_route'=>$route]); |
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | /** | 368 | /** |
| @@ -169,8 +169,10 @@ class BaseLogic extends Logic | @@ -169,8 +169,10 @@ class BaseLogic extends Logic | ||
| 169 | * @method :post | 169 | * @method :post |
| 170 | * @time :2023/11/30 14:43 | 170 | * @time :2023/11/30 14:43 |
| 171 | */ | 171 | */ |
| 172 | - public function curlDelRoute($route){ | ||
| 173 | - $url = $this->user['domain'].'api/delHtml/?project_id='.$this->user['project_id'].'&route='.$route; | 172 | + public function curlDelRoute($data){ |
| 173 | + $data['project_id'] = $this->user['project_id']; | ||
| 174 | + $str = http_build_query($data); | ||
| 175 | + $url = $this->user['domain'].'api/delHtml/?'.$str; | ||
| 174 | curlGet($url); | 176 | curlGet($url); |
| 175 | return $this->success(); | 177 | return $this->success(); |
| 176 | } | 178 | } |
| @@ -113,7 +113,7 @@ class BlogCategoryLogic extends BaseLogic | @@ -113,7 +113,7 @@ class BlogCategoryLogic extends BaseLogic | ||
| 113 | $info = $this->model->read(['id'=>$id],['id','alias']); | 113 | $info = $this->model->read(['id'=>$id],['id','alias']); |
| 114 | if($info['alias'] != $route){ | 114 | if($info['alias'] != $route){ |
| 115 | $this->addUpdateNotify(RouteMap::SOURCE_BLOG_CATE,$route); | 115 | $this->addUpdateNotify(RouteMap::SOURCE_BLOG_CATE,$route); |
| 116 | - $this->curlDelRoute($info['alias']); | 116 | + $this->curlDelRoute(['route'=>$info['alias'],'new_route'=>$route]); |
| 117 | } | 117 | } |
| 118 | return true; | 118 | return true; |
| 119 | } | 119 | } |
| @@ -306,7 +306,7 @@ class BlogCategoryLogic extends BaseLogic | @@ -306,7 +306,7 @@ class BlogCategoryLogic extends BaseLogic | ||
| 306 | RouteMap::delRoute(RouteMap::SOURCE_BLOG_CATE, $id, $this->user['project_id']); | 306 | RouteMap::delRoute(RouteMap::SOURCE_BLOG_CATE, $id, $this->user['project_id']); |
| 307 | //生成一条删除路由记录 | 307 | //生成一条删除路由记录 |
| 308 | $info = $this->model->read(['id'=>$id],['id','alias']); | 308 | $info = $this->model->read(['id'=>$id],['id','alias']); |
| 309 | - $this->curlDelRoute($info['alias']); | 309 | + $this->curlDelRoute(['route'=>$info['alias']]); |
| 310 | return $this->success(); | 310 | return $this->success(); |
| 311 | } | 311 | } |
| 312 | 312 |
| @@ -63,7 +63,7 @@ class BlogLogic extends BaseLogic | @@ -63,7 +63,7 @@ class BlogLogic extends BaseLogic | ||
| 63 | $info = $this->model->read(['id'=>$id],['id','url']); | 63 | $info = $this->model->read(['id'=>$id],['id','url']); |
| 64 | if($info['url'] != $route){ | 64 | if($info['url'] != $route){ |
| 65 | $this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route); | 65 | $this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route); |
| 66 | - $this->curlDelRoute($info['url']); | 66 | + $this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]); |
| 67 | } | 67 | } |
| 68 | return true; | 68 | return true; |
| 69 | } | 69 | } |
| @@ -155,7 +155,7 @@ class BlogLogic extends BaseLogic | @@ -155,7 +155,7 @@ class BlogLogic extends BaseLogic | ||
| 155 | RouteMap::delRoute(RouteMap::SOURCE_BLOG, $id, $this->user['project_id']); | 155 | RouteMap::delRoute(RouteMap::SOURCE_BLOG, $id, $this->user['project_id']); |
| 156 | //生成一条删除路由记录 | 156 | //生成一条删除路由记录 |
| 157 | $info = $this->model->read(['id'=>$id],['id','url']); | 157 | $info = $this->model->read(['id'=>$id],['id','url']); |
| 158 | - $this->curlDelRoute($info['url']); | 158 | + $this->curlDelRoute(['route'=>$info['url']]); |
| 159 | return $this->success(); | 159 | return $this->success(); |
| 160 | } | 160 | } |
| 161 | 161 |
| @@ -123,7 +123,7 @@ class NewsCategoryLogic extends BaseLogic | @@ -123,7 +123,7 @@ class NewsCategoryLogic extends BaseLogic | ||
| 123 | $info = $this->model->read(['id'=>$id],['id','alias']); | 123 | $info = $this->model->read(['id'=>$id],['id','alias']); |
| 124 | if($info['alias'] != $route){ | 124 | if($info['alias'] != $route){ |
| 125 | $this->addUpdateNotify(RouteMap::SOURCE_NEWS_CATE,$route); | 125 | $this->addUpdateNotify(RouteMap::SOURCE_NEWS_CATE,$route); |
| 126 | - $this->curlDelRoute($info['alias']); | 126 | + $this->curlDelRoute(['route'=>$info['alias'],'new_route'=>$route]); |
| 127 | } | 127 | } |
| 128 | return true; | 128 | return true; |
| 129 | } | 129 | } |
| @@ -287,7 +287,7 @@ class NewsCategoryLogic extends BaseLogic | @@ -287,7 +287,7 @@ class NewsCategoryLogic extends BaseLogic | ||
| 287 | //删除路由映射 | 287 | //删除路由映射 |
| 288 | RouteMap::delRoute(RouteMap::SOURCE_NEWS_CATE, $id, $this->user['project_id']); | 288 | RouteMap::delRoute(RouteMap::SOURCE_NEWS_CATE, $id, $this->user['project_id']); |
| 289 | $info = $this->model->read(['id'=>$id],['id','alias']); | 289 | $info = $this->model->read(['id'=>$id],['id','alias']); |
| 290 | - $this->curlDelRoute($info['alias']); | 290 | + $this->curlDelRoute(['route'=>$info['alias']]); |
| 291 | return $this->success(); | 291 | return $this->success(); |
| 292 | } | 292 | } |
| 293 | 293 |
| @@ -95,7 +95,7 @@ class NewsLogic extends BaseLogic | @@ -95,7 +95,7 @@ class NewsLogic extends BaseLogic | ||
| 95 | $info = $this->model->read(['id' => $id], ['id', 'url']); | 95 | $info = $this->model->read(['id' => $id], ['id', 'url']); |
| 96 | if ($info['url'] != $route) { | 96 | if ($info['url'] != $route) { |
| 97 | $this->addUpdateNotify(RouteMap::SOURCE_NEWS,$route); | 97 | $this->addUpdateNotify(RouteMap::SOURCE_NEWS,$route); |
| 98 | - $this->curlDelRoute($info['url']); | 98 | + $this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]); |
| 99 | } | 99 | } |
| 100 | return true; | 100 | return true; |
| 101 | } | 101 | } |
| @@ -267,7 +267,7 @@ class NewsLogic extends BaseLogic | @@ -267,7 +267,7 @@ class NewsLogic extends BaseLogic | ||
| 267 | RouteMap::delRoute(RouteMap::SOURCE_NEWS, $id, $this->user['project_id']); | 267 | RouteMap::delRoute(RouteMap::SOURCE_NEWS, $id, $this->user['project_id']); |
| 268 | //生成一条删除路由记录 | 268 | //生成一条删除路由记录 |
| 269 | $info = $this->model->read(['id' => $id], ['id', 'url']); | 269 | $info = $this->model->read(['id' => $id], ['id', 'url']); |
| 270 | - $this->curlDelRoute($info['url']); | 270 | + $this->curlDelRoute(['route'=>$info['url']]); |
| 271 | return $this->success(); | 271 | return $this->success(); |
| 272 | } | 272 | } |
| 273 | 273 |
| @@ -233,7 +233,7 @@ class CategoryLogic extends BaseLogic | @@ -233,7 +233,7 @@ class CategoryLogic extends BaseLogic | ||
| 233 | $info = $this->model->read(['id'=>$id],['id','route']); | 233 | $info = $this->model->read(['id'=>$id],['id','route']); |
| 234 | if($info['route'] != $route){ | 234 | if($info['route'] != $route){ |
| 235 | $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_CATE,$route); | 235 | $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_CATE,$route); |
| 236 | - $this->curlDelRoute($info['route']); | 236 | + $this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]); |
| 237 | } | 237 | } |
| 238 | return true; | 238 | return true; |
| 239 | } | 239 | } |
| @@ -278,7 +278,7 @@ class CategoryLogic extends BaseLogic | @@ -278,7 +278,7 @@ class CategoryLogic extends BaseLogic | ||
| 278 | RouteMap::delRoute(RouteMap::SOURCE_PRODUCT_CATE, $id, $this->user['project_id']); | 278 | RouteMap::delRoute(RouteMap::SOURCE_PRODUCT_CATE, $id, $this->user['project_id']); |
| 279 | //生成一条删除路由记录 | 279 | //生成一条删除路由记录 |
| 280 | $info = $this->model->read(['id'=>$id],['id','route']); | 280 | $info = $this->model->read(['id'=>$id],['id','route']); |
| 281 | - $this->curlDelRoute($info['route']); | 281 | + $this->curlDelRoute(['route'=>$info['route']]); |
| 282 | return $this->success(); | 282 | return $this->success(); |
| 283 | } | 283 | } |
| 284 | 284 |
| @@ -185,7 +185,7 @@ class KeywordLogic extends BaseLogic | @@ -185,7 +185,7 @@ class KeywordLogic extends BaseLogic | ||
| 185 | RouteMap::delRoute(RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']); | 185 | RouteMap::delRoute(RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']); |
| 186 | //生成一条删除路由记录 | 186 | //生成一条删除路由记录 |
| 187 | $info = $this->model->read(['id'=>$id],['id','route']); | 187 | $info = $this->model->read(['id'=>$id],['id','route']); |
| 188 | - $this->curlDelRoute($info['route']); | 188 | + $this->curlDelRoute(['route'=>$info['route']]); |
| 189 | return $this->success(); | 189 | return $this->success(); |
| 190 | } | 190 | } |
| 191 | 191 |
| @@ -294,7 +294,7 @@ class ProductLogic extends BaseLogic | @@ -294,7 +294,7 @@ class ProductLogic extends BaseLogic | ||
| 294 | $info = $this->model->read(['id'=>$id]); | 294 | $info = $this->model->read(['id'=>$id]); |
| 295 | if($info['route'] != $route){ | 295 | if($info['route'] != $route){ |
| 296 | $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$route); | 296 | $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$route); |
| 297 | - $this->curlDelRoute($info['route']); | 297 | + $this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]); |
| 298 | } | 298 | } |
| 299 | return $route; | 299 | return $route; |
| 300 | } | 300 | } |
| @@ -341,7 +341,7 @@ class ProductLogic extends BaseLogic | @@ -341,7 +341,7 @@ class ProductLogic extends BaseLogic | ||
| 341 | RouteMap::delRoute(RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']); | 341 | RouteMap::delRoute(RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']); |
| 342 | //生成一条删除路由记录 | 342 | //生成一条删除路由记录 |
| 343 | $info = $this->model->read(['id'=>$id],['id','route']); | 343 | $info = $this->model->read(['id'=>$id],['id','route']); |
| 344 | - $this->curlDelRoute($info['route']); | 344 | + $this->curlDelRoute(['route'=>$info['route']]); |
| 345 | return $this->success(); | 345 | return $this->success(); |
| 346 | } | 346 | } |
| 347 | 347 |
-
请 注册 或 登录 后发表评论