1
This commit is contained in:
@@ -189,6 +189,25 @@ class Production extends Controller
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生产实例列表
|
||||
*/
|
||||
public function getProductionDetail(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'p_article_id'=>'require|number'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$p_info = $this->production_article_obj->where('p_article_id',$data['p_article_id'])->find();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加作者机构
|
||||
*/
|
||||
@@ -196,7 +215,7 @@ class Production extends Controller
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'p_article_id'=>'require|number',
|
||||
'argan_name'=>'require'
|
||||
'organ_name'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
@@ -351,7 +370,15 @@ class Production extends Controller
|
||||
* 上传文件
|
||||
*/
|
||||
public function up_file(){
|
||||
|
||||
$file = request()->file('pdf');
|
||||
if ($file) {
|
||||
$info = $file->move(ROOT_PATH . 'public' . DS . 'pdf');
|
||||
if ($info) {
|
||||
return json(['code' => 0, 'upurl' => str_replace("\\", "/", $info->getSaveName())]);
|
||||
} else {
|
||||
return json(['code' => 1, 'msg' => $file->getError()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user