1
This commit is contained in:
@@ -757,14 +757,14 @@ class Preaccept extends Base
|
||||
$am_info = $this->article_main_obj->where("am_id",$data['am_id'])->find();
|
||||
//上一行,空行
|
||||
$p_list = $this->article_main_obj->where("article_id",$am_info['article_id'])->where("sort","<",$am_info['sort'])->whereIn("state",[0,2])->order("sort desc")->limit(1)->select();
|
||||
if($p_list[0]['type']>0||$p_list[0]['content']!=""){
|
||||
if($p_list&&($p_list[0]['type']>0||$p_list[0]['content']!="")){
|
||||
$this->addBRow($am_info['article_id'],$p_list[0]['am_id']);
|
||||
}
|
||||
$n_list = $this->article_main_obj->where("article_id",$am_info['article_id'])->where("sort",">",$am_info['sort'])->whereIn("state",[0,2])->order("sort asc")->limit(1)->select();
|
||||
if($n_list[0]['type']>0||$n_list[0]['content']!=""){
|
||||
$this->addBRow($am_info['article_id'],$data['am_id']);
|
||||
}
|
||||
$this->article_main_obj->where("am_id",$data['am_id'])->update(["is_h1"=>1,"content"=>"<b><i>".$am_info['content']."</i></b>"]);
|
||||
$this->article_main_obj->where("am_id",$data['am_id'])->update(["is_h1"=>1,"is_h2"=>0,"is_h3"=>0,"content"=>"<b><i>".$am_info['content']."</i></b>"]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
@@ -779,10 +779,10 @@ class Preaccept extends Base
|
||||
$am_info = $this->article_main_obj->where("am_id",$data['am_id'])->find();
|
||||
//上一行,空行
|
||||
$p_list = $this->article_main_obj->where("article_id",$am_info['article_id'])->where("sort","<",$am_info['sort'])->whereIn("state",[0,2])->order("sort desc")->limit(1)->select();
|
||||
if($p_list[0]['type']>0||$p_list[0]['content']!=""){
|
||||
if($p_list&&($p_list[0]['type']>0||$p_list[0]['content']!="")){
|
||||
$this->addBRow($am_info['article_id'],$p_list[0]['am_id']);
|
||||
}
|
||||
$this->article_main_obj->where("am_id",$data['am_id'])->update(["is_h2"=>1,"content"=>"<b>".$am_info['content']."</b>"]);
|
||||
$this->article_main_obj->where("am_id",$data['am_id'])->update(["is_h1"=>0,"is_h2"=>1,"is_h3"=>0,"content"=>"<b>".$am_info['content']."</b>"]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
@@ -795,7 +795,7 @@ class Preaccept extends Base
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$am_info = $this->article_main_obj->where("am_id",$data['am_id'])->find();
|
||||
$this->article_main_obj->where("am_id",$data['am_id'])->update(["is_h3"=>1,"content"=>"<b>".$am_info['content']."</b>"]);
|
||||
$this->article_main_obj->where("am_id",$data['am_id'])->update(["is_h1"=>0,"is_h2"=>0,"is_h3"=>1,"content"=>"<b>".$am_info['content']."</b>"]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user