user.ts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. import Service from '../lib/service.js'
  2. import axios from 'axios'
  3. import Config from '../config'
  4. class UserService extends Service {
  5. constructor() {
  6. super()
  7. axios.defaults.baseURL = Config.Host85
  8. }
  9. //删除角色
  10. async roleListDelete(params = {}) {
  11. return await this.post('/user/role/delete', params)
  12. }
  13. //角色列表
  14. async roleList(params = {}) {
  15. return await this.post('/user/role/search/page', params)
  16. }
  17. //部门列表
  18. async departmentList(params = {}) {
  19. return await this.post('/department/search/list', params)
  20. }
  21. //权限查看add
  22. async groupSingleAdd(params = {}) {
  23. return await this.post('/user/role/add/detail/list', params)
  24. }
  25. //修改节点
  26. async authorityNodeUpdate(params = {}) {
  27. return await this.post('/authority/node/update', params)
  28. }
  29. //修改按钮
  30. async authorityActionUpdate(params = {}) {
  31. return await this.post('/authority/action/update', params)
  32. }
  33. //删除节点
  34. async authorityNodeDelete(params = {}) {
  35. return await this.post('/authority/node/delete', params)
  36. }
  37. //删除按钮
  38. async authorityActionDelete(params = {}) {
  39. return await this.post('/authority/action/delete', params)
  40. }
  41. //添加节点
  42. async authorityNodeAdd(params = {}) {
  43. return await this.post('/authority/node/add', params)
  44. }
  45. //权限查看update
  46. async groupSingleUpdate(params = {}) {
  47. return await this.post('/user/role/update/detail/list', params)
  48. }
  49. //修改角色
  50. async roleListUpdate(params = {}) {
  51. return await this.post('/user/role/update', params)
  52. }
  53. //添加角色
  54. async roleListAdd(params = {}) {
  55. return await this.post('/user/role/add', params)
  56. }
  57. //角色列表
  58. async roleNameList(params = {}) {
  59. return await this.post('/user/role/search/list', params)
  60. }
  61. //获取邮箱组别列表
  62. async getGroupEmailList(params = {}) {
  63. return await this.post('/google/group/user/list', params)
  64. }
  65. //角色列表
  66. async userGroupGet(params = {}) {
  67. return await this.post('/user/group/get', params)
  68. }
  69. //区域下拉
  70. async arealListUP(params = {}) {
  71. return await this.post('/sys/area/search/dd', params)
  72. }
  73. //用户列表
  74. async userList(params = {}) {
  75. return await this.post('/user/search/page', params)
  76. }
  77. //获取组别类型
  78. async customGroupTypeList(params = {}) {
  79. return await this.post('/custom/group/type/list', params)
  80. }
  81. //代理默认组别类型设置
  82. async ibGroup(params = {}) {
  83. return await this.post('/ib/update/login/group', params)
  84. }
  85. //用户开户设置
  86. async userAccountSetup(params = {}) {
  87. return await this.post('/user/update/show/login/type', params)
  88. }
  89. //解封
  90. async userUnseal(params = {}) {
  91. return await this.post('/user/unseal', params)
  92. }
  93. //重置密钥 后续绑定谷歌验证码
  94. async secretKeyRe(params = {}) {
  95. return await this.post('/user/re/secret/key', params)
  96. }
  97. //清理密钥 不接触绑定 无法通过谷歌验证码登录
  98. async secretKeyClose(params = {}) {
  99. return await this.post('/user/close/secret/key', params)
  100. }
  101. //重置密码
  102. async rePassword(params = {}) {
  103. return await this.post('/user/reset/password', params)
  104. }
  105. //获取谷歌密钥
  106. async secretKeyGet(params = {}) {
  107. return await this.post('/user/get/google/secretKey', params)
  108. }
  109. //删除用户
  110. async userListDelete(params = {}) {
  111. return await this.post('/user/delete', params)
  112. }
  113. //单个查询用户
  114. async userSingle(params = {}) {
  115. return await this.post('/user/search/single', params)
  116. }
  117. //添加用户
  118. async userListAdd(params = {}) {
  119. return await this.post('/user/add', params)
  120. }
  121. //修改用户
  122. async userListUpdate(params = {}) {
  123. return await this.post('/user/update', params)
  124. }
  125. //添加按钮
  126. async authorityActionAdd(params = {}) {
  127. return await this.post('/authority/action/add', params)
  128. }
  129. //销售上级列表
  130. async userSales(params = {}) {
  131. return await this.post('/user/sales', params)
  132. }
  133. // 商户管理 -列表
  134. async getShopManage(params = {}) {
  135. return await this.post('/merchant/search/list', params)
  136. }
  137. // 商户管理 -add
  138. async shopManageAdd(params = {}) {
  139. return await this.post('/merchant/add', params)
  140. }
  141. // 商户管理 -edit
  142. async shopManageEdit(params = {}) {
  143. return await this.post('/merchant/edit', params)
  144. }
  145. // 商户管理 -add
  146. async shopManageDel(params = {}) {
  147. return await this.post('/merchant/delete', params)
  148. }
  149. // 商户管理 -list
  150. // async getShopManageList(params = {}) {
  151. // return await this.get('/merchant/findSingle', params)
  152. // }
  153. // 商户管理 -list
  154. async getShopManageList(params = {}) {
  155. return await this.post('/merchant/getAllMerchant', params)
  156. }
  157. }
  158. export default new UserService()