作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

商户申请

... ... @@ -72,23 +72,18 @@ class Share extends WechatBase
*/
private function processing($url,$user,$type){
$user_id = $user['id'];
echo strpos($user['avatar'],'http');
if(strpos($user['avatar'],'http') === false){
echo "####";
}
exit();
//保存头像
if(strpos($user['avatar'],'https') === false || strpos($user['avatar'],'http') === false){
$avatar_url = ".".$user['avatar'];
$image = \think\Image::open($avatar_url);
$image->thumb(65, 65,\think\Image::THUMB_SCALING)->save($avatar_url);
}else{
$fileName = "avatar_$user_id";
$avatar=$this->getImage($user['avatar'],$fileName);
if($avatar['code']==1){
$this->error($avatar['msg']);
}
$avatar_url = "./uploads/avatar/avatar_$user_id.jpeg";
}else{
$avatar_url = ".".$user['avatar'];
$image = \think\Image::open($avatar_url);
$image->thumb(65, 65,\think\Image::THUMB_SCALING)->save($avatar_url);
}
$savePath = "./uploads/poster$type/";
if(!file_exists($savePath)){
... ...