import ApiPath from './apiPath'
import Api from './api'
import Store from '../store/store'
export default {
	
	post: function (data) { // 合作商户请求
		return Api.request('POST', ApiPath.baseURL ,data)
	},
	get: function (data) {  // 合作商户请求
		
		return Api.request('GET', ApiPath.baseURL ,data)
	},
	postM: function (control,data) { // 移动业务请求
		data.action_type = control
		return Api.request('POST', ApiPath.mobUrl ,data)
	},
	getM: function (control,data) {  // 移动业务请求
		
		data.action_type = control
		return Api.request('GET', ApiPath.mobUrl ,data)
	},
	getMp: function (control,data) {  // mp.eshangtech.com
		data.action_type = control
		return Api.request('GET', ApiPath.mpUrl ,data)
	},
	$get: function (controller,data) { // 合作商户请求
		data.action_type = controller
		return this.get(data)
	},
	$post: function (controller,data) { // 合作商户请求
		data.action_type = controller
		return this.post(data)
	},
	$webGet: function (controller,data) { // webapi
	
		return Api.request('GET', ApiPath.apiurl +controller ,data,true)
	},
	$webPost: function (controller,data) { // webapi
	
		return Api.request('POST', ApiPath.apiurl +controller ,data,true)
	},
	
}