1
This commit is contained in:
@@ -2018,7 +2018,7 @@ class Article extends Base
|
||||
* @return void
|
||||
*/
|
||||
private function markArticleImage($article_id){
|
||||
$article_info = $this->article_obj->where("article_id",$article_id)->find();
|
||||
// $article_info = $this->article_obj->where("article_id",$article_id)->find();
|
||||
//处理word的图片内容
|
||||
$files = $this->article_file_obj->where("article_id",$article_id)->where("type_name","manuscirpt")->where("state",0)->order("ctime desc")->limit(1)->select();
|
||||
$file = '';
|
||||
@@ -2157,9 +2157,18 @@ class Article extends Base
|
||||
|
||||
private function insertImageData($article_id, $newFileName)
|
||||
{
|
||||
$ff="";
|
||||
if(pathinfo($newFileName,PATHINFO_EXTENSION)=="tif"||pathinfo($newFileName,PATHINFO_EXTENSION)=="tiff"){
|
||||
$ff = $this->crossTifToPng($article_id . "/" . $newFileName);
|
||||
}else{
|
||||
$ff = $article_id . "/" . $newFileName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$insert = [
|
||||
'article_id' => $article_id,
|
||||
'image' => $article_id . "/" . $newFileName,
|
||||
'image' => $ff,
|
||||
'ctime' => time(),
|
||||
];
|
||||
$this->article_image_obj->insert($insert);
|
||||
@@ -2250,6 +2259,9 @@ class Article extends Base
|
||||
foreach ($file_runs as $v){
|
||||
$insert['article_id'] = $article_id;
|
||||
$insert['image'] = $article_id."/".$v;
|
||||
if(pathinfo($v,PATHINFO_EXTENSION)=="tif"||pathinfo($v,PATHINFO_EXTENSION)=="tiff"){
|
||||
$insert['jpg_url'] = $this->crossTifToPng($article_id . "/" . $v);
|
||||
}
|
||||
$insert['ctime'] = time();
|
||||
$this->article_image_obj->insert($insert);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user