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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
| import axios from 'axios'
| import md5 from "js-md5";
| import RSA from "@/assets/js/tools/RSA";
| import formatPassword from "@/assets/js/tools/formatPassword";
| export default {
| checkNetwork() {
| return axios({
| method: 'post',
| url: 'CheckClientAction!netStatus',
| data: null,
| })
| },
| /**
| * 检测用户的密码
| * @param pwd 密码
| * @returns {AxiosPromise}
| */
| checkUserPwd(pwd) {
| return axios({
| method: 'post',
| url: 'User_infAction!checkUserPass',
| data: "addjson="+ encodeURIComponent(encodeURIComponent(formatPassword(pwd))),
| });
| },
| /**
| * 更新用户密码
| * @param pwd
| * @returns {AxiosPromise}
| * 备注:encodeURIComponent执行两次的原因是post过程中会自动恢复一层encodeURIComponent
| */
| updateUserPwd(pwd) {
| return axios({
| method: 'post',
| url: 'User_infAction!updatePassword',
| data: "uif.USnId="+ encodeURIComponent(encodeURIComponent(formatPassword(pwd))),
| });
| },
| /**
| * 重置密码
| * @param name
| * @param oldPwd
| * @param newPwd
| * @returns {AxiosPromise}
| * 备注:encodeURIComponent执行两次的原因是post过程中会自动恢复一层encodeURIComponent
| */
| updateUserPwd2(name, oldPwd, newPwd) {
| return axios({
| method: 'post',
| url: 'User_infAction!updatePassword2',
| data: "upjson="+JSON.stringify({
| UName: name,
| Upassword: encodeURIComponent(encodeURIComponent(formatPassword(oldPwd))),
| UNote: encodeURIComponent(encodeURIComponent(formatPassword(newPwd))),
| USnId: encodeURIComponent(encodeURIComponent(formatPassword(newPwd))),
| }),
| });
| },
| /**
| * 检测是否外部登录
| * @returns {AxiosPromise}
| */
| checkReferer() {
| return axios({
| method: 'post',
| url: 'LoginAction_loginLess',
| data: null,
| });
| },
|
| /**
| * 获取服务器的时间戳
| * @returns {AxiosPromise}
| */
| getServerTime() {
| return axios({
| method: 'post',
| url: 'Server_stateAction_action_getTimestamp',
| data: null,
| });
| },
| /**
| * 关闭浏览器,清除session
| * @returns {AxiosPromise}
| */
| closeBrowser() {
| return axios({
| method: 'post',
| url: 'LoginAction_closeBrowser',
| data: null,
| });
| },
| }
|
|