classifyList.js 1.23 KB
import { http } from '@/main'

const defaultPath = 'scrm.api.shopmall.'

const getListApi = params => {
  params.method = `${defaultPath}classify.page.curMerchant`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'GET',
    data: params,
    sign: true
  })
}

const getClassifyInfoApi = params => {
  params.method = `${defaultPath}classify.getById`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'GET',
    data: params,
    sign: true
  })
}

const insertClassifyApi = params => {
  params.method = `${defaultPath}classify.insertOrUpdate`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

const deleteClassifyApi = params => {
  params.method = `${defaultPath}classify.delete`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

const topClassifyApi = params => {
  params.method = `${defaultPath}classify.updateToTop`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

export default { getListApi, getClassifyInfoApi, insertClassifyApi, deleteClassifyApi, topClassifyApi }