| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- defined('ONLY_ONLY_ONLY') or exit('Access Denied');
- define('LOG_CATALOG',"loginById");
- try{
- $subSystem=intval(SUBSYS_PLAT_PCWEB);
- $loginInfo=bizPlater_getFELoginInfo(true);
- $loginName=$loginInfo["loginName"];
- $loginPwd=$loginInfo["loginPwd"];
- $hashedLoginPwd=bizPlater_cryptLoginPwd($loginPwd);
- $bizPlater=pdo_fetch("select * from base_user where deleted=0 and subsystem=:subsystem and `login_name`=:login_name and `login_pwd`=:login_pwd limit 1;",
- array(
- ":subsystem"=>intval($subSystem),
- ":login_name"=>trim($loginName),
- ":login_pwd"=>$hashedLoginPwd
- ));
- if(empty($bizPlater)) throw new GeneralException("","无此用户,或密码录入错误!");
- //获取当前用户的可用模块列表
- $feModuleSet=bizPlater_getModuleSet($bizPlater);
- $FOREND_TOKEN=base_buildForendToken($bizPlater);
- unset($bizPlater["login_pwd"]);
- $ajaxRes->Result=array(
- "forendToken"=>$FOREND_TOKEN,
- "navIcon" => $feModuleSet["navIcon"],
- "states" => $feModuleSet["states"],
- "mainRoleName"=>$feModuleSet["mainRoleName"],
- "bizUserInfo"=>$bizPlater,
- "undoList"=>$feModuleSet["undoList"],
- );
- }catch(Throwable $e){
- $friendMsg=get_class($e)=='GeneralException'?$e->friendmsg:$e->getMessage();
- throw new GeneralException("","登录异常:".$friendMsg,LOG_CATALOG,0,$e);
- }
|