作者 郭宇鹏
1 个管道 的构建 失败 耗费 1 秒

'0041'

@@ -90,7 +90,6 @@ class Treasured extends BaseApi @@ -90,7 +90,6 @@ class Treasured extends BaseApi
90 }) 90 })
91 */ 91 */
92 public function addTreasured(){ 92 public function addTreasured(){
93 - dd($this->auth->avatar);  
94 //1.验证用户权限 93 //1.验证用户权限
95 if ($this->auth->authlist == '' || $this->auth->authlist == ','){ 94 if ($this->auth->authlist == '' || $this->auth->authlist == ','){
96 $this->error('请您先实名认证'); 95 $this->error('请您先实名认证');
@@ -138,17 +137,13 @@ class Treasured extends BaseApi @@ -138,17 +137,13 @@ class Treasured extends BaseApi
138 if ($qr_code_bg && !empty($qr_code_bg['value'])){ 137 if ($qr_code_bg && !empty($qr_code_bg['value'])){
139 $code = new QRcode(); 138 $code = new QRcode();
140 $qr_code = $code->png($url.$treasured['id']) //生成二维码 139 $qr_code = $code->png($url.$treasured['id']) //生成二维码
141 - ->logo(ROOT_PATH.'public/assets/img/bg.png',4,1.97); //生成logo二维码  
142 - if (!empty($this->auth->avatar)){  
143 - $qr_code = $qr_code->logo($this->auth->avatar);//生成logo二维码  
144 - }  
145 - $qr_code = $qr_code->getPath();//获取二维码生成的地址 140 + ->logo(ROOT_PATH.'public/assets/img/bg.png',4,1.97) //生成logo二维码
  141 + ->logo($this->auth->avatar)//生成logo二维码
  142 + ->getPath();//获取二维码生成的地址
146 $qr_code_d = $code->png($url.$treasured['id']) //生成二维码 143 $qr_code_d = $code->png($url.$treasured['id']) //生成二维码
147 - ->logo(ROOT_PATH.'public/assets/img/bg.png',4,1.97); //生成logo二维码  
148 - if (!empty($this->auth->avatar)){  
149 - $qr_code_d = $qr_code_d->logo($this->auth->avatar);//生成logo二维码  
150 - }  
151 - $qr_code_d = $qr_code_d->background(550,950,cdnurl($qr_code_bg['value'])) //给二维码加上背景 144 + ->logo(ROOT_PATH.'public/assets/img/bg.png',4,1.97) //生成logo二维码
  145 + ->logo($this->auth->avatar)//生成logo二维码
  146 + ->background(550,950,cdnurl($qr_code_bg['value'])) //给二维码加上背景
152 ->getPath();//获取二维码生成的地址 147 ->getPath();//获取二维码生成的地址
153 //8.更新数据 148 //8.更新数据
154 $treasured->qr_code = $qr_code; 149 $treasured->qr_code = $qr_code;