| | |
| | | $this->seo("login"); |
| | | $this->yun_tpl(array('index')); |
| | | } |
| | | |
| | | //登录验证 |
| | | function loginsave_action(){ |
| | | |
| | | |
| | | $Member = $this->MODEL('userinfo'); |
| | | |
| | | $lData['username'] = $_POST['username']; |
| | | $lData['uid'] = $this->uid; |
| | | $lData['usertype'] = $this->usertype; |
| | |
| | | } |
| | | |
| | | } |
| | | //登录短信验证码发送 |
| | | function sendmsg_action() |
| | | { |
| | | |
| | | /** |
| | | * 登录短信验证码发送 |
| | | * @return void |
| | | */ |
| | | function sendmsg_action() { |
| | | $noticeM = $this->MODEL('notice'); |
| | | $result = $noticeM->jycheck($_POST['code'],'前台登录'); |
| | | if(!empty($result)){ |
| | | $this->layer_msg($result['msg'], 9, 0, '', 2, $result['error']); |
| | | } |
| | | $moblie = $_POST['moblie']; |
| | | $UserinfoM = $this->MODEL('userinfo'); |
| | | $userinfo = $UserinfoM->getInfo(array("moblie" => $moblie),array('field'=>"`usertype`,`uid`")); |
| | | $moblie = $_POST['moblie']; // 获取手机号码参数 |
| | | $UserinfoM = $this->MODEL('userinfo'); // 获取用户模型 |
| | | $userinfo = $UserinfoM->getInfo(array("moblie" => $moblie), array('field' => "`usertype`,`uid`"));// 获取用户信息 |
| | | |
| | | if ($this->config['sy_reg_type'] == 2 && empty($userinfo)){ |
| | | |
| | | $result = array( |
| | | 'error' => 2, |
| | | 'msg' => '请先注册账号' |
| | |
| | | 'uid' => $userinfo['uid'], |
| | | 'usertype' => $userinfo['usertype'] |
| | | ); |
| | | |
| | | $result = $noticeM->sendCode($moblie, 'login', 1, $user, 6, 90, 'msg'); |
| | | $result = $noticeM->sendCode($moblie, 'login', 1, $user, 6, 90, 'msg'); // 发送短信验证码 |
| | | } |
| | | |
| | | echo json_encode($result);exit(); |
| | | echo json_encode($result); |
| | | exit(); |
| | | } |
| | | |
| | | function rest_action(){ |
| | | $this->cookie->unset_cookie(); |
| | | $url = Url("login",array("usertype"=>"1"),"1"); |
| | | header("Location: ".$url); |
| | | } |
| | | |
| | | function utype_action(){ |
| | | if($this->uid){ |
| | | header("Location:".$this->config['sy_weburl']."/member"); |
| | |
| | | |
| | | function setutype_action(){ |
| | | //验证前期保存的登录数据,是否在本系统有存在并且密码对应 |
| | | if($_COOKIE['username'] && $_COOKIE['password'] && (CheckRegUser($_COOKIE['username']) OR CheckRegEmail($_COOKIE['username'])==false)){ |
| | | if ($_COOKIE['username'] && $_COOKIE['password'] && (CheckRegUser($_COOKIE['username']) or CheckRegEmail($_COOKIE['username']) == false)) { |
| | | //无usertype情况下 才予以激活 否则直接登录会员中心 |
| | | $Member=$this->MODEL("userinfo"); |
| | | $user = $Member->getInfo(array("username"=>$_COOKIE['username']),array("field"=>"`uid`,`username`,`password`,`salt`,`usertype,did`")); |
| | |
| | | } |
| | | |
| | | //微信登录 |
| | | function wxlogin_action() |
| | | { |
| | | function wxlogin_action() { |
| | | |
| | | $wxloginid = isset($_COOKIE['wxloginid']) ? $_COOKIE['wxloginid'] : ''; |
| | | $WxM = $this->MODEL('weixin'); |
| | |
| | | } |
| | | } |
| | | |
| | | function getwxloginstatus_action() |
| | | { |
| | | function getwxloginstatus_action() { |
| | | if ($_COOKIE['wxloginid']) { |
| | | |
| | | $WxM = $this->MODEL('weixin'); |
| | |
| | | $this->layer_msg($return['msg']); |
| | | } |
| | | } |
| | | |
| | | function balogin_action(){ |
| | | |
| | | if ($_POST['provider'] == 'weixin'){ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 微信扫码后,后台设置实名验证,需绑定手机号后再自动注册账号 |
| | | */ |
| | |
| | | $arr['msg'] = $return['msg']; |
| | | $arr['status'] = 8; |
| | | } |
| | | echo json_encode($arr);die; |
| | | echo json_encode($arr); |
| | | die; |
| | | } |
| | | } |