import qywx from '../../const/qywx';
import { request } from '../../axios';

const QYWXAPI = 'fw';


/**
 * 根据临时票据查询用户信息
 * @param params
 * @returns {Promise<unknown>}
 */
export const qywxUserInfo = (params) => request({
    url: `${QYWXAPI}/qywx/user`,
    method: 'get',
    params: { ...params, agentId: qywx.agentId },
}).then(resp => resp.data);


/**
 * 简单的全局模糊查询
 * @param params 参数信息
 * @returns {Promise<AxiosResponse<any>>}
 */
export const qywxSearch = (params) => request({
    url: `${QYWXAPI}/wx/search`,
    method: 'get',
    params: { ...params, agentId: qywx.agentId },
}).then(resp => resp.data);

