1
This commit is contained in:
37
application/api/controller/Web.php
Normal file
37
application/api/controller/Web.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\api\controller\Base;
|
||||
use think\Db;
|
||||
use think\Queue;
|
||||
use think\Validate;
|
||||
|
||||
class Web extends Base
|
||||
{
|
||||
|
||||
private $Base_url = "http://journalapi.tmrjounals.com/public/index.php/";
|
||||
public function __construct(\think\Request $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
}
|
||||
|
||||
public function getStages(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"journal_id" => 'equire'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
|
||||
//发送请求到官网
|
||||
$url = $this->Base_url."api/Submision/getJournalStages";
|
||||
$program['issn'] = $journal_info['issn'];
|
||||
$res = object_to_array(json_decode(myPost($url,$program)));
|
||||
$list = $res['data']['stages'];
|
||||
$re['stages'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user