index.js
1.33 KB
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
//获取平台定制API
const getPlateCustomApi = () => {
return uni.$u.http.get("/yt/app_design/get")
};
//第三方账号绑定API
const getThirdLoginApi = (code) => {
return uni.$u.http.get(`/yt/third/login/${code}`)
};
//获取个人信息API
const setUserInfoApi = () => {
return uni.$u.http.get("/yt/user/me/info")
};
//获取平台信息API
const setPlateInfoApi = () => {
return uni.$u.http.get("/yt/platform/get")
};
//获取告警徽标数API
const getAlarmTotalApi = () => {
return uni.$u.http.get("/yt/homepage/app?login=true")
};
//登录API
const postLoginApi = (loginForm = {}) => {
return uni.$u.http
.post("/auth/login", loginForm)
};
//获取验证码API
const postCodeApi = (phone) => {
return uni.$u.http
.post(`/yt/noauth/reset_code/${phone}`)
}
//重置密码API
const postResetCodeApi = (phone, data = {}) => {
return uni.$u.http
.post(`/yt/noauth/reset/${phone}`, data)
}
//更新个人资料API
const postPersonalInfoApi = (data = {}) => {
return uni.$u.http
.put('/yt/user/center', data)
}
//第三方登录需要解绑API
const deleteBindApi = (data = {}) => {
return uni.$u.http.delete('/yt/third', data)
}
export default {
getPlateCustomApi,
getThirdLoginApi,
setUserInfoApi,
setPlateInfoApi,
getAlarmTotalApi,
postLoginApi,
postCodeApi,
postResetCodeApi,
postPersonalInfoApi,
deleteBindApi
}