正在显示
1 个修改的文件
包含
8 行增加
和
3 行删除
@@ -986,15 +986,20 @@ class SecondController extends RestBaseController | @@ -986,15 +986,20 @@ class SecondController extends RestBaseController | ||
986 | $userId=$this->getUserId(); | 986 | $userId=$this->getUserId(); |
987 | $User=new VolunteerModel(); | 987 | $User=new VolunteerModel(); |
988 | $user=$User->where('user_id',$userId)->find()->toArray(); | 988 | $user=$User->where('user_id',$userId)->find()->toArray(); |
989 | - dump($user); | 989 | + //dump($user); |
990 | + $path='../upload/zhengjian/'; | ||
990 | $info['photo']=explode('https://volunteer.cnpu.org',$user['photo']); | 991 | $info['photo']=explode('https://volunteer.cnpu.org',$user['photo']); |
991 | - dump($info); | ||
992 | $path1=ROOT_PATH.'public/imgs/font.png'; | 992 | $path1=ROOT_PATH.'public/imgs/font.png'; |
993 | $path2=ROOT_PATH.'public'.DS.$info['photo'][1]; | 993 | $path2=ROOT_PATH.'public'.DS.$info['photo'][1]; |
994 | dump($path1); | 994 | dump($path1); |
995 | dump($path2); | 995 | dump($path2); |
996 | $image1 =\think\Image::open($path1); | 996 | $image1 =\think\Image::open($path1); |
997 | - $image2 =\think\Image::open($path2); | 997 | + $image2 =\think\Image::open($path2)->thumb('225',310,\think\Image::THUMB_CENTER)->save('../upload/user/'.$userId.'.png'); |
998 | + $photo=''; | ||
999 | + $photo_local[]=430; | ||
1000 | + $photo_local[]=62; | ||
1001 | + $image1->water('../upload/user/'.$userId.'.png',$photo_local) | ||
1002 | + ->save($path.$userId.'.png'); | ||
998 | //$image2->thumb(430,62); | 1003 | //$image2->thumb(430,62); |
999 | } | 1004 | } |
1000 | /** | 1005 | /** |
-
请 注册 或 登录 后发表评论