Commit 90015098 by chenjinjing

no message

parent 779b9d09
<config>
<port>9099</port>
<sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign>
<dbServer>http://192.168.0.71:40012</dbServer>
<dbServer>http://192.168.0.105:40012</dbServer>
</config>
\ No newline at end of file
......@@ -21,9 +21,12 @@ import moment = require("moment");
//==登录登出
export async function enterpriseLogin(phone:string, pwd:string) {
//企业用户表没有存uscc字段,先查询到企业eId,然后到用户表查询密码判断是否登录成功
export async function enterpriseLogin(uscc:string, pwd:string) {
let dbInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {uscc}, ["eId"]);
let filesList = ["userName", "eId", "pwd", "uId"];
let enterpriseInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业用户表, {phone}, filesList);
let enterpriseInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业用户表, {eId:dbInfo.eId}, filesList);
if (!enterpriseInfo || !enterpriseInfo.eId) {
throw new BizError(ERRORENUM.账号或密码错误);
......@@ -560,7 +563,7 @@ export async function enterpriseQualificationInfo(eId) {
return {dataInfo:addInfo};
}
qualificationInfo.goPublicSector = JSON.parse(qualificationInfo.goPublicSector);
if (qualificationInfo.goPublicSector) qualificationInfo.goPublicSector = JSON.parse(qualificationInfo.goPublicSector);
let resultInfo:any = extractData(EnterpriseQualificationInfoResConfig, qualificationInfo);
resultInfo.kxTime= new Date(resultInfo.kxTime).valueOf();
......
......@@ -557,8 +557,8 @@ async function originateDel(req, res) {
* @param res
*/
async function login(req, res) {
let {phone, pwd } = req.body
let result = await enterpriseInfoBiz.enterpriseLogin(phone, pwd );
let {uscc, pwd } = req.body
let result = await enterpriseInfoBiz.enterpriseLogin(uscc, pwd );
res.success(result);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment