Blame view
src/api/user.js
1.23 KB
80a28914e init |
1 |
import request from '@/utils/request' |
60fa0be9d auto commit the c... |
2 |
// var qs = require('Qs'); |
80a28914e init |
3 4 |
export function login(data) { |
60fa0be9d auto commit the c... |
5 |
console.log('login.1111...', data) |
80a28914e init |
6 |
return request({ |
60fa0be9d auto commit the c... |
7 8 |
// url: '/yp/user/login', url: '/yp.user.login.php', |
80a28914e init |
9 |
method: 'post', |
60fa0be9d auto commit the c... |
10 11 12 13 14 15 16 17 18 |
headers: { 'Content-type': 'application/x-www-form-urlencoded' }, data, // responseType: 'text/plain', // onDownloadProgress: false, // onUploadProgress: true, // proxy: {} }); |
80a28914e init |
19 20 21 |
} export function getInfo(token) { |
a795fa7b1 auto commit the c... |
22 |
console.log('getInfo....', token) |
80a28914e init |
23 |
return request({ |
c44ba96f6 auto commit the c... |
24 25 |
url: '/yp/user/info', method: 'get', |
60fa0be9d auto commit the c... |
26 27 28 |
params: { token } |
c44ba96f6 auto commit the c... |
29 30 31 32 33 34 35 |
}) } export function list(token) { console.log('listUser....', token) return request({ url: '/yp/user/list', |
80a28914e init |
36 |
method: 'get', |
60fa0be9d auto commit the c... |
37 38 39 |
params: { token } |
80a28914e init |
40 41 |
}) } |
1172ebb79 auto commit the c... |
42 43 44 45 46 |
export function add(token) { console.log('addUser....', token) return request({ url: '/yp/user/add', method: 'get', |
60fa0be9d auto commit the c... |
47 48 49 |
params: { token } |
1172ebb79 auto commit the c... |
50 51 52 53 54 55 56 57 |
}) } export function modi(token) { console.log('modiUser....', token) return request({ url: '/yp/user/modi', method: 'get', |
60fa0be9d auto commit the c... |
58 59 60 |
params: { token } |
1172ebb79 auto commit the c... |
61 62 |
}) } |
80a28914e init |
63 |
export function logout() { |
a795fa7b1 auto commit the c... |
64 |
console.log('logout....') |
80a28914e init |
65 |
return request({ |
c44ba96f6 auto commit the c... |
66 |
url: '/yp/user/logout', |
80a28914e init |
67 68 69 |
method: 'post' }) } |