|
|
@ -27,14 +27,14 @@ class IndexController extends \Think\Controller{
|
|
|
|
$map['account']=I('post.account');
|
|
|
|
$map['account']=I('post.account');
|
|
|
|
$find=M('BusinessAffairs','tab_')->field('id,password')->where($map)->find();
|
|
|
|
$find=M('BusinessAffairs','tab_')->field('id,password')->where($map)->find();
|
|
|
|
if(null==$find){
|
|
|
|
if(null==$find){
|
|
|
|
$this->ajaxReturn(array('status'=>-1,'msg'=>'账号不存在或被禁用!'));
|
|
|
|
$this->ajaxReturn(array('status'=>-1,'msg'=>'账号或密码错误!'));
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
$User = new UserApi;
|
|
|
|
$User = new UserApi;
|
|
|
|
if($find['password'] ==$this->think_ucenter_md5(I('post.pwd'), UC_AUTH_KEY)){
|
|
|
|
if($find['password'] ==$this->think_ucenter_md5(I('post.pwd'), UC_AUTH_KEY)){
|
|
|
|
$this->save_login($find['id'],I('post.account'));
|
|
|
|
$this->save_login($find['id'],I('post.account'));
|
|
|
|
$this->ajaxReturn(array('status'=>1,'msg'=>'登录成功'));
|
|
|
|
$this->ajaxReturn(array('status'=>1,'msg'=>'登录成功'));
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
$this->ajaxReturn(array('status'=>-1,'msg'=>'密码错误'));
|
|
|
|
$this->ajaxReturn(array('status'=>-1,'msg'=>'账号或密码错误!'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -82,6 +82,7 @@ class IndexController extends \Think\Controller{
|
|
|
|
'account' => $account,
|
|
|
|
'account' => $account,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
session('user_auth_commerce', $auth);
|
|
|
|
session('user_auth_commerce', $auth);
|
|
|
|
|
|
|
|
session_regenerate_id();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|