import request from '@/utils/request'

// 获取用户详细信息
export function getInfo() {
  return request({
    'url': '/wechat/userinfo/getUserInfo',
    'method': 'get'
  })
}

// 退出方法
export function logout() {
  return request({
    'url': '/auth/logout',
    'method': 'delete'
  })
}

//手机号登陆
export function phoneLogin(data) {
	return request({
		url: '/auth/phoneLogin',
		headers: {
			isToken: false
		},
		method: 'post',
		data: data
	})
}

//获取OPENID 存sessionkey
export function getOpenIdByCode(data) {
	return request({
		url: '/auth/getOpenIdByCode',
		headers: {
			isToken: false
		},
		method: 'post',
		data: data
	})
}

//获取微信手机号
export function getWxUserPhone(data) {
	return request({
		url: '/auth/getWxUserPhone',
		method: 'post',
		data: data
	})
}
