Blame view

src/api/user.js 956 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
      method: 'get',
      params: { token }
    })
  }
1172ebb79   Adam   auto commit the c...
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  export function add(token) {
    console.log('addUser....', token)
    return request({
      url: '/yp/user/add',
      method: 'get',
      params: { token }
    })
  }
  
  export function modi(token) {
    console.log('modiUser....', token)
    return request({
      url: '/yp/user/modi',
      method: 'get',
      params: { token }
    })
  }
80a28914e   吉鹏   init
46
  export function logout() {
a795fa7b1   Adam   auto commit the c...
47
    console.log('logout....')
80a28914e   吉鹏   init
48
    return request({
c44ba96f6   Adam   auto commit the c...
49
      url: '/yp/user/logout',
80a28914e   吉鹏   init
50
51
52
      method: 'post'
    })
  }