正在显示
1 个修改的文件
包含
9 行增加
和
5 行删除
@@ -73,12 +73,16 @@ class Share extends WechatBase | @@ -73,12 +73,16 @@ class Share extends WechatBase | ||
73 | private function processing($url,$user,$type){ | 73 | private function processing($url,$user,$type){ |
74 | $user_id = $user['id']; | 74 | $user_id = $user['id']; |
75 | //保存头像 | 75 | //保存头像 |
76 | - $fileName = "avatar_$user_id"; | ||
77 | - $avatar=$this->getImage($user['avatar'],$fileName); | ||
78 | - if($avatar['code']==1){ | ||
79 | - $this->error($avatar['msg']); | 76 | + if(stripos($user['avatar'],'http')){ |
77 | + $fileName = "avatar_$user_id"; | ||
78 | + $avatar=$this->getImage($user['avatar'],$fileName); | ||
79 | + if($avatar['code']==1){ | ||
80 | + $this->error($avatar['msg']); | ||
81 | + } | ||
82 | + $avatar_url = "./uploads/avatar/avatar_$user_id.jpeg"; | ||
83 | + }else{ | ||
84 | + $avatar_url = $user['avatar']; | ||
80 | } | 85 | } |
81 | - $avatar_url = "./uploads/avatar/avatar_$user_id.jpeg"; | ||
82 | $savePath = "./uploads/poster$type/"; | 86 | $savePath = "./uploads/poster$type/"; |
83 | if(!file_exists($savePath)){ | 87 | if(!file_exists($savePath)){ |
84 | mkdir ($savePath,0777,true); | 88 | mkdir ($savePath,0777,true); |
-
请 注册 或 登录 后发表评论