import request from '@/utils/request'
import { AxiosPromise } from 'axios'

/**
 * 获取路由列表
 */
function getMessage() {
	return request({
		url: '/sys/message/inform',
		method: 'get'
		// extraConfig: { showFullscreenLoading: true }
	})
}

function getMessageInfo(data: any): AxiosPromise {
	return request({
		url: '/sys/message/page',
		method: 'post',
		data
	})
}

function getMessageInfoById(id: any): AxiosPromise {
	return request({
		url: '/sys/message/get?id=' + id,
		method: 'get'
	})
}

/**
 * 扩展配置 - 删除
 */
function messageDeleteApi(data: any): AxiosPromise {
	return request({
		url: '/sys/message/delete',
		method: 'post',
		data
	})
}
export default {
	getMessage,
	getMessageInfo,
	getMessageInfoById,
	messageDeleteApi
}
