Blame view

src/api/user.js 637 Bytes
80a28914e   吉鹏   init
1
2
3
  import request from '@/utils/request'
  
  export function login(data) {
a795fa7b1   Adam   auto commit the c...
4
    console.log('login....', data)
80a28914e   吉鹏   init
5
    return request({
c44ba96f6   Adam   auto commit the c...
6
      url: '/yp/user/login',
80a28914e   吉鹏   init
7
8
9
10
11
12
      method: 'post',
      data
    })
  }
  
  export function getInfo(token) {
a795fa7b1   Adam   auto commit the c...
13
    console.log('getInfo....', token)
80a28914e   吉鹏   init
14
    return request({
c44ba96f6   Adam   auto commit the c...
15
16
17
18
19
20
21
22
23
24
      url: '/yp/user/info',
      method: 'get',
      params: { token }
    })
  }
  
  export function list(token) {
    console.log('listUser....', token)
    return request({
      url: '/yp/user/list',
80a28914e   吉鹏   init
25
26
27
28
29
30
      method: 'get',
      params: { token }
    })
  }
  
  export function logout() {
a795fa7b1   Adam   auto commit the c...
31
    console.log('logout....')
80a28914e   吉鹏   init
32
    return request({
c44ba96f6   Adam   auto commit the c...
33
      url: '/yp/user/logout',
80a28914e   吉鹏   init
34
35
36
      method: 'post'
    })
  }