// Promise封装请求
// import Request from './request.js';
// let request = Request.http



// export default {
//     getJobList: function () {
//         return request('/jobList',{name:123},"Post",1)
//     },
// 	getList: function (data) {
// 	    return request('/jobList',data,"Post",1)
// 	}
// }
// flyio封装请求 拦截
import request from "./request.js";
let fly = request.fly;
export default {
	//登录获取token
	getUserLogin:(data)=>{
		return fly.request("user",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//首页
	getIndex:(data)=> {   //首页加载数据
		return fly.request("p_search/show",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//获取用户状态   入驻  审核中  管理店铺
	// getUserStatus:(data)=>{
	// 	return fly.request("p_search/show",data,{
	// 		method:"post",
	// 		timeout:5000 //超时设置为5s
	// 	})
	// },
	//商家详情页
	getShopDetail:(data)=>{
		return fly.request("p_search/provider_detail",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//商家详情跳转图册
	getShopPhoto:(data)=>{
		return fly.request("p_search/photo",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//商家详情跳转主营信息明细
	getShopMessage:(data)=>{
		return fly.request("service_category/showServiceItemChoose",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//商家详情页服务项目导航栏点击查询
	getShopProject:(data)=>{
		return fly.request("p_search/list_service_item",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//商家服务项目详情
	getShopProjectDetail:(data)=>{
		return fly.request("p_search/service_item_detail",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//商家品牌详情查询
	getShopBrand:(data)=>{
		return fly.request("p_search/get_brand",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//查询品牌下其他店铺
	getBrandOther:(data)=>{
		return fly.request("p_search/other_provider",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//点击收藏商家
	collect:(data)=>{
		return fly.request("common/collection/save",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//商家报错页面查询数据
	getShopError:(data)=>{
		return fly.request("p_search/provider_show",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//商家报错提交数据
	submitShopError:(data)=>{
		return fly.request("p_search/save_correction",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//活动资讯加载列表
	getNewsList:(data)=>{
		return fly.request("p_search/activity_show",'',{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	// 导航栏切换查询数据
	getNewsItem:(data)=>{
		return fly.request("p_search/get_activity_type",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//新闻列表跳详情
	getNewsDetail:(data)=>{
		return fly.request("p_search/get_activity",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//入驻绑定手机号发送验证码
	getCode:(data)=>{
		return fly.request("wx/send_sms_code",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//入驻绑定手机号提交
	bindPhone:(data)=>{
		return fly.request("wx/user_binding",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//入驻填写资料获取地理位置
	getAddress:(data)=>{
		return fly.request("common/getAddress",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//获取服务商主营信息
	getServiceMessage:(data)=>{
		return fly.request("service_category/mainBusinessChoose",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//入驻提交信息
	freeEnterSubmit:(data)=>{
		return fly.request("provider/save",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//提交认证资料
	submitVipData:(data)=>{
		return fly.request("authentication/save",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//从用户下单起计算时间
	getUserEnterTime:(data)=>{
		return fly.request("authentication/getAuthTimeBucket",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//下单使用默认优惠券
	getUserDiscount:(data)=>{
		return fly.request("authCoupon/default_useCoupon",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//下单支付
	getUserPay:(data)=>{
		return fly.request("order/unified_order",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//获取用户所有的优惠券
	getUserAllDiscount:(data)=>{
		return fly.request("authCoupon/listAuthCoupon",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//支付成功加载订单信息
	getUserOrder:(data)=>{
		return fly.request("order/get_order",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//个人中心
	//加载留言反馈数据
	getUserFeedBack:(data)=>{
		return fly.request("common/all_feedback",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//留言反馈 提交表单
	submitUserFeenBack:(data)=>{
		return fly.request("common/save_feedback",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//留言反馈 回复内容
	getUserFeedReply:(data)=>{
		return fly.request("common/tab_feedback",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//消息中心列表
	getUserMessageList:(data)=>{
		return fly.request("common/all_message",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//消息中心详情页
	getUserMessageDetail:(data)=>{
		return fly.request("common/get_message",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//个人中心我的收藏
	getUserMyCollect:(data)=>{
		return fly.request("common/all_collection",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//删除我的收藏
	deleteMyCollect:(data)=>{
		return fly.request("common/del_collection",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//浏览记录
	getUserMyHistory:(data)=>{
		return fly.request("common/all_browse_record",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//删除浏览记录
	deleteMyhistory:(data)=>{
		return fly.request("common/del_browse_record",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//加载分享人的数据
	getUserMyShare:(data)=>{
		return fly.request("authCoupon/invitationInfo",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//个人中心关于我们
	getUserAbout:()=>{
		return fly.request("common/get_about",'',{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//帮助中心
	getUserHelp:()=>{
		return fly.request("common/all_hc",'',{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//帮助中心导航栏点击查询
	getUserHelpHeader:(data)=>{
		return fly.request("common/all_hc_type",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//个人中心店铺管理
	getUserStoreMessage:(data)=>{
		return fly.request("provider/get_one",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//个人中心服务项目查询
	getUserStoreMyServe:(data)=>{
		return fly.request("service_item/get_all",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//店铺管理服务项目导航栏点击查询
	getUserStoreServeItem:(data)=>{
		return fly.request("p_search/list_service_item",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//店铺管理删除服务项目
	delUserMyServe:(data)=>{
		return fly.request("service_item/remove",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//项目类别
	getUserMyServeClass:(data)=>{
		return fly.request("service_category/serviceItemChoose",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//添加服务项目保存
	submitUserMyServe:(data)=>{
		return fly.request("service_item/save",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//服务项目编辑，回显信息
	getUserMyServrWrite:(data)=>{
		return fly.request("p_search/service_item_show",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	},
	//个人中心修改主营业务
	getUserMyMessage:(data)=>{
		return fly.request("service_category/update_mainBusinessChoose",data,{
			method:"post",
			timeout:5000 //超时设置为5s
		})
	}
	
}