Commit ead1e8ce ead1e8ce1c6faed4097449e9828722dd31781a61 by lemon

*

1 parent c5de4bbc
...@@ -206,9 +206,20 @@ class PropertyTrackService extends Service ...@@ -206,9 +206,20 @@ class PropertyTrackService extends Service
206 { 206 {
207 $url = $this->request->input('url'); 207 $url = $this->request->input('url');
208 208
209 if (!$res = PropertyShare::withTrashed()->where(['share_url_hash'=>crc64($url), 'phone'=>$this->request->input('phone')])->where('expire_time', '>', $this->now)->first()) { 209 if (!$res = PropertyShare::withTrashed()->where(['share_url_hash'=>crc64($url)])->first()) {
210 return Response::error(ErrorCode::URL_FAIL);
211 }
212
213 if ($this->now > $res->expire_time) {
214 //过期
215 return Response::error(ErrorCode::URL_EXPIRE);
216 }
217
218 if ($res->phone != $this->request->input('phone')) {
210 return Response::error(ErrorCode::URL_CHECK_FAIL); 219 return Response::error(ErrorCode::URL_CHECK_FAIL);
211 } 220 }
221
222
212 if (!is_null($res->deleted_at)) return Response::error(ErrorCode::URL_CHECK_FAIL); 223 if (!is_null($res->deleted_at)) return Response::error(ErrorCode::URL_CHECK_FAIL);
213 224
214 225
......