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
56
57
58
import { $fysp } from '../index';
 
export default {
  /**
   * 获取用户详情
   */
  getUserById(id) {
    return $fysp.get(`userinfo/${id}`).then((res) => res.data);
  },
 
  /**
   * 更新用户详情
   */
  updateUser(user) {
    return $fysp.post(`userinfo`, user).then((res) => res.data);
  },
 
  /**
   * 获取场景的用户详情
   */
  getUserByScene(sId) {
    return $fysp
      .get(`userinfo/scene/get?sceneId=${sId}`)
      .then((res) => res.data);
  },
 
  /**
   * 自动创建账户
   */
  autoCreateAccount(sId) {
    return $fysp
      .post(`userinfo/create?sceneId=${sId}`, {})
      .then((res) => res.data);
  },
  /**
   * 获取场景对应的飞羽环境系统用户id
   */
  getTzId(sceneId) {
    return $fysp.get(`usermap?sceneId=${sceneId}`).then((res) => res.data);
  },
 
  /**
   * 按用户类型获取用户信息
   */
  getUserByType(typeId, enable = true) {
    return $fysp
      .get(`userinfo/type/get`, { params: { typeId, enable } })
      .then((res) => res.data);
  },
 
  searchUser(areaVo, keyword, page, perPage) {
    return $fysp
      .post(`userinfo/search`, areaVo, {
        params: { keyword, userType: 3, page, perPage }
      })
      .then((res) => res.data);
  }
};