Commit e3e7051e by chenjinjing

no message

parent b690dcd5
......@@ -7,3 +7,4 @@
/video
*test*
*.log
*.zip
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,7 +2,9 @@
import { get } from "../util/request";
export async function getData(req, res) {
let cameraIndexCode = req.body.cameraIndexCode;
// let cameraIndexCode = req.body.cameraIndexCode;
let cameraIndexCode = req.body.cameraIndexCode || req.query.cameraIndexCode;
console.log("cameraIndexCode:" + cameraIndexCode);
let url = 'http://192.168.1.105:8081/previewWS?cameraIndexCode=' + cameraIndexCode;
let previewInfo = await get(url);
......
......@@ -2,7 +2,7 @@ import express = require('express');
import bodyParser = require('body-parser');
import routers = require('../routers/router');
import compression = require('compression');
import * as fallback from 'express-history-api-fallback';
import fallback from 'express-history-api-fallback';
import * as path from "path";
import { watch } from '../middleware/watch';
import { httpErrorHandler } from '../middleware/httpErrorHandler';
......
import * as asyncHandler from 'express-async-handler';
import asyncHandler = require('express-async-handler');
import * as monitorBiz from '../biz/monitor';
export function setRouter(httpServer) {
......@@ -9,7 +9,6 @@ export function setRouter(httpServer) {
}
function deviceInfo(req, res) {
res.success({data});
}
......
import * as asyncHandler from 'express-async-handler';
import asyncHandler from 'express-async-handler';
import { get, post, postForm } from '../util/request';
import { ERRORENUM } from '../config/errorEnum';
import { BizError } from '../util/bizError';
......@@ -63,6 +60,7 @@ const ApiConfig = {
weekarrange:{type:"post", url:'/service/api/nmzx/weekarrange', name:"学校对外最新活动"},
sjkb_visitor_total:{type:"post", url:'/service/api/nmzx/sjkb_visitor_total', name:"校园对外智慧安防"},
sjkb_visitor:{type:"post", url:'/service/api/nmzx/sjkb_visitor', name:"校园安全管理_访客数据"},
sjkb_visitor_date:{type:"post", url:'/service/api/nmzx/sjkb_visitor_date', name:"校园安全管理_访客数据"}, //新增接口
askforleave_ratio:{type:"post", url:'/service/api/nmzx/askforleave_ratio', name:"教师出勤分析"},
teacher_pxcount:{type:"post", url:'/service/api/nmzx/teacher_pxcount', name:"培训情况"},
sjkb_warning_total:{type:"post", url:'/service/api/nmzx/sjkb_warning_total', name:"校园安全管理/校园对内-设备预警统计"},
......@@ -97,9 +95,6 @@ const ApiConfig = {
student_health_bmi:{type:"post", url:'/service/api/nmzx/student_health_bmi'}, // 学生个人 - BMI监测趋势
student_health_height:{type:"post", url:'/service/api/nmzx/student_health_height'}, // 学生个人 - 身高监测趋势
student_health_weight:{type:"post", url:'/service/api/nmzx/student_health_weight'}, // 学生个人 - 身高监测趋势
};
let teacherPicConfig = {
"data":[
......@@ -180,6 +175,9 @@ export function setDianXinRouter(httpServer) {
if (type == "post") {
if (key == "token") {
result = await postForm(UrlStr, param, {});
} else if (key === "sjkb_visitor_date") {
let reqParam = Object.assign(param, req.query); // 使用 req.query 获取查询参数
result = await post(UrlStr, reqParam, {});
} else {
if (key == "teacher_pic" ) {
result = teacherPicConfig;
......@@ -192,8 +190,8 @@ export function setDianXinRouter(httpServer) {
console.log(result);
} else {
let reqParam = Object.assign(param, req.body);
//做特化 10月19日
if(url.indexOf("_get") > -1) {
// 特殊处理:对于包含查询参数的GET请求
if(url.indexOf("_get") > -1) { //做特化 10月19日
let reqParam = Object.assign(param, req.body);
result = await post(UrlStr.replace("_get", "") , reqParam, {identitytoken:tokenQueue});
console.log();
......
/**
* 朱经理接口
* 监控接口
*/
import * as asyncHandler from 'express-async-handler';
import asyncHandler = require('express-async-handler');
import * as monitorBiz from '../biz/monitor';
export function setRouter(httpServer) {
......
......@@ -2,7 +2,7 @@
* 公共路由
*/
import * as asyncHandler from 'express-async-handler'
import asyncHandler = require('express-async-handler');
import * as enumConfig from '../config/enum';
let publicRouterConfig = {
......
......@@ -2,7 +2,7 @@
* 学校
*/
import * as asyncHandler from 'express-async-handler';
import asyncHandler = require('express-async-handler');
import * as ztqkBiz from '../biz/school/ztqk';
import * as zhlqBiz from '../biz/school/basketball';
......
......@@ -2,7 +2,7 @@
* 学生
*/
import * as asyncHandler from 'express-async-handler';
import asyncHandler = require('express-async-handler');
import * as ztqkBiz from '../biz/school/ztqk';
import { checkSession } from '../biz/authentication';
......
......@@ -3,7 +3,7 @@
*/
import * as asyncHandler from 'express-async-handler';
import asyncHandler = require('express-async-handler');
import * as ztqkBiz from '../biz/school/ztqk';
export function setRouter(httpServer) {
......
import * as asyncHandler from 'express-async-handler';
import asyncHandler = require('express-async-handler');
import * as authenticationBiz from '../biz/authentication';
export function setRouter(httpServer) {
......
import * as asyncHandler from 'express-async-handler';
import asyncHandler = require('express-async-handler');
import { get } from '../util/request';
export function setRouter(httpServer) {
......
import * as request from 'request';
import request from 'request';
import { BizError } from './bizError';
export function get(url:string, query?, headers?, timeOut?) {
......
......@@ -4,7 +4,13 @@
"target": "es2017",
"sourceMap": true,
"rootDir":"./src",
"outDir":"./out"
"outDir":"./out",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": false,
"noImplicitAny": false,
"strictNullChecks": false,
"types": ["node"]
},
"exclude": [
"node_modules",
......
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