接口调整
This commit is contained in:
@@ -66,7 +66,7 @@ class Aiarticle extends Base
|
|||||||
**核心要求**
|
**核心要求**
|
||||||
1️ 内容涵盖哪些学科及方法请罗列
|
1️ 内容涵盖哪些学科及方法请罗列
|
||||||
2 翻译好的内容将以公众号的形式推送给读者,按学术规范翻译并提炼文章概述,整体内容应大于1200字,其中应包函文章背景(不少于400字)内容,其他内容提炼更强调逻辑性、科学术语准确性和表达的严谨性,注意内容不要有严重重复,不需要分点展示,大于1000字
|
2 翻译好的内容将以公众号的形式推送给读者,按学术规范翻译并提炼文章概述,整体内容应大于1200字,其中应包函文章背景(不少于400字)内容,其他内容提炼更强调逻辑性、科学术语准确性和表达的严谨性,注意内容不要有严重重复,不需要分点展示,大于1000字
|
||||||
3 针对文章结论生成一个简单总结,内容不要重复,大于300字
|
3 针对文章结论生成一个简单总结,内容不要和文章概述重复,字数150以内
|
||||||
4 请将标题翻译成中文【内容需自然流畅、口语化、连贯性、学术性】
|
4 请将标题翻译成中文【内容需自然流畅、口语化、连贯性、学术性】
|
||||||
{#title_chinese#}
|
{#title_chinese#}
|
||||||
5 请将文章内容翻译成中文【内容需自然流畅、口语化、连贯性、学术性】
|
5 请将文章内容翻译成中文【内容需自然流畅、口语化、连贯性、学术性】
|
||||||
@@ -673,7 +673,7 @@ class Aiarticle extends Base
|
|||||||
* @param template_id 模版ID
|
* @param template_id 模版ID
|
||||||
* @param $iIsSync 是否同步素材到微信 1是2否
|
* @param $iIsSync 是否同步素材到微信 1是2否
|
||||||
*/
|
*/
|
||||||
public function getTemplateContent($aParam = []){
|
public function getTemplateContent($aParam = [],$iIsSync = 2){
|
||||||
|
|
||||||
//获取参数
|
//获取参数
|
||||||
$aParam = empty($aParam) ? $this->request->post() : $aParam;
|
$aParam = empty($aParam) ? $this->request->post() : $aParam;
|
||||||
@@ -758,7 +758,7 @@ class Aiarticle extends Base
|
|||||||
//组装作者数据
|
//组装作者数据
|
||||||
if(!empty($aAuthor)){
|
if(!empty($aAuthor)){
|
||||||
$aAuthor = $this->_dealAuthor($aAuthor);
|
$aAuthor = $this->_dealAuthor($aAuthor);
|
||||||
$aUpload['author_info'] = $aAuthor;
|
$aQueryParam['author_info'] = $aAuthor;
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取素材信息
|
//获取素材信息
|
||||||
@@ -786,7 +786,7 @@ class Aiarticle extends Base
|
|||||||
$aDataInfo = array_column($aDataInfo, null,'email');
|
$aDataInfo = array_column($aDataInfo, null,'email');
|
||||||
foreach ($aAuthor as $key => $value) {
|
foreach ($aAuthor as $key => $value) {
|
||||||
$aAuthorData = empty($aDataInfo[$value['email']]) ? [] : $aDataInfo[$value['email']];
|
$aAuthorData = empty($aDataInfo[$value['email']]) ? [] : $aDataInfo[$value['email']];
|
||||||
if(empty($aUser)){
|
if(empty($aAuthorData)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$aAuthor[$key]['icon'] = empty($aAuthorData['media_url']) ? $value['icon'] : $aAuthorData['media_url'];
|
$aAuthor[$key]['icon'] = empty($aAuthorData['media_url']) ? $value['icon'] : $aAuthorData['media_url'];
|
||||||
@@ -1216,7 +1216,7 @@ class Aiarticle extends Base
|
|||||||
//获取模版生成内容
|
//获取模版生成内容
|
||||||
$aTemplateParam = ['article_id' => $iArticleId,'template_id' => $sTemplate,'is_sync' => 1,'wechat_id' => $sWechatId];
|
$aTemplateParam = ['article_id' => $iArticleId,'template_id' => $sTemplate,'is_sync' => 1,'wechat_id' => $sWechatId];
|
||||||
$aTemplateParam += $aJournalInfo;
|
$aTemplateParam += $aJournalInfo;
|
||||||
$aResult = json_decode($this->getTemplateContent($aTemplateParam),true);
|
$aResult = json_decode($this->getTemplateContent($aTemplateParam,1),true);
|
||||||
$sMsg = empty($aResult['msg']) ? 'The content is empty' : $aResult['msg'];
|
$sMsg = empty($aResult['msg']) ? 'The content is empty' : $aResult['msg'];
|
||||||
$aData = empty($aResult['data']) ? [] : $aResult['data'];
|
$aData = empty($aResult['data']) ? [] : $aResult['data'];
|
||||||
if(empty($aData['template'])){
|
if(empty($aData['template'])){
|
||||||
@@ -1554,7 +1554,7 @@ class Aiarticle extends Base
|
|||||||
$oMaterial = new Material;
|
$oMaterial = new Material;
|
||||||
$aLog = json_decode($oMaterial->getWechatLog(['article_id' => $iArticleId,'type' => 1,'status' =>1]),true);
|
$aLog = json_decode($oMaterial->getWechatLog(['article_id' => $iArticleId,'type' => 1,'status' =>1]),true);
|
||||||
if(!empty($aLog['data'])){
|
if(!empty($aLog['data'])){
|
||||||
return json_encode(['status' => -1,'msg' => 'The material has been uploaded','data' => []]);
|
return json_encode(['status' => 1,'msg' => 'The material has been uploaded','data' => []]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取AI生成文章内容
|
//获取AI生成文章内容
|
||||||
|
|||||||
Reference in New Issue
Block a user