Commit ed51d0e3 ed51d0e343b424d8bd5b0117586997470927bb92 by lemon

*

1 parent bda6f6ac
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
3 namespace App\Http; 3 namespace App\Http;
4 4
5 use App\Http\Middleware\AuthIdentifier; 5 use App\Http\Middleware\AuthIdentifier;
6 use App\Http\Middleware\AuthShare;
6 use Fruitcake\Cors\HandleCors; 7 use Fruitcake\Cors\HandleCors;
7 use Illuminate\Foundation\Http\Kernel as HttpKernel; 8 use Illuminate\Foundation\Http\Kernel as HttpKernel;
8 use Illuminate\Routing\Middleware\ThrottleRequests; 9 use Illuminate\Routing\Middleware\ThrottleRequests;
......
1 <?php
2
3 namespace App\Models\Legal;
4
5 use App\Models\BaseModel;
6
7 /**
8 * Class PropertyShareVerification
9 * @package App\Models\Legal
10 */
11 class PropertyShareVerification extends BaseModel
12 {
13 protected $updated_at = false;
14 protected $guarded = [];
15 }
...@@ -5,6 +5,7 @@ namespace App\Services; ...@@ -5,6 +5,7 @@ namespace App\Services;
5 use App\Helper\CosHelper; 5 use App\Helper\CosHelper;
6 use App\Helper\Response; 6 use App\Helper\Response;
7 use App\Models\Legal\Contract; 7 use App\Models\Legal\Contract;
8 use App\Models\Legal\PropertyShareVerification;
8 use App\Models\Legal\PropertyTrack; 9 use App\Models\Legal\PropertyTrack;
9 use App\Models\Legal\PropertyTrackFile; 10 use App\Models\Legal\PropertyTrackFile;
10 use App\Models\Legal\StakeholderContract; 11 use App\Models\Legal\StakeholderContract;
...@@ -82,15 +83,26 @@ class PropertyTrackService extends Service ...@@ -82,15 +83,26 @@ class PropertyTrackService extends Service
82 } 83 }
83 84
84 /** 85 /**
85 * 资产歌曲-分享页面常量 86 * 资产歌曲-分享页面当前最新分享信息
86 * @return \Illuminate\Http\JsonResponse 87 * @return \Illuminate\Http\JsonResponse
87 */ 88 */
88 public function constant() 89 public function share()
89 { 90 {
90 $config = [ 91 $data = [
91 'valid_day'=>config('musician.property')['valid_day'], //有效期天数 92 'config'=>[
93 'valid_day' => config('musician.property')['valid_day'], //有效期天数
94 ],
95 'phone' => '',
96 'share_url' => '',
97 'expire_time' => '',
92 ]; 98 ];
93 99
94 return Response::success(['config'=>$config]); 100 if ($share = PropertyShareVerification::query()->where(['pf_id'=>$this->request->input('pf_id')])->orderByDesc('id')->first()) {
101 $data['phone'] = $share->phone;
102 $data['share_url'] = $share->share_url;
103 $data['expire_time']= $share->expire_time;
104 }
105
106 return Response::success($data);
95 } 107 }
96 } 108 }
......
...@@ -21,7 +21,7 @@ Route::group(["prefix"=>"property", "middleware"=>['auth.identifier']], function ...@@ -21,7 +21,7 @@ Route::group(["prefix"=>"property", "middleware"=>['auth.identifier']], function
21 }); 21 });
22 22
23 Route::group(["prefix"=>"property"], function (){ 23 Route::group(["prefix"=>"property"], function (){
24 Route::get('/share/constant', 'PropertyTrackController@constant'); 24 Route::get('/track/share', 'PropertyTrackController@share');
25 }); 25 });
26 26
27 //资产-分享链接 27 //资产-分享链接
......