operator.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /**
  2. *@des 运营人员管理接口
  3. *@author zhengjinyi
  4. *@date 2020/03/19 14:56:57
  5. *@param registerByPass
  6. */
  7. import request from '@/common/config/caimeiApi.js'
  8. import $reg from '@/common/config/common.js'
  9. /**
  10. *获取运营人员管理列表
  11. *@param status
  12. *@param pageNum
  13. *@param pageSize
  14. */
  15. export function queryOperatorList(params) {
  16. return new Promise(function(resolve,reject) {
  17. request.get('/operation/list',params, res => {
  18. if(res.code == 0){
  19. resolve(res)
  20. }else{
  21. reject(res)
  22. }
  23. })
  24. })
  25. }
  26. /**
  27. *添加运营人员
  28. */
  29. export function addOperator(params) {
  30. return new Promise(function(resolve,reject) {
  31. request.post('/operation/add',params,true, res => {
  32. if(res.code == 0){
  33. resolve(res)
  34. }else{
  35. reject(res)
  36. }
  37. })
  38. })
  39. }
  40. /**
  41. *删除运营人员
  42. */
  43. export function deleteOperator(params) {
  44. return new Promise(function(resolve,reject) {
  45. request.post('/operation/delete',params,true,res => {
  46. if(res.code == 0){
  47. resolve(res)
  48. }else{
  49. reject(res)
  50. }
  51. })
  52. })
  53. }
  54. /**
  55. *更新邀请码
  56. */
  57. export function updateCode(params) {
  58. return new Promise(function(resolve,reject) {
  59. request.post('/operation/updateInvitationCode',params,true, res => {
  60. if(res.code == 0){
  61. resolve(res)
  62. }else{
  63. reject(res)
  64. }
  65. })
  66. })
  67. }