Commit ed51d0e3 ed51d0e343b424d8bd5b0117586997470927bb92 by lemon

*

1 parent bda6f6ac
......@@ -3,6 +3,7 @@
namespace App\Http;
use App\Http\Middleware\AuthIdentifier;
use App\Http\Middleware\AuthShare;
use Fruitcake\Cors\HandleCors;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
use Illuminate\Routing\Middleware\ThrottleRequests;
......
<?php
namespace App\Models\Legal;
use App\Models\BaseModel;
/**
* Class PropertyShareVerification
* @package App\Models\Legal
*/
class PropertyShareVerification extends BaseModel
{
protected $updated_at = false;
protected $guarded = [];
}
......@@ -5,6 +5,7 @@ namespace App\Services;
use App\Helper\CosHelper;
use App\Helper\Response;
use App\Models\Legal\Contract;
use App\Models\Legal\PropertyShareVerification;
use App\Models\Legal\PropertyTrack;
use App\Models\Legal\PropertyTrackFile;
use App\Models\Legal\StakeholderContract;
......@@ -82,15 +83,26 @@ class PropertyTrackService extends Service
}
/**
* 资产歌曲-分享页面常量
* 资产歌曲-分享页面当前最新分享信息
* @return \Illuminate\Http\JsonResponse
*/
public function constant()
public function share()
{
$config = [
'valid_day'=>config('musician.property')['valid_day'], //有效期天数
$data = [
'config'=>[
'valid_day' => config('musician.property')['valid_day'], //有效期天数
],
'phone' => '',
'share_url' => '',
'expire_time' => '',
];
return Response::success(['config'=>$config]);
if ($share = PropertyShareVerification::query()->where(['pf_id'=>$this->request->input('pf_id')])->orderByDesc('id')->first()) {
$data['phone'] = $share->phone;
$data['share_url'] = $share->share_url;
$data['expire_time']= $share->expire_time;
}
return Response::success($data);
}
}
......
......@@ -21,7 +21,7 @@ Route::group(["prefix"=>"property", "middleware"=>['auth.identifier']], function
});
Route::group(["prefix"=>"property"], function (){
Route::get('/share/constant', 'PropertyTrackController@constant');
Route::get('/track/share', 'PropertyTrackController@share');
});
//资产-分享链接
......