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

我的分享

... ... @@ -47,6 +47,7 @@ class Share extends WechatBase
}
public function get_poster(){
$domain_name = $this->request->domain();//域名
$user_id = $this->request->param('user_id',0,'intval');
$type = $this->request->param('type',0,'intval');
if(empty($user_id) || empty($type)){
... ... @@ -60,7 +61,7 @@ class Share extends WechatBase
$code_img = $this->get_code_img($user_id);
//图像处理
$url = $this->processing($code_img,$user,$type);
$this->success('SUCCESS','',['url'=>$url]);
$this->success('SUCCESS','',['url'=>$domain_name.$url]);
}
/**
... ... @@ -95,7 +96,7 @@ class Share extends WechatBase
->water($url,[212,622],100)
->save($savePath."poster_$user[id].png");
}
return "./uploads/poster$type/poster_$user[id].png";
return "/uploads/poster$type/poster_$user[id].png";
}
/**
... ...