marketing.js 3.83 KB
/**
 * 新增参数sign 判断接口是否需要sign签名
 */
/**
 * 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
 * @param {*} params
 * @returns
 */
import { http } from '@/main'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
const getCoupon = params => {
    params.method = 'scrm.api.boutiquecoupon.coupon.page'
    return http({
        url: '/rop-scrm-boutiquecoupon/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const getMerchant = params => {
    params.method = 'scrm.api.coupon.list.merchant'
    return http({
        url: 'rop-scrm-coupon/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const getCard = params => {
    params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
    return http({
        url: 'rop-scrm-equity/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const getPackage = params => {
    params.method = 'scrm.api.equity.package.info.list.with.page'
    return http({
        url: 'rop-scrm-equity/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const getActivity = params => {
    params.method = 'scrm.api.shopmall.activity.page'
    return http({
        url: 'rop-scrm-shopmall/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const findAllByPage = params => {
    params.method = 'entmicro.api.dracIm.findAllByPage'
    params.sessionId = session
    return http({
        url: 'rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const exportAdd = params => {
    params.method = 'entmicro.api.dracIm.exportAdd'
    params.sessionId = session
    return http({
        url: 'rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const exportUpdate = params => {
    params.method = 'entmicro.api.dracIm.exportUpdate'
    params.sessionId = session
    return http({
        url: 'rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const findById = params => {
    params.method = 'entmicro.api.dracIm.findById'
    params.sessionId = session
    return http({
        url: 'rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const dracImMessage = params => {
    params.method = 'entmicro.api.dracImMessage.findAllByCondition'
    params.sessionId = session
    return http({
        url: 'rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const listChannelCodeBill = params => {
    params.method = 'entmicro.api.code.listChannelCodeBill'
    params.sessionId = session
    return http({
        url: '/rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const addConfig = params => {
    params.method = 'entmicro.api.dracImConfig.addConfig'
    params.sessionId = session
    return http({
        url: '/rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const findConfig = params => {
    params.method = 'entmicro.api.dracImConfig.findConfig'
    params.sessionId = session
    return http({
        url: '/rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
const updateConfig = params => {
    params.method = 'entmicro.api.dracImConfig.updateConfig'
    params.sessionId = session
    return http({
        url: '/rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
export default {
    getCoupon,
    getMerchant,
    getCard,
    getPackage,
    getActivity,
    listChannelCodeBill,
    findAllByPage,
    dracImMessage,
    exportAdd,
    exportUpdate,
    findById,
    updateConfig,
    findConfig,
    addConfig
}