Files
tougao/application/api/job/ts.php
wangjinlei d1e973388a 1
2022-06-21 17:24:06 +08:00

36 lines
887 B
PHP

<?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;
// }
}