|
|
@@ -1407,20 +1407,20 @@ class User extends BaseController
|
|
|
$info = (new UserContractRecordModel)->where("id",$post["contract_id"])->find();
|
|
|
if (!empty($info)){
|
|
|
$info = $info->toArray();
|
|
|
+ }else{
|
|
|
+ return app('json')->fail("没有签约中的合约");
|
|
|
}
|
|
|
if ($info['status']!=1){
|
|
|
return app('json')->fail("只有签约状态才能发表评论");
|
|
|
}
|
|
|
// var_dump($time);
|
|
|
// var_dump($info);die();
|
|
|
- if ($info['start_time']<$time||$info['end_time']>$time){
|
|
|
+ if ($info['start_time']>$time||$info['end_time']<$time){
|
|
|
return app('json')->fail("只能在签约期间才能发表评论");
|
|
|
|
|
|
}
|
|
|
// ->where('start_time','>',$time)->where('end_time','<',$time)
|
|
|
- if(empty($info)){
|
|
|
- return app('json')->fail("没有签约中的合约");
|
|
|
- }
|
|
|
+
|
|
|
// 检查签约时间是否为空
|
|
|
// if (empty($post['id'])) {
|
|
|
// return app('json')->fail("签字错误");
|