import { myFetch} from '../utils/fetch';
import { httpApi } from '../common/js/baseUrl'; // ocr识别
import zlbApi from '@/api/zlbApi';

// 服务和门牌搜索 '/doorplateInfoApp/searchDoorplateOrIntegrationAppList'
export const search = (data) => {
    const url = zlbApi.searchDoorplateOrIntegrationAppList; // '/doorplateInfoApp/searchDoorplateOrIntegrationAppList'
    return myFetch(url, 'post', data,'json');
}

// 门牌绑定微信 '/doorplateInfoApp/doorplateBindWxAndValid'
export const bindOpenidAndDoor = (data) => {
    const url = zlbApi.doorplateBindWxAndValid; // '/doorplateInfoApp/doorplateBindWxAndValid'
    return myFetch(url, 'post', data,'json');
}

// 所有门牌服务列表 '/doorplateInfoApp/getAllIntegrationAppList'
export const getServiceList = (data) => {
    const url = zlbApi.getAllIntegrationAppList; // '/doorplateInfoApp/getAllIntegrationAppList'
    return myFetch(url, 'post', data,'json');
}

// 获取门牌信息 '/doorplateInfoApp/getHomePageOneDoorplateFullInfo'
export const getDoorplateInfo = (data) => {
    const url = zlbApi.getHomePageOneDoorplateFullInfo; // '/doorplateInfoApp/getHomePageOneDoorplateFullInfo'
    return myFetch(url, 'post', data,'json');
}

// 获取企业门牌的处罚、失信、经营异常列表 '/doorplateInfoApp/getCorpCfSxYcListByDoorplateAndTyshxydm'
export const getCropRiskList = (data) => {
    const url = zlbApi.getCorpCfSxYcListByDoorplateAndTyshxydm; // '/doorplateInfoApp/getCorpCfSxYcListByDoorplateAndTyshxydm'
    return myFetch(url, 'post', data,'json');
}

// 门牌户主信息申请 '/doorplateInfoApp/hzInfoApply'
export const saveHzInfo = (data) => {
    const url = zlbApi.hzInfoApply; // '/doorplateInfoApp/hzInfoApply'
    return myFetch(url, 'post', data,'json');
}

/**
 * 新接口 获取门牌详情
 * get /business/applet-house-number/appletHouseNumberInfo
 */
export const getDoorplateInfoNew=(data)=>{
    const url = zlbApi.getDoorplateInfoNew;
    return myFetch(url, 'get', data, 'json');
}