作者 lyh

变更数据

@@ -177,7 +177,7 @@ class LoginController extends BaseController @@ -177,7 +177,7 @@ class LoginController extends BaseController
177 } 177 }
178 $wechat = new Wechat(); 178 $wechat = new Wechat();
179 $accessToken = $wechat->getAccessToken(); 179 $accessToken = $wechat->getAccessToken();
180 - $data = $wechat->setQrcode('global-v6_'.$this->param['type'].'_'.$this->param['id'],$accessToken); 180 + $data = $wechat->setQrcode('global-v6_'.$this->param['type'].'_'.$this->param['id'].'_'.($this->param['project_id'] ?? 0),$accessToken);
181 if(!empty($data) && isset($data['ticket'])){ 181 if(!empty($data) && isset($data['ticket'])){
182 $data['url'] = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=".$data['ticket']; 182 $data['url'] = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=".$data['ticket'];
183 } 183 }
@@ -313,7 +313,7 @@ class LoginController extends BaseController @@ -313,7 +313,7 @@ class LoginController extends BaseController
313 if($key[1] == 'login'){ 313 if($key[1] == 'login'){
314 $data = $userLoginLogic->wechatLogin($wechat); 314 $data = $userLoginLogic->wechatLogin($wechat);
315 }elseif($key[1] == 'bind'){ 315 }elseif($key[1] == 'bind'){
316 - $data = $userLoginLogic->wechatBind($wechat,$key[2]); 316 + $data = $userLoginLogic->wechatBind($wechat,$key[2],$key[3] ?? 0);
317 }else{ 317 }else{
318 $data = [ 318 $data = [
319 'code'=>0, 319 'code'=>0,
@@ -394,7 +394,7 @@ class UserLoginLogic @@ -394,7 +394,7 @@ class UserLoginLogic
394 * @method :post 394 * @method :post
395 * @time :2023/9/1 11:43 395 * @time :2023/9/1 11:43
396 */ 396 */
397 - public function wechatBind($wechat,$id){ 397 + public function wechatBind($wechat,$id,$project_id = 0){
398 $info = $this->model->read(['wechat'=>$wechat]); 398 $info = $this->model->read(['wechat'=>$wechat]);
399 if($info !== false){ 399 if($info !== false){
400 $data = [ 400 $data = [