whycwx
2021-08-04 e3f6d2e3b894b55099c232426223b57d28de133c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import axios from "./axios";
import md5 from "js-md5";
/**
 * 登录系统
 * 参数 "uinf.UName="+用户名+"&uinf.Upassword="+密码+"&uinf.UId="+是否记住密码(0,1)
 * 密码需要使用hex_md5加密
 */
export const login = (username, password) => {
    return axios({
        method: "post",
        url: `LoginAction_login?uinf.UName=${username}&uinf.Upassword=${md5(password)}&uinf.UId=0`,
        data: null
    })
}
 
/**
 * 查询机房信息
 * 参数:json = {"StationName1":"北京市","StationName2":"市辖区","StationName5":"海淀区"}
 */
export const searchStation = (params) => {
    return axios({
        method: "post",
        url: "BattInfAction!serchAllStationName",
        data: "json=" + JSON.stringify(params)
    })
}
 
/**
 * 查询已添加到地图的机房
 * 参数:json={"adata":{"alm_cleared_type":0,"alm_id":1},"bplan":{"discharge_reason":3}}
 */
export const searchMap = () => {
    return axios({
        method: "post",
        url: "BattMap_informationAction!searchUserManageStation",
        data: "json=" + JSON.stringify({
            adata: {
                alm_cleared_type: 0,
                alm_id: 1,
            },
            bplan: {
                discharge_reason: 3,
            }
        })
    })
}
 
export const searchMapHomeState = () => {
    return axios({
        method: "post",
        url: 'BattMap_informationAction!findStationState',
        data: null
    });
}
 
/**
 * 首页地图json数据配置  查询关联地图
 * 参数: json={"id":id}
 */
export const getAllMapOutlineAction = (data) => {
    return axios({
        method: "post",
        url: "MapOutlineAction!getAll",
        data: 'json=' + JSON.stringify(data),
    });
}
/**
 * 检测用户的密码
 * @param data 密码
 * @returns {AxiosPromise}
 */
export const checkUserPwd = (data) => {
    return axios({
        method: "post",
        url: "User_infAction!checkUserPass",
        data: "addjson="+ md5(data),
    });
}