56 lines
1.5 KiB
JavaScript
56 lines
1.5 KiB
JavaScript
|
|
import { timestampFormat,getWeekDate } from "../../../public/js/tool.js";
|
|
import {initLayout} from "./pageEventTool.js"
|
|
import {showSkynetIpcInfo} from "./orgApi/getSkynetIpcList.js"
|
|
var layuiObj={};
|
|
var mapPlugin={};
|
|
var loginInfo={};//登录信息
|
|
var boroughInfoArr=[];//派出所的信息
|
|
var stationGradeArr=[];//学校评分
|
|
var stationsInfoArr=[];//学校今天信息
|
|
var stationInfoTableList=[];//学校的基本信息
|
|
var mainMap = null;
|
|
layui.use(['carousel','table','form'],function() {
|
|
layuiObj["layer"] = layui.layer;
|
|
layuiObj["carousel"] = layui.carousel;
|
|
layuiObj["layuitable"] = layui.table;
|
|
layuiObj["rate"] = layui.rate;
|
|
layuiObj["layuiForm"] = layui.form;
|
|
var loginJson=sessionStorage.getItem("unameInfoStr");
|
|
loginInfo=JSON.parse(loginJson);
|
|
axios.defaults.headers.common['Authorization'] = loginInfo["session"];
|
|
initApi();
|
|
initTool();
|
|
initLayout(9);
|
|
})
|
|
|
|
//1.获取微站的信息
|
|
async function initApi(){
|
|
//建立数
|
|
showSkynetIpcInfo()
|
|
}
|
|
|
|
function initTool(){
|
|
$(".loginUser").html(`<img src="./image/user.png">${loginInfo["user_name"]}`)
|
|
$(".currentTime>span:first-child").html(getWeekDate());
|
|
$(".currentTime>span:last-child").html(timestampFormat());
|
|
setInterval(() => {
|
|
$(".currentTime>span:last-child").html(timestampFormat());
|
|
}, 1000);
|
|
}
|
|
|
|
export {
|
|
layuiObj,
|
|
loginInfo,
|
|
boroughInfoArr,
|
|
stationGradeArr,
|
|
stationsInfoArr,
|
|
stationInfoTableList,
|
|
mainMap,
|
|
mapPlugin
|
|
}
|
|
|
|
|
|
|
|
|