Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -321,8 +321,15 @@ class Preaccept extends Base
|
||||
$insert['ami_id'] = $data['ami_id'];
|
||||
$insert['sort'] = $am_info['sort']+1;
|
||||
$insert['ctime'] = time();
|
||||
$this->article_main_obj->insert($insert);
|
||||
return jsonSuccess([]);
|
||||
//$this->article_main_obj->insert($insert);
|
||||
// return jsonSuccess([]);
|
||||
//返回更新数据 20260120 start
|
||||
$iId = $this->article_main_obj->insertGetId($insert);
|
||||
$insert = empty($insert) ? [] : array_merge($insert,['am_id' => empty($iId) ? 0 : $iId]);
|
||||
$aResult = $this->_getMainRow($iId);
|
||||
$aResult = empty($aResult) ? $insert : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回更新数据 20260120 end
|
||||
}
|
||||
|
||||
public function removeImage(){
|
||||
@@ -384,8 +391,15 @@ class Preaccept extends Base
|
||||
$insert["content"] = "<table tableId='".$amt_info['amt_id']."' />";
|
||||
$insert['sort'] = $am_info['sort']+1;
|
||||
$insert['ctime'] = time();
|
||||
$this->article_main_obj->insert($insert);
|
||||
return jsonSuccess([]);
|
||||
// $this->article_main_obj->insert($insert);
|
||||
// return jsonSuccess([]);
|
||||
//返回更新数据 20260120 start
|
||||
$iId = $this->article_main_obj->insertGetId($insert);
|
||||
$insert = empty($insert) ? [] : array_merge($insert,['am_id' => empty($iId) ? 0 : $iId]);
|
||||
$aResult = $this->_getMainRow($iId);
|
||||
$aResult = empty($aResult) ? $insert : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回更新数据 20260120 end
|
||||
}
|
||||
|
||||
|
||||
@@ -832,7 +846,14 @@ class Preaccept extends Base
|
||||
$this->addBRow($am_info['article_id'],$data['am_id']);
|
||||
}
|
||||
$this->article_main_obj->where("am_id",$data['am_id'])->update(["is_h1"=>1,"is_h2"=>0,"is_h3"=>0]);
|
||||
return jsonSuccess([]);
|
||||
// return jsonSuccess([]);
|
||||
//返回数据 20260119 start
|
||||
$am_info = empty($am_info) ? [] : array_merge($am_info,["is_h1"=>1,"is_h2"=>0,"is_h3"=>0]);
|
||||
$iId = empty($data['am_id']) ? 0 : $data['am_id'];
|
||||
$aResult = $this->_getMainRow($iId);
|
||||
$aResult = empty($aResult) ? $am_info : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回数据 20260119 end
|
||||
}
|
||||
|
||||
public function changeH2(){
|
||||
@@ -850,7 +871,14 @@ class Preaccept extends Base
|
||||
$this->addBRow($am_info['article_id'],$p_list[0]['am_id']);
|
||||
}
|
||||
$this->article_main_obj->where("am_id",$data['am_id'])->update(["is_h1"=>0,"is_h2"=>1,"is_h3"=>0]);
|
||||
return jsonSuccess([]);
|
||||
// return jsonSuccess([]);
|
||||
//返回数据 20260119 start
|
||||
$am_info = empty($am_info) ? [] : array_merge($am_info,["is_h1"=>0,"is_h2"=>1,"is_h3"=>0]);
|
||||
$iId = empty($data['am_id']) ? 0 : $data['am_id'];
|
||||
$aResult = $this->_getMainRow($iId);
|
||||
$aResult = empty($aResult) ? $am_info : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回数据 20260119 end
|
||||
}
|
||||
|
||||
public function changeH3(){
|
||||
@@ -863,7 +891,14 @@ class Preaccept extends Base
|
||||
}
|
||||
$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_h1"=>0,"is_h2"=>0,"is_h3"=>1]);
|
||||
return jsonSuccess([]);
|
||||
// return jsonSuccess([]);
|
||||
//返回数据 20260119 start
|
||||
$am_info = empty($am_info) ? [] : array_merge($am_info,["is_h1"=>0,"is_h2"=>0,"is_h3"=>1]);
|
||||
$iId = empty($data['am_id']) ? 0 : $data['am_id'];
|
||||
$aResult = $this->_getMainRow($iId);
|
||||
$aResult = empty($aResult) ? $am_info : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回数据 20260119 end
|
||||
}
|
||||
|
||||
public function changeNormal(){
|
||||
@@ -875,7 +910,13 @@ class Preaccept extends Base
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$this->article_main_obj->where("am_id",$data['am_id'])->update(["is_h1"=>0,"is_h2"=>0,"is_h3"=>0]);
|
||||
return jsonSuccess([]);
|
||||
// return jsonSuccess([]);
|
||||
//返回数据 20260119 start
|
||||
$iId = empty($data['am_id']) ? 0 : $data['am_id'];
|
||||
$aResult = $this->_getMainRow($iId);
|
||||
$aResult = empty($aResult) ? [] : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回数据 20260119 end
|
||||
}
|
||||
|
||||
public function addBlankRow(){
|
||||
@@ -892,14 +933,26 @@ class Preaccept extends Base
|
||||
}else{
|
||||
$row = 1;
|
||||
}
|
||||
// while ($row>0){
|
||||
// $this->addBRow($data['article_id'],$data['am_id']);
|
||||
// $row--;
|
||||
// }
|
||||
// return jsonSuccess([]);
|
||||
//返回添加数据 20260119 start
|
||||
$aId = [];
|
||||
while ($row>0){
|
||||
$this->addBRow($data['article_id'],$data['am_id']);
|
||||
$iId = $this->addBRow($data['article_id'],$data['am_id']);
|
||||
$row--;
|
||||
if(!empty($iId)){
|
||||
$aId[] = $iId;
|
||||
}
|
||||
}
|
||||
return jsonSuccess([]);
|
||||
$aResult = $this->_getRowInfo($aId);
|
||||
$aResult = empty($aResult) ? $aId : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回添加数据 20260119 end
|
||||
}
|
||||
|
||||
|
||||
/**添加批量主体内容
|
||||
* @return \think\response\Json
|
||||
* @throws \think\Exception
|
||||
@@ -926,15 +979,32 @@ class Preaccept extends Base
|
||||
$this->article_main_obj->where("article_id",$data['article_id'])->where("sort",">",$r['sort'])->inc("sort",count($data['rows']))->update();
|
||||
$sort = $r['sort']+1;
|
||||
}
|
||||
// foreach ($data['rows'] as $v){
|
||||
// $insert['article_id'] = $data['article_id'];
|
||||
// $insert['content'] = $v;
|
||||
// $insert['sort'] = $sort;
|
||||
// $insert['ctime'] = time();
|
||||
// $this->article_main_obj->insert($insert);
|
||||
// $sort++;
|
||||
// }
|
||||
// return jsonSuccess([]);
|
||||
|
||||
//返回数组数据 20260119 start
|
||||
$aInsert = [];
|
||||
foreach ($data['rows'] as $v){
|
||||
$insert['article_id'] = $data['article_id'];
|
||||
$insert['content'] = $v;
|
||||
$insert['sort'] = $sort;
|
||||
$insert['ctime'] = time();
|
||||
$this->article_main_obj->insert($insert);
|
||||
$iId = $this->article_main_obj->insertGetId($insert);
|
||||
$sort++;
|
||||
$aInsert[] = empty($iId) ? $insert : array_merge($insert,['am_id' => $iId]);
|
||||
}
|
||||
return jsonSuccess([]);
|
||||
$aId = empty($aInsert) ? [] : array_column($aInsert, 'am_id');
|
||||
$aResult = $this->_getRowInfo($aId);
|
||||
$aResult = empty($aResult) ? $aInsert : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回数组数据 20260119 end
|
||||
}
|
||||
|
||||
|
||||
@@ -945,7 +1015,10 @@ class Preaccept extends Base
|
||||
$insert['content'] = "";
|
||||
$insert['sort'] = 1;
|
||||
$insert['ctime'] = time();
|
||||
$this->article_main_obj->insert($insert);
|
||||
// $this->article_main_obj->insert($insert);
|
||||
//返回主键ID 0119 start
|
||||
return $this->article_main_obj->insertGetId($insert);
|
||||
//返回主键ID 0119 end
|
||||
}else{
|
||||
$am_info = $this->article_main_obj->where("am_id",$am_id)->find();
|
||||
$this->article_main_obj->where("article_id",$article_id)->where("sort",">",$am_info['sort'])->inc("sort",1)->update();
|
||||
@@ -953,7 +1026,10 @@ class Preaccept extends Base
|
||||
$insert['content'] = "";
|
||||
$insert['sort'] = $am_info['sort']+1;
|
||||
$insert['ctime'] = time();
|
||||
$this->article_main_obj->insert($insert);
|
||||
// $this->article_main_obj->insert($insert);
|
||||
//返回主键ID 0119 start
|
||||
return $this->article_main_obj->insertGetId($insert);
|
||||
//返回主键ID 0119 end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1063,7 +1139,14 @@ class Preaccept extends Base
|
||||
$update['content'] = $this->formatMain($data['content']);
|
||||
$update['state'] = 0;
|
||||
$this->article_main_obj->where("am_id",$data['am_id'])->update($update);
|
||||
return jsonSuccess([]);
|
||||
// return jsonSuccess([]);
|
||||
//返回更新数据 20260119 start
|
||||
$update = empty($update) ? [] : array_merge($update,['am_id' => empty($data['am_id']) ? 0 : $data['am_id']]);
|
||||
$iId = empty($data['am_id']) ? 0 : $data['am_id'];
|
||||
$aResult = $this->_getMainRow($iId);
|
||||
$aResult = empty($aResult) ? $update : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回更新数据 20260119 end
|
||||
}
|
||||
|
||||
public function getArticleMainsRecycle(){
|
||||
@@ -1099,11 +1182,18 @@ class Preaccept extends Base
|
||||
$insert['title'] = $data['title'];
|
||||
}
|
||||
$insert['ctime'] = time();
|
||||
$this->article_main_image_obj->insert($insert);
|
||||
$re['url'] = $data['url'];
|
||||
// $this->article_main_image_obj->insert($insert);
|
||||
// $re['url'] = $data['url'];
|
||||
|
||||
|
||||
return jsonSuccess($re);
|
||||
// return jsonSuccess($re);
|
||||
//返回新增数据 20260119 start
|
||||
$iId = $this->article_main_image_obj->insertGetId($insert);
|
||||
$insert = empty($iId) ? $insert : array_merge(['ami_id' => $iId],$insert);
|
||||
$aResult = $this->_getImageInfo($iId);
|
||||
$aResult = empty($aResult) ? $insert : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回新增数据 20260119 end
|
||||
}
|
||||
|
||||
public function editMainImage(){
|
||||
@@ -1119,7 +1209,18 @@ class Preaccept extends Base
|
||||
$update['note'] = isset($data['note'])?$data['note']:"";
|
||||
$update['title'] = isset($data['title'])?$data['title']:"";
|
||||
$this->article_main_image_obj->where("ami_id",$data['ami_id'])->update($update);
|
||||
return jsonSuccess([]);
|
||||
// return jsonSuccess([]);
|
||||
//返回修改数据 20260119 start
|
||||
$update = empty($update) ? [] : array_merge(['ami_id' => empty($data['ami_id']) ? 0 : $data['ami_id']],$update);
|
||||
$iId = empty($data['ami_id']) ? 0 : $data['ami_id'];
|
||||
$aResult = $this->_getImageInfo($iId);
|
||||
$aResult = empty($aResult) ? $update : $aResult;
|
||||
if(!empty($aResult['main'])){
|
||||
$aResultInfo = $this->_getMainRow(0,$aResult['main']);
|
||||
$aResult = empty($aResultInfo) ? $aResult : $aResultInfo;
|
||||
}
|
||||
return jsonSuccess($aResult);
|
||||
//返回新增数据 20260119 end
|
||||
}
|
||||
|
||||
public function addMainTable(){
|
||||
@@ -1144,9 +1245,15 @@ class Preaccept extends Base
|
||||
$insert['note'] = $data['note'];
|
||||
}
|
||||
$insert['ctime'] = time();
|
||||
$this->article_main_table_obj->insert($insert);
|
||||
return jsonSuccess([]);
|
||||
|
||||
// $this->article_main_table_obj->insert($insert);
|
||||
// return jsonSuccess([]);
|
||||
//返回新增数据 20260119 start
|
||||
$iId = $this->article_main_table_obj->insertGetId($insert);
|
||||
$insert = empty($iId) ? $insert : array_merge(['amt_id' => $iId],$insert);
|
||||
$aResult = $this->_getTableInfo($iId);
|
||||
$aResult = empty($aResult) ? $insert : $aResult;
|
||||
return jsonSuccess($aResult);
|
||||
//返回新增数据 20260119 end
|
||||
}
|
||||
|
||||
|
||||
@@ -1168,7 +1275,18 @@ class Preaccept extends Base
|
||||
$update['note'] = $data['note'];
|
||||
}
|
||||
$this->article_main_table_obj->where("amt_id",$data['amt_id'])->update($update);
|
||||
return jsonSuccess([]);
|
||||
// return jsonSuccess([]);
|
||||
//返回修改数据 20260119 start
|
||||
$update = empty($update) ? [] : array_merge(['amt_id' => empty($data['amt_id']) ? 0 : $data['amt_id']],$update);
|
||||
$iId = empty($data['amt_id']) ? 0 : $data['amt_id'];
|
||||
$aResult = $this->_getTableInfo($iId);
|
||||
$aResult = empty($aResult) ? $update : $aResult;
|
||||
if(!empty($aResult['main'])){
|
||||
$aResultInfo = $this->_getMainRow(0,$aResult['main']);
|
||||
$aResult = empty($aResultInfo) ? $aResult : $aResultInfo;
|
||||
}
|
||||
return jsonSuccess($aResult);
|
||||
//返回新增数据 20260119 end
|
||||
}
|
||||
|
||||
|
||||
@@ -1549,12 +1667,14 @@ return null;
|
||||
}
|
||||
|
||||
foreach ($item as $k => $main) {
|
||||
if($main['is_h1']==1){
|
||||
$main['content'] = "<b><i>".$main['content']."</i></b>";
|
||||
}
|
||||
if($main['is_h2']==1||$main['is_h3']==1){
|
||||
$main['content'] = "<b>".$main['content']."</b>";
|
||||
}
|
||||
//取消一级/二级/三级 标题样式 20260119 start
|
||||
// if($main['is_h1']==1){
|
||||
// $main['content'] = "<b><i>".$main['content']."</i></b>";
|
||||
// }
|
||||
// if($main['is_h2']==1||$main['is_h3']==1){
|
||||
// $main['content'] = "<b>".$main['content']."</b>";
|
||||
// }
|
||||
//取消一级/二级/三级 标题样式 20260119 end
|
||||
$main['checks'] = empty($aMainCheckData[$main['am_id']]) ? [] : $aMainCheckData[$main['am_id']];
|
||||
if($main['type'] == 1){
|
||||
$main['image'] = empty($aArticleMainImage[$main['ami_id']]) ? [] : $aArticleMainImage[$main['ami_id']];
|
||||
@@ -1743,4 +1863,175 @@ return null;
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
//获取多条信息
|
||||
private function _getRowInfo($aId = []){
|
||||
if(empty($aId)){
|
||||
return [];
|
||||
}
|
||||
//获取信息
|
||||
$aWhere = ['am_id' => ['in',$aId],'state' => 0];
|
||||
$aArticleMain = Db::name("article_main")->where($aWhere)->order("sort asc")->select();
|
||||
if(empty($aArticleMain)){
|
||||
return [];
|
||||
}
|
||||
//获取主键ID
|
||||
$aMId = array_column($aArticleMain, 'am_id');
|
||||
//查询article_main_check
|
||||
$aWhere = ['am_id' => ['in',$aMId],'state' => 0];
|
||||
$aMainCheck = Db::name("article_main_check")->where($aWhere)->select();
|
||||
$aMainCheckData = [];
|
||||
if(!empty($aMainCheck)){
|
||||
foreach ($aMainCheck as $value) {
|
||||
if(empty($value['am_id'])){
|
||||
continue;
|
||||
}
|
||||
$aMainCheckData[$value['am_id']][] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//获取图片信息
|
||||
$aMiId = array_unique(array_column($aArticleMain, 'ami_id'));
|
||||
$aWhere = ['ami_id' => ['in',$aMiId],'state' => 0];
|
||||
$aArticleMainImage = Db::name("article_main_image")->where($aWhere)->select();
|
||||
$aArticleMainImage = empty($aArticleMainImage) ? [] : array_column($aArticleMainImage, null,'ami_id');
|
||||
//获取表格信息
|
||||
$aMiId = array_unique(array_column($aArticleMain, 'amt_id'));
|
||||
$aWhere = ['amt_id' => ['in',$aMiId],'state' => 0];
|
||||
$aArticleMainTable = Db::name("article_main_table")->where($aWhere)->select();
|
||||
$aArticleMainTable = empty($aArticleMainTable) ? [] : array_column($aArticleMainTable, null,'amt_id');
|
||||
|
||||
//查询校对数量 t_article_proofread
|
||||
$aWhere = ['am_id' => ['in',$aMId],'state' => ['between',[1,2]],'is_delete' => 2];
|
||||
$aArticleProofread = Db::name("article_proofread")->field('am_id,count(id) as num,state')->where($aWhere)->group('am_id,state')->select();
|
||||
$aArticleProofreadData = [];
|
||||
if(!empty($aArticleProofread)){
|
||||
foreach ($aArticleProofread as $key => $value) {
|
||||
$aArticleProofreadData[$value['am_id']][$value['state']] = $value['num'];
|
||||
}
|
||||
}
|
||||
|
||||
//数据处理
|
||||
foreach ($aArticleMain as $k => $main) {
|
||||
$aArticleMain[$k]['checks'] = empty($aMainCheckData[$main['am_id']]) ? [] : $aMainCheckData[$main['am_id']];
|
||||
if($main['type'] == 1){
|
||||
$aArticleMain[$k]['image'] = empty($aArticleMainImage[$main['ami_id']]) ? [] : $aArticleMainImage[$main['ami_id']];
|
||||
}
|
||||
if($main['type'] == 2){
|
||||
$aArticleMain[$k]['table'] = empty($aArticleMainTable[$main['amt_id']]) ? [] : $aArticleMainTable[$main['amt_id']];
|
||||
}
|
||||
if($main['type'] == 0){
|
||||
$aDataInfo = empty($aArticleProofreadData[$main['am_id']]) ? [] : $aArticleProofreadData[$main['am_id']];
|
||||
$main['proof_read_num'] = -1;
|
||||
if(!empty($aDataInfo)){
|
||||
$main['proof_read_num'] = empty($aDataInfo[2]) ? 0 : $aDataInfo[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $aArticleMain;
|
||||
}
|
||||
//获取图片信息
|
||||
private function _getImageInfo($iAmiId = 0){
|
||||
if(empty($iAmiId)){
|
||||
return [];
|
||||
}
|
||||
|
||||
//获取图片信息
|
||||
$aWhere = ['ami_id' => $iAmiId,'state' => 0];
|
||||
$aArticleMainImage = Db::name("article_main_image")->where($aWhere)->find();
|
||||
if(empty($aArticleMainImage)){
|
||||
return [];
|
||||
}
|
||||
$iArticleId = empty($aArticleMainImage['article_id']) ? 0 : $aArticleMainImage['article_id'];
|
||||
//获取表信息
|
||||
$aWhere = ['ami_id' => $iAmiId,'state' => 0,'type' => 1,'article_id' => $iArticleId];
|
||||
$aArticleMain = Db::name("article_main")->where($aWhere)->find();
|
||||
//数据处理
|
||||
$aArticleMainImage['has_selected'] = empty($aArticleMain) ? 0 : 1;
|
||||
if(!empty($aArticleMain)){
|
||||
$aArticleMainImage['main'] = $aArticleMain;
|
||||
}
|
||||
return $aArticleMainImage;
|
||||
}
|
||||
//获取表格信息
|
||||
private function _getTableInfo($iAmtId = 0){
|
||||
if(empty($iAmtId)){
|
||||
return [];
|
||||
}
|
||||
|
||||
//获取图片信息
|
||||
$aWhere = ['amt_id' => $iAmtId,'state' => 0];
|
||||
$aArticleMainTable = Db::name("article_main_table")->where($aWhere)->find();
|
||||
if(empty($aArticleMainTable)){
|
||||
return [];
|
||||
}
|
||||
$iArticleId = empty($aArticleMainTable['article_id']) ? 0 : $aArticleMainTable['article_id'];
|
||||
//获取表信息
|
||||
$aWhere = ['amt_id' => $iAmtId,'state' => 0,'type' => 2,'article_id' => $iArticleId];
|
||||
$aArticleMain = Db::name("article_main")->where($aWhere)->find();
|
||||
//数据处理
|
||||
$aArticleMainTable['has_selected'] = empty($aArticleMain) ? 0 : 1;
|
||||
if(!empty($aArticleMain)){
|
||||
$aArticleMainTable['main'] = $aArticleMain;
|
||||
}
|
||||
return $aArticleMainTable;
|
||||
}
|
||||
//获取单独的一条信息
|
||||
private function _getMainRow($iId = 0,$aArticleMain = []){
|
||||
if(empty($iId) && empty($aArticleMain)){
|
||||
return [];
|
||||
}
|
||||
//获取基本信息
|
||||
if(empty($aArticleMain)){
|
||||
$aWhere = ['am_id' => $iId,'state' => 0];
|
||||
$aArticleMain = Db::name("article_main")->where($aWhere)->find();
|
||||
}
|
||||
if(empty($aArticleMain)){
|
||||
return [];
|
||||
}
|
||||
//获取主键ID
|
||||
$iId = empty($aArticleMain['am_id']) ? 0 : $aArticleMain['am_id'];
|
||||
//查询article_main_check
|
||||
$aWhere = ['am_id' => $iId,'state' => 0];
|
||||
$aMainCheck = Db::name("article_main_check")->where($aWhere)->select();
|
||||
|
||||
//获取主体信息
|
||||
$iType = isset($aArticleMain['type']) ? $aArticleMain['type'] : -1;
|
||||
if($iType == 1){//获取图片
|
||||
$iAmiId = empty($aArticleMain['ami_id']) ? 0 : $aArticleMain['ami_id'];
|
||||
$aWhere = ['ami_id' => $iAmiId,'state' => 0];
|
||||
$aArticleMainImage = Db::name("article_main_image")->where($aWhere)->find();
|
||||
}
|
||||
//获取表格信息
|
||||
if($iType == 2){
|
||||
$iAmtId = empty($aArticleMain['amt_id']) ? 0 : $aArticleMain['amt_id'];
|
||||
$aWhere = ['amt_id' => $iAmtId,'state' => 0];
|
||||
$aArticleMainTable = Db::name("article_main_table")->where($aWhere)->find();
|
||||
}
|
||||
//查询校对数量 t_article_proofread
|
||||
$aWhere = ['am_id' => $iId,'state' => ['between',[1,2]],'is_delete' => 2];
|
||||
$aArticleProofread = Db::name("article_proofread")->field('am_id,count(id) as num,state')->where($aWhere)->group('state')->select();
|
||||
$aArticleProofreadData = [];
|
||||
if(!empty($aArticleProofread)){
|
||||
foreach ($aArticleProofread as $key => $value) {
|
||||
$aArticleProofreadData[$value['state']] = $value['num'];
|
||||
}
|
||||
}
|
||||
|
||||
//数据处理
|
||||
$aArticleMain['checks'] = empty($aMainCheckData) ? [] : $aMainCheckData;
|
||||
if($iType == 1){
|
||||
$aArticleMain['image'] = empty($aArticleMainImage) ? [] : $aArticleMainImage;
|
||||
}
|
||||
if($iType == 2){
|
||||
$aArticleMain['table'] = empty($aArticleMainTable) ? [] : $aArticleMainTable;
|
||||
}
|
||||
if($iType == 0){
|
||||
$aDataInfo = empty($aArticleProofreadData) ? [] : $aArticleProofreadData;
|
||||
$aArticleMain['proof_read_num'] = -1;
|
||||
if(!empty($aDataInfo)){
|
||||
$aArticleMain['proof_read_num'] = empty($aDataInfo[2]) ? 0 : $aDataInfo[2];
|
||||
}
|
||||
}
|
||||
return $aArticleMain;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user