store.js 4.99 KB
import { http } from '@/main'

const url = 'rop-scrm-shopmall/router'

// 门店频道-门店列表
const getMerchantListApi = params => {
  params.method = `scrm.api.shopmall.discover.channel.merchant.list`
  return http({
    url,
    method: 'post',
    data: params,
    sign: true
  })
}
// 门店频道分享
const getMerchantShare = params => {
  params.method = `scrm.api.shopmall.discover.channel.merchant.shared`
  return http({
    url,
    method: 'post',
    data: params,
    sign: true
  })
}
// 新增或编辑门店频道
const configMerchant = params => {
  params.method = `scrm.api.shopmall.discover.channel.merchant.config`
  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 getconfigMerchant = params => {
  params.method = `scrm.api.shopmall.discover.channel.merchant.getconfig`
  return http({
    url,
    method: 'POST',
    data: params
  })
}
// 分页查询频道主题(内容)列表
const getChannelTopicList = params => {
  params.method = `scrm.api.shopmall.discover.channel.topic.page`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    returnAll: true
  })
}
// 频道主题详情
const getTopicDetail = params => {
  params.method = `scrm.api.shopmall.discover.channel.topic.detail`
  return http({
    url,
    method: 'POST',
    data: params,
    returnAll: true
  })
}

// 新增或编辑频道主题
const addChannelTopic = params => {
  params.method = `scrm.api.shopmall.discover.channel.topic.add.or.update`
  return http({
    url,
    method: 'POST',
    data: params,
    returnAll: true
  })
}

// 媒体文件列表
const getTencentcloudmedialist = params => {
  params.method = `scrm.api.shopmall.tencentcloudmedia.list`
  return http({
    url,
    method: 'POST',
    data: params,
    returnAll: true
  })
}
//膨胀金活动
const bulgeActivity = params => {
  params.method = 'scrm.api.shopmall.bulge.activity.page'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

//众筹活动
const crowdfundingActivity = params => {
  params.method = 'scrm.api.shopmall.all.crowdfunding.activity.page'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
//商品
const goodsActivity = params => {
  params.method = 'scrm.api.shopmall.goods.page.allMerchant'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 频道主题(内容)-置顶
const topshelvesChannel = params => {
  params.method = 'scrm.api.shopmall.discover.channel.topic.topshelves'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 频道主题(内容)-上下架
const updownshelvesChannel = params => {
  params.method = 'scrm.api.shopmall.discover.channel.topic.updownshelves'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 删除频道主题(内容)
const deleteChannel = params => {
  params.method = 'scrm.api.shopmall.discover.channel.topic.delete'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}
// 膜类专区-配置券
const configCoupons = params => {
  params.method = 'scrm.api.shopmall.discover.channel.topic.configcoupons'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}
// 编辑-选择定向礼包列表
const getDirectionalGiftListApi = params => {
  params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
  //  params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
  return http({
    url: 'rop-scrm-coupon/router',
    method: 'GET',
    data: params,
    sign: true
  })
}

// 获取膜类专区-配置券
const getCouponconfig = params => {
  params.method = 'scrm.api.shopmall.discover.channel.topic.getcouponconfig'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'GET',
    data: params,
    sign: true,
    returnAll: true
  })
}


export default { getCouponconfig, configCoupons, getDirectionalGiftListApi, deleteChannel, updownshelvesChannel, topshelvesChannel, goodsActivity, crowdfundingActivity, bulgeActivity, getTencentcloudmedialist, addChannelTopic, getTopicDetail, getChannelTopicList, getMerchantListApi, openSubscribe, selStoreConfig, getMerchantShare, configMerchant, getconfigMerchant }