...
|
...
|
@@ -986,15 +986,20 @@ class SecondController extends RestBaseController |
|
|
$userId=$this->getUserId();
|
|
|
$User=new VolunteerModel();
|
|
|
$user=$User->where('user_id',$userId)->find()->toArray();
|
|
|
dump($user);
|
|
|
//dump($user);
|
|
|
$path='../upload/zhengjian/';
|
|
|
$info['photo']=explode('https://volunteer.cnpu.org',$user['photo']);
|
|
|
dump($info);
|
|
|
$path1=ROOT_PATH.'public/imgs/font.png';
|
|
|
$path2=ROOT_PATH.'public'.DS.$info['photo'][1];
|
|
|
dump($path1);
|
|
|
dump($path2);
|
|
|
$image1 =\think\Image::open($path1);
|
|
|
$image2 =\think\Image::open($path2);
|
|
|
$image2 =\think\Image::open($path2)->thumb('225',310,\think\Image::THUMB_CENTER)->save('../upload/user/'.$userId.'.png');
|
|
|
$photo='';
|
|
|
$photo_local[]=430;
|
|
|
$photo_local[]=62;
|
|
|
$image1->water('../upload/user/'.$userId.'.png',$photo_local)
|
|
|
->save($path.$userId.'.png');
|
|
|
//$image2->thumb(430,62);
|
|
|
}
|
|
|
/**
|
...
|
...
|
|