|
@@ -24,6 +24,7 @@ class loginControl extends mobileHomeControl
|
|
{
|
|
{
|
|
const mobile_login = 1;
|
|
const mobile_login = 1;
|
|
const wxopen_login = 2;
|
|
const wxopen_login = 2;
|
|
|
|
+ const wxunion_login = 3;
|
|
|
|
|
|
//客户登录身份类型
|
|
//客户登录身份类型
|
|
protected $client_login_type_array = array(0, 1, 2);
|
|
protected $client_login_type_array = array(0, 1, 2);
|
|
@@ -99,38 +100,41 @@ class loginControl extends mobileHomeControl
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
+ $loginner->register($user_info,session_helper::relay_id());
|
|
|
|
+
|
|
$user_info['openid'] = '';
|
|
$user_info['openid'] = '';
|
|
$_SESSION['wx_author']['user_info'] = $user_info;
|
|
$_SESSION['wx_author']['user_info'] = $user_info;
|
|
$_SESSION['wx_author']['handled'] = false;
|
|
$_SESSION['wx_author']['handled'] = false;
|
|
|
|
+
|
|
return self::outsuccess(['ismember' => false,'isauthor' => true]);
|
|
return self::outsuccess(['ismember' => false,'isauthor' => true]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private function is_special($mobile,$code)
|
|
|
|
+ {
|
|
|
|
+ if($mobile == '13700000000' && $code == '1111') {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ else if($mobile == '13800000000' && $code == '1111') {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ else if($mobile == '13900000000' && $code == '1111') {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
public function bind_mobileOp()
|
|
public function bind_mobileOp()
|
|
{
|
|
{
|
|
$mobile = trim($_GET['mobile']);
|
|
$mobile = trim($_GET['mobile']);
|
|
$code = trim($_GET['code']);
|
|
$code = trim($_GET['code']);
|
|
|
|
|
|
- if($mobile == '13700000000' && $code == '1111')
|
|
|
|
- {
|
|
|
|
- if(login_helper::onBinded($mobile,$code,0,false)) {
|
|
|
|
- return self::outsuccess(['ismember' => true,'isauthor' => true,
|
|
|
|
- 'member_id' => $_SESSION['member_id'],
|
|
|
|
- 'HPHPSESSID' => $_SESSION['MPHPSESSID'],'userinfo' => $this->userinfo()]);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if($mobile == '13800000000' && $code == '1111')
|
|
|
|
- {
|
|
|
|
- if(login_helper::onBinded($mobile,$code,0,false)) {
|
|
|
|
- return self::outsuccess(['ismember' => true,'isauthor' => true,
|
|
|
|
- 'member_id' => $_SESSION['member_id'],
|
|
|
|
- 'HPHPSESSID' => $_SESSION['MPHPSESSID'],'userinfo' => $this->userinfo()]);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if($mobile == '13900000000' && $code == '1111')
|
|
|
|
|
|
+ if($this->is_special($mobile,$code))
|
|
{
|
|
{
|
|
- if(login_helper::onBinded($mobile,$code,0,false)) {
|
|
|
|
|
|
+ if(login_helper::onBinded($mobile,$code,0,false))
|
|
|
|
+ {
|
|
return self::outsuccess(['ismember' => true,'isauthor' => true,
|
|
return self::outsuccess(['ismember' => true,'isauthor' => true,
|
|
'member_id' => $_SESSION['member_id'],
|
|
'member_id' => $_SESSION['member_id'],
|
|
'HPHPSESSID' => $_SESSION['MPHPSESSID'],'userinfo' => $this->userinfo()]);
|
|
'HPHPSESSID' => $_SESSION['MPHPSESSID'],'userinfo' => $this->userinfo()]);
|
|
@@ -152,6 +156,14 @@ class loginControl extends mobileHomeControl
|
|
return self::outerr($ret['code'], $ret['msg']);
|
|
return self::outerr($ret['code'], $ret['msg']);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ $loginner = new login\mobile_log($mobile);
|
|
|
|
+ if($loginner->ismember()) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
if(login_helper::onBinded($mobile,$code,session_helper::relay_id(),false)) {
|
|
if(login_helper::onBinded($mobile,$code,session_helper::relay_id(),false)) {
|
|
$isauthor = empty($_SESSION['member_wxunionid']) ? false : true;
|
|
$isauthor = empty($_SESSION['member_wxunionid']) ? false : true;
|
|
return self::outsuccess(['ismember' => true,'isauthor' => $isauthor,'member_id' => $_SESSION['member_id'],'HPHPSESSID' => $_SESSION['MPHPSESSID'],'userinfo' => $this->userinfo()]);
|
|
return self::outsuccess(['ismember' => true,'isauthor' => $isauthor,'member_id' => $_SESSION['member_id'],'HPHPSESSID' => $_SESSION['MPHPSESSID'],'userinfo' => $this->userinfo()]);
|