proManage.js 1.63 KB
import { http } from '@/main'

const defaultPath = 'scrm.api.shopmall.goods.'

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

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

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

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

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

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

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

export default { getListApi, getProShareApi, topProApi, updateStatusProApi, deleteTakeProApi, getProInfoApi, insertOrUpdateProApi }