user.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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 staffListPost(query) {
  12. return request({
  13. url: '/qw/user/staffListPost',
  14. method: 'post',
  15. data: query
  16. })
  17. }
  18. // 查询企微用户列表
  19. export function listUser(query) {
  20. return request({
  21. url: '/qw/user/list',
  22. method: 'get',
  23. params: query
  24. })
  25. }
  26. // 查询企微用户列表
  27. export function userList(query) {
  28. return request({
  29. url: '/qw/user/userList',
  30. method: 'get',
  31. params: query
  32. })
  33. }
  34. export function qwUserList(id) {
  35. return request({
  36. url: '/qw/user/qwUserList/' + id,
  37. method: 'get',
  38. })
  39. }
  40. export function getQwUserList(query) {
  41. return request({
  42. url: '/qw/user/getQwUserList',
  43. method: 'get',
  44. params: query
  45. })
  46. }
  47. export function getMyQwUserList(query) {
  48. return request({
  49. url: '/qw/user/getMyQwUserList',
  50. method: 'get',
  51. params: query
  52. })
  53. }
  54. export function getMyQwCompanyList(query) {
  55. return request({
  56. url: '/qw/user/getMyQwCompanyList/' + query,
  57. method: 'get'
  58. })
  59. }
  60. // 查询企微用户详细
  61. export function getQwUser(id) {
  62. return request({
  63. url: '/qw/user/' + id,
  64. method: 'get'
  65. })
  66. }
  67. //批量查询企微用户详细
  68. export function getQwUserByIds(ids) {
  69. return request({
  70. url: '/qw/user/getInfo/' + ids,
  71. method: 'get'
  72. })
  73. }
  74. export function addQwUserName(id) {
  75. return request({
  76. url: '/qw/user/syncName/' + id,
  77. method: 'post',
  78. })
  79. }
  80. // 新增企微用户
  81. export function addUser(data) {
  82. return request({
  83. url: '/qw/user',
  84. method: 'post',
  85. data: data
  86. })
  87. }
  88. export function addQwUser(id) {
  89. return request({
  90. url: '/qw/user/sync/' + id,
  91. method: 'post',
  92. })
  93. }
  94. // 修改企微用户
  95. export function updateUser(data) {
  96. return request({
  97. url: '/qw/user',
  98. method: 'put',
  99. data: data
  100. })
  101. }
  102. // 绑定Ai客服
  103. export function qwUserBindAi(data) {
  104. return request({
  105. url: '/qw/user/bindAi',
  106. method: 'put',
  107. data: data
  108. })
  109. }
  110. //解绑AI客服
  111. export function relieveFastGptRoleById(id) {
  112. return request({
  113. url: '/qw/user/relieveFastGptRoleById/' + id,
  114. method: 'get'
  115. })
  116. }
  117. //绑定企微用户
  118. export function bindQwUser(data) {
  119. return request({
  120. url: '/qw/user/bindQwUser',
  121. method: 'put',
  122. data: data
  123. })
  124. }
  125. //修改企微用户的欢迎语管理
  126. export function updateUserWeclome(data) {
  127. return request({
  128. url: '/qw/user/weclomeQwUser',
  129. method: 'post',
  130. data: data
  131. })
  132. }
  133. // 删除企微用户
  134. export function delUser(id) {
  135. return request({
  136. url: '/qw/user/' + id,
  137. method: 'delete'
  138. })
  139. }
  140. // 导出企微用户
  141. export function exportUser(query) {
  142. return request({
  143. url: '/qw/user/export',
  144. method: 'get',
  145. params: query
  146. })
  147. }
  148. /**
  149. * 登录企业微信(发起登录)
  150. */
  151. export function loginQwCode(data) {
  152. return request({
  153. url: '/qw/user/loginQwCode',
  154. method: 'post',
  155. data: data
  156. })
  157. }
  158. /**
  159. * 取redis里的登录二维码
  160. */
  161. export function getQwCodeUrl(data) {
  162. return request({
  163. url: '/qw/user/getQwCodeUrl',
  164. method: 'post',
  165. data: data
  166. })
  167. }
  168. /**
  169. * 登录请求-刷新获取二维码
  170. */
  171. export function loginQwCodeUrl(data) {
  172. return request({
  173. url: '/qw/user/loginQwCodeUrl',
  174. method: 'post',
  175. data: data
  176. })
  177. }
  178. /**
  179. * 登录企业微信(传输验证信息)
  180. */
  181. export function loginQwCodeMsg(data) {
  182. return request({
  183. url: '/qw/user/loginQwCodeMsg',
  184. method: 'post',
  185. data: data
  186. })
  187. }
  188. /**
  189. * 退出企业微信
  190. */
  191. export function logoutQwLogout(data) {
  192. return request({
  193. url: '/qw/user/logoutQwLogout',
  194. method: 'post',
  195. data: data
  196. })
  197. }
  198. /**
  199. * 查询登录状态
  200. */
  201. export function getLoginQwStatus(data) {
  202. return request({
  203. url: '/qw/user/getLoginQwStatus',
  204. method: 'post',
  205. data: data
  206. })
  207. }
  208. /**
  209. * 企业微信员工账号 直接授权key
  210. */
  211. export function handleAuthAppKey(data) {
  212. return request({
  213. url: '/qw/user/authAppKey',
  214. method: 'post',
  215. data: data
  216. })
  217. }
  218. /**
  219. * 企业微信员工账号 输入的授权key
  220. */
  221. export function handleInputAuthAppKey(data) {
  222. return request({
  223. url: '/qw/user/handleInputAuthAppKey',
  224. method: 'post',
  225. data: data
  226. })
  227. }
  228. /**
  229. * 企业微信员工账号 绑定 云主机
  230. */
  231. export function qwBindCloudHost(appkey) {
  232. return request({
  233. url: '/qw/user/qwBindCloudHost/'+appkey,
  234. method: 'get',
  235. })
  236. }
  237. /**
  238. * 企业微信员工账号 解除绑定 云主机
  239. */
  240. export function qwUnbindCloudHost(appkey) {
  241. return request({
  242. url: '/qw/user/qwUnbindCloudHost/'+appkey,
  243. method: 'get',
  244. })
  245. }
  246. /**
  247. * 获取云主机的账密
  248. */
  249. export function selectCloudAP(data) {
  250. return request({
  251. url: '/qw/user/selectCloudAP',
  252. method: 'post',
  253. data: data
  254. })
  255. }
  256. export function getQwAllUserList(query) {
  257. return request({
  258. url: '/qw/user/getQwAllUserList',
  259. method: 'get',
  260. params: query
  261. })
  262. }
  263. export function updateIsAuto(data) {
  264. return request({
  265. url: '/qw/user/updateIsAuto',
  266. method: 'post',
  267. data: data
  268. })
  269. }
  270. /**
  271. * 登录企业微信(发起登录)
  272. */
  273. export function loginQwIpad(data) {
  274. return request({
  275. url: '/qw/user/loginQwIpad',
  276. method: 'post',
  277. data: data
  278. })
  279. }
  280. export function twoCode(data) {
  281. return request({
  282. url: '/qw/user/twoCode',
  283. method: 'post',
  284. data: data
  285. })
  286. }
  287. export function twoCodeStatus(data) {
  288. return request({
  289. url: '/qw/user/twoCodeStatus',
  290. method: 'post',
  291. data: data
  292. })
  293. }
  294. /**
  295. * 获取登录状态
  296. */
  297. export function qrCodeStatus(data) {
  298. return request({
  299. url: '/qw/user/qrCodeStatus',
  300. method: 'post',
  301. data: data
  302. })
  303. }
  304. export function updateSendType(data) {
  305. return request({
  306. url: '/qw/user/updateSendType',
  307. method: 'post',
  308. data: data
  309. })
  310. }
  311. /**
  312. * 登录企业微信(发起登录)
  313. */
  314. export function getQwIpad(data) {
  315. return request({
  316. url: '/qw/user/getQwIpad',
  317. method: 'post',
  318. data: data
  319. })
  320. }
  321. export function delQwIpad(data) {
  322. return request({
  323. url: '/qw/user/delQwIpad',
  324. method: 'post',
  325. data: data
  326. })
  327. }
  328. export function qrCodeVerify(data) {
  329. return request({
  330. url: '/qw/user/qrCodeVerify',
  331. method: 'post',
  332. data: data
  333. })
  334. }
  335. export function outLoginQwIpad(data) {
  336. return request({
  337. url: '/qw/user/outLoginQwIpad',
  338. method: 'post',
  339. data: data
  340. })
  341. }
  342. export function changeVideoStatus(id) {
  343. return request({
  344. url: '/qw/user/changeVideoStatus',
  345. method: 'get',
  346. params: {id}
  347. })
  348. }
  349. // 分配异地主机
  350. export function handleAllocateRemoteHost(data) {
  351. return request({
  352. url: '/qw/user/allocateRemoteHost',
  353. method: 'post',
  354. data
  355. });
  356. }
  357. // 导出企微员工
  358. export function exportStaff(query) {
  359. return request({
  360. url: '/qw/user/exportStaff',
  361. method: 'get',
  362. params: query
  363. })
  364. }
  365. /**
  366. * 修改ai客服上下线
  367. */
  368. export function updateFastGptRoleStatusById(id) {
  369. return request({
  370. url: '/qw/user/updateFastGptRoleStatusById/' + id,
  371. method: 'get'
  372. })
  373. }