|
@@ -213,6 +213,11 @@ class Index extends Api
|
|
|
* 获取邀请图片
|
|
|
*/
|
|
|
public function getInviteImg() {
|
|
|
+ if ($this->auth->reffer_img) {
|
|
|
+ $savepath = httpurllocal($this->auth->reffer_img);
|
|
|
+ $this->success("获取成功!", $savepath);
|
|
|
+ }
|
|
|
+
|
|
|
// 获取用户的邀请码
|
|
|
$invitecode = \app\common\model\User::where(["id"=>$this->auth->id])->value("invite_no");
|
|
|
// $invitecode = 'y0AnrH';
|
|
@@ -309,6 +314,9 @@ class Index extends Api
|
|
|
// header("Content-type: image/png");
|
|
|
// imagepng($background_iamge);exit;
|
|
|
$savepath = httpurllocal($path);
|
|
|
+ if ($this->auth->id) {
|
|
|
+ Db::name('user')->where(['id' => $this->auth->id])->setField('reffer_img', $path);
|
|
|
+ }
|
|
|
|
|
|
$this->success("获取成功!",$savepath);
|
|
|
}
|