Commit bc9c2ec5 by lixinming

no message

parent d4102f4d
......@@ -13,7 +13,14 @@ const moment = require("moment");
function checkLeader(partyPositionsNames) {
for (let i = 0; i < partyPositionsNames.length; i++) {
if (partyPositionsNames[i] >= PARTYPOSITIONS.党总支书记) return true;
if (partyPositionsNames[i] >= PARTYPOSITIONS.支部书记) return true;
}
return false
}
function checkDWLeader(partyPositionsNames) {
for (let i = 0; i < partyPositionsNames.length; i++) {
if (partyPositionsNames[i] >= PARTYPOSITIONS.党总支书记 && partyPositionsNames[i] <= PARTYPOSITIONS.党总支纪检委员) return true;
}
return false
}
......@@ -35,6 +42,9 @@ export async function login(loginId:string, pwd:string) {
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.党员基础信息表, updateLogin, {loginId});
let userType = checkLeader(JSON.parse(loginInfo.partyPositionsName) ) ? 2 : 1;
if (checkDWLeader(JSON.parse(loginInfo.partyPositionsName)) ) userType = 3;
return {
userid: loginInfo.pmId,
token: Token,
......
......@@ -20,7 +20,7 @@ lanuch();
async function test() {
await dataInit()
// await dataInit()
// let pwd = md5PwdStr("admin");
// console.log();
// let data = await partyQualityList(1);
......
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