/*
 * @Author: zc
 * @description 系统参数配置
 * @version: 
 * @Date: 2022-08-26 14:43:22
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-11-10 13:24:01
 */
import request from '/@/utils/request';
/**
 * @description 获取系统参数列表
 * @param {object} params
 * @return {*}
 */
 export const getSystemSettings = (params: object) => {
	return request({
		url: '/api/v1/Setting/getsyssettings',
		method: 'get',
		params
	});
};
/**
 * @description 新增配置
 * @param {object} data
 * @return {*}
 */
export const SetingsAdd = (data: object) => {
	return request({
		url: '/api/v1/Setting/setting-add',
		method: 'post',
		data
	});
};
/**
 * @description 更新配置
 * @param {object} data
 * @return {*}
 */
 export const modifySettings = (data: object) => {
	return request({
		url: '/api/v1/Setting/modifysettings',
		method: 'post',
		data
	});
};
/**
 * @description 删除配置
 * @param {object} params
 * @return {*}
 */
// export const removeSetitngs = (params: object) => {
// 	return request({
// 		url: '/api/v1/Setting/modifysettings',
// 		method: 'post',
// 		data: params,
// 	});
// };
/**
 * @description 查询配置详情
 * @param {string} id  配置id
 */
export const setitngsDetail = (id:string) => {
	return request({
		url: `/api/v1/Setting/getsetting-entity/${id}`,
		method: 'get',
	});
};
/**
 * @description 查询配置详情
 * @param {string} code 配置编码
 * @return {*}
 */
export const getSettingByCode = (code:string): any => {
	return request({
		url: `/api/v1/Setting/getsetting-code/${code}`,
		method: 'get',
	});
};