|
@@ -202,6 +202,7 @@ class Index extends Api
|
|
|
public function getInviteImg() {
|
|
|
// 获取用户的邀请码
|
|
|
$invitecode = \app\common\model\User::where(["id"=>$this->auth->id])->value("invite_no");
|
|
|
+// $invitecode = 'y0AnrH';
|
|
|
// 文字图片合成
|
|
|
$bigImgPath = httpurllocal('/assets/img/inviteimg.png');
|
|
|
$img = imagecreatefrompng($bigImgPath);
|
|
@@ -213,13 +214,13 @@ class Index extends Api
|
|
|
//字体颜色(RGB)
|
|
|
$black = imagecolorallocate($img, 217, 76, 41);
|
|
|
//字体大小
|
|
|
- $fontSize = 30;
|
|
|
+ $fontSize = 25;
|
|
|
//旋转角度
|
|
|
$circleSize = 0;
|
|
|
//左边距
|
|
|
- $left = 203;//383;
|
|
|
+ $left = 192;//383;
|
|
|
//上边距
|
|
|
- $top = 1110;//680;
|
|
|
+ $top = 1114;//680;
|
|
|
imagefttext($img, $fontSize, $circleSize, $left, $top, $black, $font, $invitecode);
|
|
|
$filename = date("YmdHis"). $this->auth->id . rand(10000, 99999) . ".jpeg";
|
|
|
$path = "/uploads/qrcode/".$filename;
|