Blame view

src/api/user.js 424 Bytes
80a28914e   吉鹏   init
1
2
3
4
  import request from '@/utils/request'
  
  export function login(data) {
    return request({
d7d9c38c2   Adam   auto commit the c...
5
      url: '/vue-element-admin/user/login',
80a28914e   吉鹏   init
6
      method: 'post',
d7d9c38c2   Adam   auto commit the c...
7
      data
c44ba96f6   Adam   auto commit the c...
8
9
    })
  }
d7d9c38c2   Adam   auto commit the c...
10
  export function getInfo(token) {
c44ba96f6   Adam   auto commit the c...
11
    return request({
d7d9c38c2   Adam   auto commit the c...
12
      url: '/vue-element-admin/user/info',
80a28914e   吉鹏   init
13
      method: 'get',
d7d9c38c2   Adam   auto commit the c...
14
      params: { token }
80a28914e   吉鹏   init
15
16
    })
  }
d7d9c38c2   Adam   auto commit the c...
17
  export function logout() {
1172ebb79   Adam   auto commit the c...
18
    return request({
d7d9c38c2   Adam   auto commit the c...
19
20
      url: '/vue-element-admin/user/logout',
      method: 'post'
80a28914e   吉鹏   init
21
22
    })
  }