user.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. import request from '@/utils/request'
  2. // 查询企微员工列表
  3. export function staffListUser(query) {
  4. return request({
  5. url: '/qw/user/staffList',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询企微用户列表
  11. export function listUser(query) {
  12. return request({
  13. url: '/qw/user/list',
  14. method: 'get',
  15. params: query
  16. })
  17. }
  18. // 查询企微用户列表
  19. export function userList(query) {
  20. return request({
  21. url: '/qw/user/userList',
  22. method: 'get',
  23. params: query
  24. })
  25. }
  26. export function qwUserList(id) {
  27. return request({
  28. url: '/qw/user/qwUserList/' + id,
  29. method: 'get',
  30. })
  31. }
  32. export function getQwUserList(query) {
  33. return request({
  34. url: '/qw/user/getQwUserList',
  35. method: 'get',
  36. params: query
  37. })
  38. }
  39. export function getMyQwUserList(query) {
  40. return request({
  41. url: '/qw/user/getMyQwUserList',
  42. method: 'get',
  43. params: query
  44. })
  45. }
  46. export function getMyQwCompanyList(query) {
  47. return request({
  48. url: '/qw/user/getMyQwCompanyList',
  49. method: 'get',
  50. params: query
  51. })
  52. }
  53. // 查询企微用户详细
  54. export function getQwUser(id) {
  55. return request({
  56. url: '/qw/user/' + id,
  57. method: 'get'
  58. })
  59. }
  60. //批量查询企微用户详细
  61. export function getQwUserByIds(ids) {
  62. return request({
  63. url: '/qw/user/getInfo/' + ids,
  64. method: 'get'
  65. })
  66. }
  67. export function addQwUserName(id) {
  68. return request({
  69. url: '/qw/user/syncName/' + id,
  70. method: 'post',
  71. })
  72. }
  73. // 新增企微用户
  74. export function addUser(data) {
  75. return request({
  76. url: '/qw/user',
  77. method: 'post',
  78. data: data
  79. })
  80. }
  81. export function addQwUser(id) {
  82. return request({
  83. url: '/qw/user/sync/' + id,
  84. method: 'post',
  85. })
  86. }
  87. // 修改企微用户
  88. export function updateUser(data) {
  89. return request({
  90. url: '/qw/user',
  91. method: 'put',
  92. data: data
  93. })
  94. }
  95. // 绑定Ai客服
  96. export function qwUserBindAi(data) {
  97. return request({
  98. url: '/qw/user/bindAi',
  99. method: 'put',
  100. data: data
  101. })
  102. }
  103. //解绑AI客服
  104. export function relieveFastGptRoleById(id) {
  105. return request({
  106. url: '/qw/user/relieveFastGptRoleById/' + id,
  107. method: 'get'
  108. })
  109. }
  110. //绑定企微用户
  111. export function bindQwUser(data) {
  112. return request({
  113. url: '/qw/user/bindQwUser',
  114. method: 'put',
  115. data: data
  116. })
  117. }
  118. //修改企微用户的欢迎语管理
  119. export function updateUserWeclome(data) {
  120. return request({
  121. url: '/qw/user/weclomeQwUser',
  122. method: 'post',
  123. data: data
  124. })
  125. }
  126. // 删除企微用户
  127. export function delUser(id) {
  128. return request({
  129. url: '/qw/user/' + id,
  130. method: 'delete'
  131. })
  132. }
  133. // 导出企微用户
  134. export function exportUser(query) {
  135. return request({
  136. url: '/qw/user/export',
  137. method: 'get',
  138. params: query
  139. })
  140. }
  141. /**
  142. * 登录企业微信(发起登录)
  143. */
  144. export function loginQwCode(data) {
  145. return request({
  146. url: '/qw/user/loginQwCode',
  147. method: 'post',
  148. data: data
  149. })
  150. }
  151. /**
  152. * 取redis里的登录二维码
  153. */
  154. export function getQwCodeUrl(data) {
  155. return request({
  156. url: '/qw/user/getQwCodeUrl',
  157. method: 'post',
  158. data: data
  159. })
  160. }
  161. /**
  162. * 登录请求-刷新获取二维码
  163. */
  164. export function loginQwCodeUrl(data) {
  165. return request({
  166. url: '/qw/user/loginQwCodeUrl',
  167. method: 'post',
  168. data: data
  169. })
  170. }
  171. /**
  172. * 登录企业微信(传输验证信息)
  173. */
  174. export function loginQwCodeMsg(data) {
  175. return request({
  176. url: '/qw/user/loginQwCodeMsg',
  177. method: 'post',
  178. data: data
  179. })
  180. }
  181. /**
  182. * 退出企业微信
  183. */
  184. export function logoutQwLogout(data) {
  185. return request({
  186. url: '/qw/user/logoutQwLogout',
  187. method: 'post',
  188. data: data
  189. })
  190. }
  191. /**
  192. * 查询登录状态
  193. */
  194. export function getLoginQwStatus(data) {
  195. return request({
  196. url: '/qw/user/getLoginQwStatus',
  197. method: 'post',
  198. data: data
  199. })
  200. }
  201. /**
  202. * 企业微信员工账号 直接授权key
  203. */
  204. export function handleAuthAppKey(data) {
  205. return request({
  206. url: '/qw/user/authAppKey',
  207. method: 'post',
  208. data: data
  209. })
  210. }
  211. /**
  212. * 企业微信员工账号 输入的授权key
  213. */
  214. export function handleInputAuthAppKey(data) {
  215. return request({
  216. url: '/qw/user/handleInputAuthAppKey',
  217. method: 'post',
  218. data: data
  219. })
  220. }
  221. /**
  222. * 企业微信员工账号 绑定 云主机
  223. */
  224. export function qwBindCloudHost(appkey) {
  225. return request({
  226. url: '/qw/user/qwBindCloudHost/'+appkey,
  227. method: 'get',
  228. })
  229. }
  230. /**
  231. * 企业微信员工账号 解除绑定 云主机
  232. */
  233. export function qwUnbindCloudHost(appkey) {
  234. return request({
  235. url: '/qw/user/qwUnbindCloudHost/'+appkey,
  236. method: 'get',
  237. })
  238. }
  239. /**
  240. * 获取云主机的账密
  241. */
  242. export function selectCloudAP(data) {
  243. return request({
  244. url: '/qw/user/selectCloudAP',
  245. method: 'post',
  246. data: data
  247. })
  248. }