20201112
This commit is contained in:
@@ -1154,6 +1154,31 @@ class Journal extends Controller {
|
||||
Queue::push('app\api\job\mail@fire', $maidata, "mail");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊主页分期信息
|
||||
* @description 获取期刊主页分期信息
|
||||
* @author wangjinlei
|
||||
* @url /api/Journal/getMainPageStages
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
*
|
||||
* @return stages:分期信息#
|
||||
*/
|
||||
public function getMainPageStages(){
|
||||
$data = $this->request->post();
|
||||
$frag=[];
|
||||
$list = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('stage_year', date("Y"))->where('is_publish',1)->where('state',0)->order("stage_no desc")->select();
|
||||
if(count($list)==0){
|
||||
$frag = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('stage_year', date("Y",strtotime("-1 year")))->where('is_publish',1)->where('state',0)->order("stage_no desc")->select();
|
||||
}else{
|
||||
$frag = $list;
|
||||
}
|
||||
|
||||
$re['stages'] = $frag;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 添加期刊话题订阅(批量)
|
||||
|
||||
@@ -51,7 +51,8 @@ class Main extends Controller {
|
||||
|
||||
public function ttest(){
|
||||
// echo strtotime('2021-02-26');
|
||||
return jsonSuccess(['aa'=>'wjl']);
|
||||
// return jsonSuccess(['aa'=>'wjl']);
|
||||
echo md5("S123456pnx");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -360,7 +361,7 @@ class Main extends Controller {
|
||||
// $push_url = 'http://www.journal.com/api/Main/getImgFile';
|
||||
|
||||
//定义需要查询同化的数组
|
||||
$list = ['articleCite','articlePDF','articleicon','articleSUB','articleSUB2','baseTopic','journalCfp','journalfooter','journalicon','journalline','rotation','journaltopic','system','articleCDF'];
|
||||
$list = ['articleCite','articlePDF','articleicon','articleSUB','articleSUB2','baseTopic','journalCfp','journalfooter','journalicon','journalline','rotation','journaltopic','specialIcon','system','articleCDF'];
|
||||
|
||||
foreach ($list as $v){
|
||||
$dir = $root_url."public/".$v."/".date('Ymd');
|
||||
|
||||
@@ -124,17 +124,20 @@ class Special extends Controller {
|
||||
* @param name:interests type:string require:0 desc:兴趣
|
||||
* @param name:website type:string require:0 desc:编辑主页
|
||||
* @param name:orcid type:string require:0 desc:orcid
|
||||
* @param name:specialIcon type:string require:1 desc:客座编辑头像
|
||||
*
|
||||
*/
|
||||
public function addEditor(){
|
||||
$data = $this->request->post();
|
||||
$insert_editor['journal_id'] = $data['journal_id'];
|
||||
$insert_editor['email'] = $data['email'];
|
||||
$insert_editor['first_name'] = $data['first_name'];
|
||||
$insert_editor['last_name'] = $data['last_name'];
|
||||
$insert_editor['address'] = $data['address'];
|
||||
$insert_editor['interests'] = $data['interests'];
|
||||
$insert_editor['website'] = $data['website'];
|
||||
$insert_editor['orcid'] = $data['orcid'];
|
||||
$insert_editor['email'] = trim($data['email']);
|
||||
$insert_editor['first_name'] = trim($data['first_name']);
|
||||
$insert_editor['last_name'] = trim($data['last_name']);
|
||||
$insert_editor['address'] = trim($data['address']);
|
||||
$insert_editor['interests'] = trim($data['interests']);
|
||||
$insert_editor['website'] = trim($data['website']);
|
||||
$insert_editor['orcid'] = trim($data['orcid']);
|
||||
$insert_editor['icon'] = trim($data['specialIcon']);
|
||||
$uid = $this->journal_special_editor_obj->insertGetId($insert_editor);
|
||||
$insert_to['journal_special_editor_id'] = $uid;
|
||||
$insert_to['journal_special_id'] = $data['journal_special_id'];
|
||||
@@ -406,4 +409,28 @@ class Special extends Controller {
|
||||
return $frag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 头像图片上传
|
||||
* @description 头像图片上传
|
||||
* @author wangjinlei
|
||||
* @url /api/Special/up_icon_file
|
||||
* @method POST
|
||||
*
|
||||
* @param name:name type:string require:1 default:specialIcon desc:文件域名称
|
||||
*
|
||||
* @return upurl:图片地址
|
||||
*/
|
||||
public function up_icon_file() {
|
||||
$file = request()->file('specialIcon');
|
||||
if ($file) {
|
||||
$info = $file->move(ROOT_PATH . 'public' . DS . 'specialIcon');
|
||||
if ($info) {
|
||||
return json(['code' => 0, 'msg' => 'success', 'upurl' => str_replace("\\", "/", $info->getSaveName())]);
|
||||
} else {
|
||||
return json(['code' => 1, 'msg' => $file->getError()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user