Commit 384e3b73 by lixinming

no message

parent b072c0fb
......@@ -15,7 +15,7 @@ import moment = require('moment');
/**
* 主页基础数据
*/
export async function homeData() {
export async function homeData(uId:number) {
let partyMemberNum = await partyMemberData.groupFindPartyMemberCount({}); //党员总数
let massIndex = 87.6; //党建指令指数
......
......@@ -30,6 +30,13 @@ export async function getOrganizationalLifeList(type:number, name:number) {
let data = [];
const NowMs = new Date().valueOf();
let selectParam = {};
if (type != configEnum.TYPE.全部) {
if (type == configEnum.TYPE.即将开展) selectParam = {"activityStartTime":{"$gt":NowMs }};
else if (type == configEnum.TYPE.已经开展) selectParam = {"activityEndTime":{"$lt":NowMs }};
}
switch (type) {
case configEnum.TYPE.正在进行:
moveAboutList = await organizationalLifeData.findAfootActivityList(name);
......
......@@ -13,14 +13,14 @@ export enum PARTYPOSITIONS {
预备党员,
}
/**
* 组织生活活动类型
*/
export enum TYPE {
正在进行 = 1,
即将开展,
已经开展
已经开展,
全部
}
......
......@@ -18,7 +18,8 @@ export function setRouter(httpServer) {
* @param res
*/
async function homeBase(req, res) {
let baseInfo = await baseBiz.homeData();
let uId = req.headers.userid;
let baseInfo = await baseBiz.homeData(uId);
res.success(baseInfo);
}
......
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