import config from "@/config";
import http from "@/utils/request";

export default {
	verifyCode: {
		url: `${config.API_URL}/sms.code.send`,
		name: "获取短信验证码",
		post: async function (params) {
			return await http.post(this.url, params);
		}
	},
	getInfo: {
		url: `${config.API_URL}/user.bind.info`,
		name: "获取绑定（微信、钉钉）个人中心",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	uploadAvatar:{
		url: `${config.API_URL}/user.update.avatar`,
		name: "个人头像上传",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	getInformation:{
		url: `${config.API_URL}/user.information`,
		name: "获取登录用户个人信息",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	editUser:{
		url: `${config.API_URL}/user.update.me`,
		name: "修改个人信息",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	bindMobile:{
		url: `${config.API_URL}/user.bind.mobile`,
		name: "绑定手机号",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	editPass:{
		url: `${config.API_URL}/user.re.pwd`,
		name: "修改个人密码",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	resetPassword:{
		url: `${config.API_URL}/user.find.password`,
		name: "修改个人密码",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	register:{
		url: `${config.API_URL}/user.register`,
		name: "邮箱注册用户",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	active:{
		url: `${config.API_URL}/email.active.account`,
		name: "邮箱注册用户激活",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	resetPass:{
		url: `${config.API_URL}/user.reset.pwd`,
		name: "重置个人密码",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	timeoutConfig:{
		url: `${config.API_URL}/sys.login.timeout`,
		name: "登录超时退出配置",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	timeoutGet:{
		url: `${config.API_URL}/sys.login.timeout.config`,
		name: "获取登录超时时间",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	log:{
		url: `${config.API_URL}/user.log.list`,
		name: "用户操作日志",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	export:{
		url: `${config.API_URL}/user.log.export`,
		name: "用户日志导出",
		post: async function (params) {
			return await http.post(this.url,params);
		}
	},
	subscribe:{
		list:{
			url: `${config.API_URL}/messages.subscribe.list`,
			name: "消息订阅列表",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		set:{
			url: `${config.API_URL}/messages.user.subscribe`,
			name: "消息订阅",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		}
	},
	messages:{
		list:{
			url: `${config.API_URL}/messages.todo.list`,
			name: "消息列表",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		read:{
			url: `${config.API_URL}/user.read.message`,
			name: "消息已读",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		delete:{
			url: `${config.API_URL}/messages.todo.del`,
			name: "删除待办消息",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		}
	}

};
