home.js 3.52 KB
/**
 * 新增参数sign 判断接口是否需要sign签名
 */
/**
 * 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
 * @param {*} params
 * @returns
 */
import { http } from '@/main'
const url = '/rop-scrm-entmicro/router'
const urlc = '/rop-scrm-wwbench/router'
const getChart = params => {
    params.method = 'entmicro.api.home.view.chart'
    return http({
        url,
        method: 'POST',
        data: params,
        sign: true
    })
}

const getSort = params => {
    params.method = 'entmicro.api.home.view.sort'

    return http({
        url,
        method: 'POST',
        data: params,
        sign: true
    })
}
const getStore = params => {
    params.method = 'entmicro.api.home.view.store.data'

    return http({
        url,
        method: 'POST',
        data: params,
        sign: true
    })
}
const getShop = params => {
    params.method = 'entmicro.api.home.view.shop.data'

    return http({
        url,
        method: 'POST',
        data: params,
        sign: true
    })
}
const getView = params => {
    params.method = 'entmicro.api.home.view.data'

    return http({
        url,
        method: 'POST',
        data: params,
        sign: true
    })
}
const findLoginCount = params => {
    params.method = 'entmicro.api.common.findLoginCount'

    return http({
        url,
        method: 'POST',
        data: params,
        sign: true
    })
}
const findMerchantInfoByMerchantNo = params => {
    params.method = 'entmicro.api.common.findMerchantInfoByMerchantNo.list'

    return http({
        url,
        method: 'POST',
        data: params,
        sign: true
    })
}
const outputValue = params => {
    params.method = 'scrm.api.wwbench.outputValue.stat'

    return http({
        url: urlc,
        method: 'POST',
        data: params,
        sign: true
    })
}
const merchantRank = params => {
    params.method = 'scrm.api.wwbench.outputValue.stat.merchantRank'

    return http({
        url: urlc,
        method: 'POST',
        data: params,
        sign: true
    })
}
const outputValueTotal = params => {
    params.method = 'scrm.api.wwbench.outputValue.stat.total'

    return http({
        url: urlc,
        method: 'POST',
        data: params,
        sign: true
    })
}
//当日新增客户数
const getCustomer = params => {
    params.method = 'entmicro.api.customer.page'
    return http({
        url: '/rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
//当日新增客户数导出
const customerViewExport = params => {
    params.method = 'entmicro.api.customer.customerViewExport'
    return http({
        url: '/rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}

//当日新增群客户数
const customerCustPage = params => {
    params.method = 'entmicro.api.customer.base.cust.page'
    return http({
        url: '/rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}
//当日新增群客户数导出
const customerBaseCustListExport = params => {
    params.method = 'entmicro.api.customer.base.list.customerBaseCustListExport'
    return http({
        url: '/rop-scrm-entmicro/router',
        method: 'POST',
        data: params,
        sign: true
    })
}

export default {
    getChart,
    getView,
    getSort,
    getShop,
    getStore,
    findLoginCount,
    findMerchantInfoByMerchantNo,
    outputValue,
    outputValueTotal,
    getCustomer,
    merchantRank,
    customerViewExport,
    customerCustPage,
    customerBaseCustListExport
}