Commit bc9c2ec5 by lixinming

no message

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