import req from '../request'

module.exports = {

	//获取token
	getLogin: data => {
		return req({
			url: '/user/login',
			method: 'post',
			data: data,
			headers: {
				auth: false, //不要鉴权
			}
		});
	},

	//获取登录信息
	getUserInfo: data => {
		return req({
			url: '/user/userinfo',//新接口/user/login
			method: 'get',
			data: data,
			headers: {
				showLoading: false,
			}
		});
	},

	//百度语音token
	baiduToken: data => {
		return req({
			url: '/bdapi_token',
			method: 'get',
			data: data,
			headers: {
				showLoading: false,
			}
		});
	},
	
	//获取APP
	getApp: data => {
		return req({
			url: '/appversion',
			method: 'get',
			data: data,
			header: JSON.stringify({
				"Content-Type": "application/x-www-form-urlencoded",
			}),
			headers: {
				auth: false, //不要鉴权
				showLoading: false,
			}
		});
	},
	
	//退出登录
	getLogout: data => {
		return req({
			url: '/user/logout',
			method: 'get',
			data: data,
		});
	},
}
