分享链接和验证
Showing
1 changed file
with
5 additions
and
0 deletions
... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
3 | namespace App\Services; | 3 | namespace App\Services; |
4 | 4 | ||
5 | use App\Helper\CosHelper; | 5 | use App\Helper\CosHelper; |
6 | use App\Helper\ErrorCode; | ||
6 | use App\Helper\Response; | 7 | use App\Helper\Response; |
7 | use App\Models\Legal\Contract; | 8 | use App\Models\Legal\Contract; |
8 | use App\Models\Legal\PropertyShare; | 9 | use App\Models\Legal\PropertyShare; |
... | @@ -114,6 +115,10 @@ class PropertyTrackService extends Service | ... | @@ -114,6 +115,10 @@ class PropertyTrackService extends Service |
114 | */ | 115 | */ |
115 | public function shareCreate() | 116 | public function shareCreate() |
116 | { | 117 | { |
118 | if (!PropertyTrack::query()->where(['from'=>$this->request->input('from'), 'id'=>$this->request->input('track_id')])->first()) { | ||
119 | return Response::error(ErrorCode::SERVER_ERROR, '非法请求'); | ||
120 | } | ||
121 | |||
117 | $propertyConfig = config('musician.property'); | 122 | $propertyConfig = config('musician.property'); |
118 | $share = $propertyConfig['base_url'].uniqid(); | 123 | $share = $propertyConfig['base_url'].uniqid(); |
119 | $share_url_hash = crc64($share); | 124 | $share_url_hash = crc64($share); | ... | ... |
-
Please register or sign in to post a comment