1
This commit is contained in:
35
application/api/job/ts.php
Normal file
35
application/api/job/ts.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\job;
|
||||
|
||||
use think\queue\Job;
|
||||
use think\Db;
|
||||
|
||||
class ts {
|
||||
|
||||
//put your code here
|
||||
|
||||
public function fire(Job $job, $data) {
|
||||
$job->delete();
|
||||
my_doiToFrag($data);
|
||||
}
|
||||
|
||||
|
||||
// public function doFrag($data){
|
||||
// $ts_refer_obj = Db::name('ts_refer');
|
||||
// if($data['refer_doi']==''){
|
||||
// return 0;
|
||||
// }
|
||||
// $doi = str_replace('/','%2F',$data['refer_doi']);
|
||||
// $url = "https://citation.crosscite.org/format?doi=$doi&style=american-veterinary-medical-association&lang=en-US";
|
||||
// $res = myGet($url);
|
||||
// $frag = trim(substr($res,strpos($res,'.')+1));
|
||||
// file_put_contents("D:/1.txt",$frag);
|
||||
// file_put_contents("D:/2.txt",$ts_refer_obj);
|
||||
|
||||
// // $ts_refer_obj->where('ts_refer_id',$data['ts_refer_id'])->update(['refer_frag'=>$frag]);
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user