user.js 7.2 KB

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