|
@@ -41,7 +41,7 @@ class BlogLogic extends BaseLogic |
|
@@ -41,7 +41,7 @@ class BlogLogic extends BaseLogic |
|
41
|
$this->edit($this->param,['id'=>$id]);
|
41
|
$this->edit($this->param,['id'=>$id]);
|
|
42
|
$this->curlDelRoute(['new_route'=>$route ?? '','old_route'=>$info['url'] ?? '']);
|
42
|
$this->curlDelRoute(['new_route'=>$route ?? '','old_route'=>$info['url'] ?? '']);
|
|
43
|
}else{
|
43
|
}else{
|
|
44
|
- $this->param['sort'] = $this->setNewsSort();
|
44
|
+ $this->param['sort'] = $this->setBlogSort();
|
|
45
|
$id = $this->model->addReturnId($this->param);
|
45
|
$id = $this->model->addReturnId($this->param);
|
|
46
|
$route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_BLOG, $id, $this->user['project_id']);
|
46
|
$route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_BLOG, $id, $this->user['project_id']);
|
|
47
|
$this->edit(['url'=>$route],['id'=>$id]);
|
47
|
$this->edit(['url'=>$route],['id'=>$id]);
|
|
@@ -53,12 +53,12 @@ class BlogLogic extends BaseLogic |
|
@@ -53,12 +53,12 @@ class BlogLogic extends BaseLogic |
|
53
|
|
53
|
|
|
54
|
/**
|
54
|
/**
|
|
55
|
* @remark :设置最新产品的sort排序
|
55
|
* @remark :设置最新产品的sort排序
|
|
56
|
- * @name :setNewsSort
|
56
|
+ * @name :setBlogSort
|
|
57
|
* @author :lyh
|
57
|
* @author :lyh
|
|
58
|
* @method :post
|
58
|
* @method :post
|
|
59
|
* @time :2023/12/25 9:27
|
59
|
* @time :2023/12/25 9:27
|
|
60
|
*/
|
60
|
*/
|
|
61
|
- public function setNewsSort(){
|
61
|
+ public function setBlogSort(){
|
|
62
|
$info = $this->model->orderBy('sort','desc')->first();
|
62
|
$info = $this->model->orderBy('sort','desc')->first();
|
|
63
|
if(empty($info)){
|
63
|
if(empty($info)){
|
|
64
|
return 1;
|
64
|
return 1;
|
|
@@ -435,8 +435,8 @@ class BlogLogic extends BaseLogic |
|
@@ -435,8 +435,8 @@ class BlogLogic extends BaseLogic |
|
435
|
}
|
435
|
}
|
|
436
|
|
436
|
|
|
437
|
/**
|
437
|
/**
|
|
438
|
- * @remark :复制新闻
|
|
|
|
439
|
- * @name :copyNewsInfo
|
438
|
+ * @remark :复制
|
|
|
|
439
|
+ * @name :copyBlogInfo
|
|
440
|
* @author :lyh
|
440
|
* @author :lyh
|
|
441
|
* @method :post
|
441
|
* @method :post
|
|
442
|
* @time :2024/4/28 14:51
|
442
|
* @time :2024/4/28 14:51
|