import { creatRequest } from '../../utils/request.js';

const requestList = {
  //退出登录
  logout: {
    method: 'POST',
    url: 'login/out'
  },
	//获取用户信息
	getuser:{
		method: 'GET',
		url: 'user'
	},
	// 是否日志推送
	getVersionLog:{
		method: 'GET',
		url: 'versionInfo/getVersionLog'
	},
	// 确定已读
	hadRead:{
		method: 'POST',
		url: 'versionInfo/hadRead'
	},
	getThisVersionInfo:{
		method: 'GET',
		url: 'versionInfo/getThisVersionInfo'
	}
};
export const commServer = ({ key, data }) => {
  let obj = requestList[key];
  return creatRequest(obj, data);
}