Blame view

src/api/user.js 1.72 KB
b89c8760   wangming   项目初始化
1
2
3
  import request from '@/utils/request'
  
  export function login(data) {
1de913cf   ren   sdf
4
5
6
7
8
    return request({
      url: `/Account/SystemLogin?username=${data.username}&password=${data.password}`,
      method: 'post',
      data
    })
b89c8760   wangming   项目初始化
9
  }
b89c8760   wangming   项目初始化
10
  export function getInfo(token) {
1de913cf   ren   sdf
11
12
13
14
    return request({
      url: `/Users/userInfo`,
      method: 'get',
    })
b89c8760   wangming   项目初始化
15
16
17
18
  }
  
  
  export function ImportUserByExcel(token) {
1de913cf   ren   sdf
19
20
21
22
    return request({
      url: `/Account/ImportUser`,
      method: 'post'
    })
b89c8760   wangming   项目初始化
23
24
25
  }
  
  export function logout() {
1de913cf   ren   sdf
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
93
94
95
96
    return request({
      url: '/vue-admin-template/user/logout',
      method: 'post'
    })
  }
  
  export function GetUserList(data) {
    return request({
      url: `/Users/GetUserList`,
      method: 'post',
      data
    })
  }
  export function UsersCreate(data) {
    return request({
      url: `/Users/Create`,
      method: 'post',
      data
    })
  }
  
  export function UsersUpdate(data) {
    return request({
      url: `/Users/Update`,
      method: 'post',
      data
    })
  }
  
  export function UsersDelete(data) {
    return request({
      url: `/Users/Delete`,
      method: 'post',
      params: data
    })
  }
  
  export function UpdateCurrentPassword(data) {
    return request({
      url: `/Account/UpdateCurrentPassword?Password=`+data.Password,
      method: 'post',
      // params: data
    })
  }
  
  
  export function AccountRegister(data) {
    return request({
      url: `/Account/Register`,
      method: 'post',
      data
      // params: data
    })
  }
  
  //POST /api/Users/GetUserListByAdmin
  
  export function GetUserListByAdmin(data) {
    return request({
      url: `/Users/GetUserListByAdmin`,
      method: 'post',
      data
    })
  }
  //修改管理员密码
  export function UpdateCurrentPasswordById(data) {
    return request({
      url: `/Account/UpdateCurrentPasswordById?UserId=`+data.UserId+'&Password='+data.Password,
      method: 'post',
      data
    })
b89c8760   wangming   项目初始化
97
  }