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

商户申请

... ... @@ -73,12 +73,16 @@ class Share extends WechatBase
private function processing($url,$user,$type){
$user_id = $user['id'];
//保存头像
$fileName = "avatar_$user_id";
$avatar=$this->getImage($user['avatar'],$fileName);
if($avatar['code']==1){
$this->error($avatar['msg']);
if(stripos($user['avatar'],'http')){
$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'];
}
$avatar_url = "./uploads/avatar/avatar_$user_id.jpeg";
$savePath = "./uploads/poster$type/";
if(!file_exists($savePath)){
mkdir ($savePath,0777,true);
... ...