|
|
@@ -10,11 +10,18 @@ use think\facade\Db;
|
|
|
|
|
|
class MasterWorkerAgreeLogic extends BaseLogic
|
|
|
{
|
|
|
- public static function getAgreeByType($type)
|
|
|
+ public static function getAgreeByType($type,$userId)
|
|
|
{
|
|
|
+
|
|
|
+ //服务合作协议是否存在pdf
|
|
|
+ if($type=='master_service'){
|
|
|
+ $pdf = MasterWorkerAgree::where(['agree_type'=>'master_service_content','worker_id'=>$userId])->value('pdf_url');
|
|
|
+ }
|
|
|
+
|
|
|
return [
|
|
|
'title' => ConfigService::get('master_agreement', $type . '_title', ''),
|
|
|
'content' => ConfigService::get('master_agreement', $type . '_content', ''),
|
|
|
+ 'pdf'=>!empty($pdf)?'https://'.$_SERVER['SERVER_NAME'].'/'.$pdf:''
|
|
|
];
|
|
|
}
|
|
|
|