Commit 05e8fa68 05e8fa68087718470291ac4966f34a2bbd91b263 by lemon

验证分享链接

1 parent 1b11d067
...@@ -182,7 +182,7 @@ class PropertyTrackService extends Service ...@@ -182,7 +182,7 @@ class PropertyTrackService extends Service
182 { 182 {
183 $url = $this->request->input('url'); 183 $url = $this->request->input('url');
184 184
185 if (!$res = PropertyShare::withTrashed()->where(['share_url_hash'=>crc64($url), 'from'=>$this->request->input('from')])->where('expire_time', '<=', $this->now)->first()) { 185 if (!$res = PropertyShare::withTrashed()->where(['share_url_hash'=>crc64($url), 'phone'=>$this->request->input('phone'), 'from'=>$this->request->input('from')])->where('expire_time', '<=', $this->now)->first()) {
186 return Response::error(ErrorCode::URL_CHECK_FAIL); 186 return Response::error(ErrorCode::URL_CHECK_FAIL);
187 } 187 }
188 if (!is_null($res->deleted_at)) return Response::error(ErrorCode::URL_CHECK_FAIL); 188 if (!is_null($res->deleted_at)) return Response::error(ErrorCode::URL_CHECK_FAIL);
......
...@@ -23,7 +23,7 @@ Route::group(["prefix"=>"property", "middleware"=>['auth.identifier']], function ...@@ -23,7 +23,7 @@ Route::group(["prefix"=>"property", "middleware"=>['auth.identifier']], function
23 23
24 Route::group(["prefix"=>"property"], function (){ 24 Route::group(["prefix"=>"property"], function (){
25 Route::get('/track/share', 'PropertyTrackController@share'); 25 Route::get('/track/share', 'PropertyTrackController@share');
26 Route::get('/track/shareCheck', 'PropertyTrackController@shareCheck'); 26 Route::post('/track/shareCheck', 'PropertyTrackController@shareCheck');
27 Route::get('/track/shareUser', 'PropertyTrackController@shareUser'); 27 Route::get('/track/shareUser', 'PropertyTrackController@shareUser');
28 Route::get('/track/shareFileType', 'PropertyTrackController@shareFileType'); 28 Route::get('/track/shareFileType', 'PropertyTrackController@shareFileType');
29 }); 29 });
......