|
|
|
|
@ -393,15 +393,16 @@ class ProjectController extends CommonController
|
|
|
|
|
public function askSubmitStore(Request $request)
|
|
|
|
|
{
|
|
|
|
|
$all = \request()->all();
|
|
|
|
|
if (!isset($all['mobile']) || empty($all['mobile'])) {
|
|
|
|
|
return $this->error("手机号不存在", '');
|
|
|
|
|
}
|
|
|
|
|
$project_id = \request('project_id');
|
|
|
|
|
|
|
|
|
|
// $userId = auth()->user()->id;
|
|
|
|
|
// 一个月只能提交一次
|
|
|
|
|
// $has = AskSubmit::where('admin_id', $userId)
|
|
|
|
|
// ->where('project_id', $all['project_id'])
|
|
|
|
|
// ->where('date', 'like', '%' . date('Y-m') . '%')
|
|
|
|
|
// ->first();
|
|
|
|
|
// if ($has) return $this->error("每个月只能提交一次");
|
|
|
|
|
$has = AskSubmit::where('project_id', $all['project_id'])
|
|
|
|
|
->where('mobile', $all['mobile'])
|
|
|
|
|
->where('date', 'like', '%' . date('Y-m') . '%')
|
|
|
|
|
->first();
|
|
|
|
|
if ($has) return $this->error("每个月只能提交一次");
|
|
|
|
|
$content = [];
|
|
|
|
|
$socre = 0;
|
|
|
|
|
$askList = AskSubmit::$askList;
|
|
|
|
|
|