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) {  // eshangtech.com:18998
	// 	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)
	},
	$apiGet: function (controller, data) {
		return Api.request('GET', ApiPath.apiEsUrl + controller, data || {}, true)
	},
	$apiPost: function (controller, data) {
		return Api.request('POST', ApiPath.apiEsUrl + controller, data || {}, true)
	},
	$SamemberApiPost: function (controller, data) {
		return Api.request('POST', ApiPath.samemberUrl + controller, data || {}, true)
	},
	$posGet: function (controller, data) {
		return Api.request('GET', ApiPath.posApiurl + controller, data || {}, true)
	},
	$posPost: function (controller, data) {
		return Api.request('POST', ApiPath.posApiurl + controller, data || {}, true)
	},
	$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)
	},
	$webGetTest: function (controller, data) { // webapi
		return Api.request('GET', ApiPath.testApiurl + controller, data || {}, true)
	},
	$webPostTest: function (controller, data) { // webapi
		return Api.request('POST', ApiPath.testApiurl + controller, data || {}, true)
	},
	$webJava: function (controller, data) { // webapi
		return Api.request('POST', ApiPath.javaUrl + controller, data || {}, true)
	},
	$webJavaGet: function (controller, data) { // webapi
		return Api.request('GET', ApiPath.javaUrl + controller, data || {}, true)
	},

	$cloudUrlGet: function (data) { // webapi
		return Api.request('GET', ApiPath.cloudUrl, data)
	},
}