import { Service } from '@/Service/Service';
/*****公共接口*****/
class NvpPubService {
	private static GetIndexPath: string = '/Pub/GetIndex';
	/*****主页信息*****/
	static GetIndex() {
		var result = Service.Request(this.GetIndexPath, "GET", "");
		return result;
	}

	private static GetIndexDataPath: string = '/Pub/GetIndexData';
	/*****获取首页数据*****/
	static GetIndexData(lon: number, lat: number, city: string, county: string, sort: number, page: number) {
		var result = Service.Request(this.GetIndexDataPath, "GET", { lon, lat, city, county, sort, page });
		return result;
	}

	private static GetMenuDataPath: string = '/Pub/GetMenuData';
	/*****获取分类*****/
	static GetMenuData(type: string, parent: string) {
		var result = Service.Request(this.GetMenuDataPath, "GET", { type, parent });
		return result;
	}

	private static GetMerchDataPath: string = '/Pub/GetMerchData';
	/*****获取店铺*****/
	static GetMerchData(code: string, serch: string, assId: string, lon: number, lat: number, city: string, county: string, sort: number, page: number, limit: number) {
		var result = Service.Request(this.GetMerchDataPath, "GET", { code, serch, assId, lon, lat, city, county, sort, page, limit });
		return result;
	}

	private static GetRandomMerchPath: string = '/Pub/GetRandomMerch';
	/*****随机获取商家*****/
	static GetRandomMerch(count: number, lon: number, lat: number, city: string, county: string) {
		var result = Service.Request(this.GetRandomMerchPath, "GET", { count, lon, lat, city, county });
		return result;
	}

}
export {
	Service,
	NvpPubService
}
