|
@@ -5,7 +5,7 @@ namespace app\api\controller;
|
|
use app\common\controller\Api;
|
|
use app\common\controller\Api;
|
|
use think\Db;
|
|
use think\Db;
|
|
/**
|
|
/**
|
|
- * 用户推荐
|
|
|
|
|
|
+ * 代理邀请中心
|
|
*/
|
|
*/
|
|
class Userintro extends Api
|
|
class Userintro extends Api
|
|
{
|
|
{
|
|
@@ -15,8 +15,8 @@ class Userintro extends Api
|
|
|
|
|
|
//生成我的视频海报
|
|
//生成我的视频海报
|
|
//生成邀请码二维码图片
|
|
//生成邀请码二维码图片
|
|
- public function inviteimage() {
|
|
|
|
- $params['text'] = config('h5register_url') . $this->auth->introcode;
|
|
|
|
|
|
+ public function introimage() {
|
|
|
|
+ $params['text'] = config('h5register_url') .'?intro_no='. $this->auth->introcode;
|
|
$qrcode_service = \addons\qrcode\library\Service::qrcode($params);
|
|
$qrcode_service = \addons\qrcode\library\Service::qrcode($params);
|
|
|
|
|
|
$qrcodePath = ROOT_PATH . 'public/uploads/hbplayer/'.date('Ymd');
|
|
$qrcodePath = ROOT_PATH . 'public/uploads/hbplayer/'.date('Ymd');
|
|
@@ -24,7 +24,7 @@ class Userintro extends Api
|
|
@mkdir($qrcodePath);
|
|
@mkdir($qrcodePath);
|
|
}
|
|
}
|
|
if (is_really_writable($qrcodePath)) {
|
|
if (is_really_writable($qrcodePath)) {
|
|
- $filename = $this->auth->introcode . '.png';
|
|
|
|
|
|
+ $filename = 'intro_'.$this->auth->introcode . '.png';
|
|
$filePath = $qrcodePath .'/'. $filename;
|
|
$filePath = $qrcodePath .'/'. $filename;
|
|
$qrcode_service->writeFile($filePath);
|
|
$qrcode_service->writeFile($filePath);
|
|
}
|
|
}
|
|
@@ -34,7 +34,7 @@ class Userintro extends Api
|
|
|
|
|
|
//生成视频分享海报
|
|
//生成视频分享海报
|
|
public function shareposter() {
|
|
public function shareposter() {
|
|
- $inviteimage = $this->inviteimage();
|
|
|
|
|
|
+ $inviteimage = $this->introimage();
|
|
|
|
|
|
$data = [
|
|
$data = [
|
|
[
|
|
[
|
|
@@ -71,9 +71,9 @@ class Userintro extends Api
|
|
}
|
|
}
|
|
$imgurl = $_SERVER["REQUEST_SCHEME"]."://".$_SERVER["HTTP_HOST"] . '/' . $imgurl;
|
|
$imgurl = $_SERVER["REQUEST_SCHEME"]."://".$_SERVER["HTTP_HOST"] . '/' . $imgurl;
|
|
|
|
|
|
- echo '<html><body><img src="'.$imgurl.'"></body></html>';
|
|
|
|
|
|
+ //echo '<html><body><img src="'.$imgurl.'"></body></html>';
|
|
|
|
|
|
- //$this->success('', $imgurl);
|
|
|
|
|
|
+ $this->success('', $imgurl);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -108,8 +108,7 @@ class Userintro extends Api
|
|
$user_list = Db::name('user')->field('id,username,nickname,mobile,avatar,createtime')->where('intro_uid',$this->auth->id)->limit(3)->select();
|
|
$user_list = Db::name('user')->field('id,username,nickname,mobile,avatar,createtime')->where('intro_uid',$this->auth->id)->limit(3)->select();
|
|
|
|
|
|
$rs = [
|
|
$rs = [
|
|
- 'introsite_activeinfo' => config('site.introsite_activeinfo'),
|
|
|
|
- 'introsite_introrule' => config('site.introsite_introrule'),
|
|
|
|
|
|
+
|
|
'introcode' => $this->auth->introcode,
|
|
'introcode' => $this->auth->introcode,
|
|
'user_list' => $user_list,
|
|
'user_list' => $user_list,
|
|
'money_sum_thisweek' => $money_sum_thisweek,
|
|
'money_sum_thisweek' => $money_sum_thisweek,
|