import request from "@/utils/httpRequest";

export default {
	list: function (params) {
		return request({
			url: "/wdt/merchantDetails/list",
			method: "get",
			params: params,
		});
	},
	getLimit1: function () {
		return request({
			url: "/wdt/merchantDetails/getLimit1",
			method: "get",
		});
	},
	save: function (inputForm) {
		return request({
			url: "/wdt/merchantDetails/save",
			method: "post",
			data: inputForm,
		});
	},
	saveDataSources: function (dataSources) {
		console.log(dataSources);
		return request({
			url: "/wdt/merchantDetails/saveDataSources",
			method: "post",
			params: { dataSources: dataSources },
		});
	},
	screenSave: function (screenName,filePath) {
		return request({
			url: "/wdt/merchantDetails/screenSave",
			method: "post",
			params: { screenName: screenName,filePath:filePath },
		});
	},
	delete: function (ids) {
		return request({
			url: "/wdt/merchantDetails/delete",
			method: "delete",
			params: { ids: ids },
		});
	},

	exportTemplate: function () {
		return request({
			url: "/wdt/merchantDetails/import/template",
			method: "get",
			responseType: "blob",
		});
	},

	exportExcel: function (params) {
		return request({
			url: "/wdt/merchantCompany/export",
			method: "get",
			params: params,
			responseType: "blob",
		});
	},

	importExcel: function (data) {
		return request({
			url: "/wdt/merchantCompany/import",
			method: "post",
			data: data,
		});
	},
};
