修复:登录有问题
This commit is contained in:
parent
fde45653c9
commit
6638a77051
|
|
@ -129,12 +129,14 @@ class Login extends BaseModel{
|
|||
|
||||
// 承诺登录(需要同意承诺书后方可登录)
|
||||
public function promiseLogin($data){
|
||||
$data['wx_unionid'] = $data['wx_unionid'] ?? '';
|
||||
// 获取用户信息
|
||||
$info = (array)Db::name('member')
|
||||
->field('member_id,username, nickname, mobile, email, status, last_login_time, can_receive_registergift')
|
||||
->where(function($query) use ($data){
|
||||
$query->where('weapp_openid',$data['weapp_openid'])
|
||||
->whereOr('wx_unionid',$data['wx_unionid'] ?? '');
|
||||
if($data['weapp_openid'] && $data['wx_unionid']) $query->where('weapp_openid',$data['weapp_openid'])->whereOr('wx_unionid',$data['wx_unionid']);
|
||||
else if($data['weapp_openid']) $query->where('weapp_openid',$data['weapp_openid']);
|
||||
else if($data['wx_unionid']) $query->where('wx_unionid',$data['wx_unionid']);
|
||||
})
|
||||
->where('site_id',$data['site_id'])
|
||||
->where('is_delete',0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue