作者 lyh

变更数据

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