const _Http = getApp().globalData.http;
module.exports = {
    /**
     * 获取筛选分类查询 无分页
     * customerpoolname 公海池
     * customertypemx 医院类型
     * customergrade 客户分类
     * agentgrade 客户等级
     * industry 客户行业
     * tags 客户标签
     * 'agentgrade',
     */
    async getTypes(name) {
        let params = null;
        if (["customerpoolname", 'customertypemx', 'customergrade', 'customergrade', 'industry'].includes(name)) {
            params = {
                "classname": "sysmanage.develop.optiontype.optiontype",
                "method": "optiontypeselect",
                "content": {
                    "nochace": true,
                    "pageNumber": 1,
                    "pageSize": 1000,
                    "typename": name,
                    "parameter": {
                        "siteid": wx.getStorageSync('userMsg').siteid
                    }
                }
            }
        } else if (name == 'tags') {
            params = {
                "id": 20221013104401,
                "content": {
                    "nochace": true,
                    "isExport": 1,
                    "pageNumber": 1,
                    sys_systemtagid: 2,
                    "pageSize": 1000,
                    "where": {
                        "condition": ""
                    }
                }
            }
        }
        if (!params) return;
        let res = await _Http.basic(params);
        console.log(`查询${name}`, res)
        return res.code == '1' ? res.data : [];
    }
}