测试组/Test_platform/Interface_automation/frontend/src/api/user.js
@@ -10,7 +10,6 @@
      Authorization: store.token
    }
  }).then(res => {
    // 密码修改成功后清除token和用户信息
    store.token = null
    store.user = null
    store.name = null
@@ -18,3 +17,39 @@
    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
  })
}