expert.js 1.52 KB
import { http, http_brand } 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 getMerchantTree = params => {
  params.method = 'entmicro.api.common.findMerchantTreeByMerchantNo.list'
  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 http({
    url: '/rop-merchants/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

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