鸿蒙智能电子锁前端项目
whychdw
2024-10-09 1f14aca3e26ea960b8d20bb83d81c31339b7f48c
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
import request from '@/utils/request';
 
export function getRoutes() {
  return request({
    url: '/vue-element-admin/routes',
    method: 'get'
  });
}
 
export function getRoles() {
  return request({
    url: '/vue-element-admin/roles',
    method: 'get'
  });
}
 
export function addRole(data) {
  return request({
    url: '/vue-element-admin/role',
    method: 'post',
    data
  });
}
 
export function updateRole(id, data) {
  return request({
    url: `/vue-element-admin/role/getUserInfo?id=${id}`,
    method: 'get',
    data
  });
}
 
export function deleteRole(id) {
  return request({
    url: `/vue-element-admin/role/deleteUser`,
    method: 'post',
    data: { userId: id }
  });
}