提交其他文件
This commit is contained in:
55
app/api/controller/SubmitFormController.php
Normal file
55
app/api/controller/SubmitFormController.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\api\logic\SubmitFormLogic;
|
||||
|
||||
class SubmitFormController extends BaseApiController
|
||||
{
|
||||
|
||||
public array $notNeedLogin = [];
|
||||
|
||||
|
||||
public function addTeamaster(){
|
||||
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = SubmitFormLogic::addTeamaster($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(SubmitFormLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
public function addStore(){
|
||||
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = SubmitFormLogic::addStore($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(SubmitFormLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
public function teamasterRealStatus(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = SubmitFormLogic::teamasterRealStatus($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(SubmitFormLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
public function storeRealStatus(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = SubmitFormLogic::storeRealStatus($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(SubmitFormLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user