hyb
2026-01-30 15bc7727b58bf9ca0c8f21702fa893daac232b8d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
import axios from 'axios'
import store from '@/store/state'
 
export function changePassword(data) {
  return axios({
    url: '/api/user/change_password/',
    method: 'post',
    data,
    headers: {
      Authorization: store.token
    }
  }).then(res => {
    store.token = null
    store.user = null
    store.name = null
    store.id = null
    return res.data
  })
}
 
export function register(data) {
  return axios({
    url: '/api/user/register',
    method: 'post',
    data
  }).then(res => {
    return res.data
  })
}
 
export function getUserApprovalList(params) {
  return axios({
    url: '/api/user/approval/',
    method: 'get',
    params,
    headers: {
      Authorization: store.token
    }
  }).then(res => {
    return res.data
  })
}
 
export function approveUser(userId, data) {
  return axios({
    url: `/api/user/approval/${userId}/approve/`,
    method: 'post',
    data,
    headers: {
      Authorization: store.token
    }
  }).then(res => {
    return res.data
  })
}