|
@@ -1396,7 +1396,7 @@ class User extends BaseController
|
|
|
$post = UtilService::getMore([
|
|
$post = UtilService::getMore([
|
|
|
['contract_id','0'], //合约id
|
|
['contract_id','0'], //合约id
|
|
|
['content',''], //评论内容
|
|
['content',''], //评论内容
|
|
|
- ['uid',0]
|
|
|
|
|
|
|
+// ['uid',0]
|
|
|
],$request);
|
|
],$request);
|
|
|
$uid = UtilService::getMore([
|
|
$uid = UtilService::getMore([
|
|
|
['uid', 0],
|
|
['uid', 0],
|
|
@@ -1404,13 +1404,18 @@ class User extends BaseController
|
|
|
$uid=$uid['uid'];
|
|
$uid=$uid['uid'];
|
|
|
// $uid = $post['uid'];
|
|
// $uid = $post['uid'];
|
|
|
$time=time();
|
|
$time=time();
|
|
|
- $info = (new UserContractRecordModel)->where("id",$post["contract_id"])->where('start_time','>',$time)->where('end_time','<',$time)->find();
|
|
|
|
|
|
|
+ $info = (new UserContractRecordModel)->where("id",$post["contract_id"])->find();
|
|
|
if (!empty($info)){
|
|
if (!empty($info)){
|
|
|
$info = $info->toArray();
|
|
$info = $info->toArray();
|
|
|
}
|
|
}
|
|
|
if ($info['status']!=1){
|
|
if ($info['status']!=1){
|
|
|
return app('json')->fail("只能在签约期间才能发表评论");
|
|
return app('json')->fail("只能在签约期间才能发表评论");
|
|
|
}
|
|
}
|
|
|
|
|
+ if (strtotime($info['start_time'])<$time||strtotime($info['end_time'])>$time){
|
|
|
|
|
+ return app('json')->fail("只能在签约期间才能发表评论");
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+// ->where('start_time','>',$time)->where('end_time','<',$time)
|
|
|
if(empty($info)){
|
|
if(empty($info)){
|
|
|
return app('json')->fail("没有签约中的合约");
|
|
return app('json')->fail("没有签约中的合约");
|
|
|
}
|
|
}
|