expert.js 1.54 KB
import { http, http_brand, request_merchant } from '@/main'

const getExpertList = params => {
  params.method = 'entmicro.api.operation.page'
  return http({
    url: 'rop-scrm-entmicro/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

const getDepartment = params => {
  params.method = 'entmicro.api.department.listDepartmentTree'
  return http({
    url: '/rop-scrm-entmicro/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

const saveExpert = params => {
  params.method = 'entmicro.api.operation.save'
  return http({
    url: '/rop-scrm-entmicro/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

const delExpert = params => {
  params.method = 'entmicro.api.operation.delete'
  return http({
    url: '/rop-scrm-entmicro/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

const editExpert = params => {
  params.method = 'entmicro.api.operation.update'
  return http({
    url: '/rop-scrm-entmicro/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

const expertDetail = params => {
  params.method = 'entmicro.api.operation.detail'
  return http({
    url: '/rop-scrm-entmicro/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

const getMenberType = params => {
  params.method = 'merchants.api.menu.findAllDictData'
  return request_merchant({
    url: '/rop-merchants/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

export default { getExpertList, getDepartment, saveExpert, delExpert, editExpert, expertDetail, getMenberType }