Commit ead1e8ce ead1e8ce1c6faed4097449e9828722dd31781a61 by lemon

*

1 parent c5de4bbc
......@@ -206,9 +206,20 @@ class PropertyTrackService extends Service
{
$url = $this->request->input('url');
if (!$res = PropertyShare::withTrashed()->where(['share_url_hash'=>crc64($url), 'phone'=>$this->request->input('phone')])->where('expire_time', '>', $this->now)->first()) {
if (!$res = PropertyShare::withTrashed()->where(['share_url_hash'=>crc64($url)])->first()) {
return Response::error(ErrorCode::URL_FAIL);
}
if ($this->now > $res->expire_time) {
//过期
return Response::error(ErrorCode::URL_EXPIRE);
}
if ($res->phone != $this->request->input('phone')) {
return Response::error(ErrorCode::URL_CHECK_FAIL);
}
if (!is_null($res->deleted_at)) return Response::error(ErrorCode::URL_CHECK_FAIL);
......