channel.js 2.95 KB
import { http } from '@/main'

const url = 'rop-scrm-shopmall/router'
// 分页查询频道列表
const getChannelListApi = params => {
  params.method = `scrm.api.shopmall.discover.channel.page`
  return http({
    url,
    method: 'post',
    data: params,
    sign: true
  })
}
// 频道详情
const getChannelDetail = params => {
  params.method = `scrm.api.shopmall.discover.channel.detail`
  return http({
    url,
    method: 'post',
    data: params,
    sign: true,
    returnAll: true
  })
}
// 新增或编辑频道
const updateChannel = params => {
  params.method = `scrm.api.shopmall.discover.channel.add.or.update`
  return http({
    url,
    method: 'post',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 门店频道详情
const getMerchantChannelDetail = params => {
  params.method = `scrm.api.shopmall.discover.channel.merchant.detail`
  return http({
    url,
    method: 'post',
    data: params,
    sign: true,
    returnAll: true
  })
}
// 新增或编辑门店频道
const updateMerchantChannel = params => {
  params.method = `scrm.api.shopmall.discover.channel.merchant.add.or.update`
  return http({
    url,
    method: 'post',
    data: params,
    sign: true,
    returnAll: true
  })
}
// 开通订阅
const openSubscribe = params => {
  params.method = `entmicro.api.system.subscribe.open`
  return http({
    url,
    method: 'post',
    data: params,
    sign: true,
    returnAll: true
  })
}

//查询商户配置
const selStoreConfig = params => {
  params.method = `scrm.api.equity.service.merchant.pagination.list.get`
  return http({
    url: 'rop-scrm-equity/router',
    method: 'POST',
    data: params,
    returnAll: true
  })
}
// 关联活动
const correlateActivity = params => {
  params.method = `entmicro.api.system.subscribe.activity.correlate`
  return http({
    url,
    method: 'POST',
    data: params,
    returnAll: true
  })
}
const getActivityList = params => {
  params.method = `scrm.api.shopmall.select.bulge.activity.page`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    returnAll: true
  })
}
// 更改商户开通状态
const updateState = params => {
  params.method = `entmicro.api.system.subscribe.state.update`
  return http({
    url,
    method: 'POST',
    data: params,
    returnAll: true
  })
}
// 生成救援贴
const generateRescueCode = params => {
  params.method = `entmicro.api.system.subscribe.rescue.generate`
  return http({
    url,
    method: 'POST',
    data: params,
    returnAll: true
  })
}
// 订阅开通商户分页查询
const subscribeMerchant = params => {
  params.method = `entmicro.api.system.subscribe.merchant.page`
  return http({
    url,
    method: 'POST',
    data: params,
    returnAll: true
  })
}

export default { updateMerchantChannel,getMerchantChannelDetail,subscribeMerchant, generateRescueCode, updateState, getActivityList, getChannelListApi, openSubscribe, selStoreConfig, getChannelDetail, updateChannel, correlateActivity }