import http from './interface'

// 登录
export const login = (data) => {
	return http.request({
		url: '/mall/user/login',
		method: 'POST',
		data
	})
}

// 验证码
export const sendCode = (data) => {
	return http.request({
		url: '/mall/user/login/send',
		method: 'POST',
		data
	})
}
// 再次发送新号码验证码 
export const sendNewCode = (data) => {
	return http.request({
		url: '/mall/user/phone/send/token',
		method: 'POST',
		data
	})
}
// 确认新手机号 
export const confirmNew = (data) => {
	return http.request({
		url: '/mall/user/phone/update',
		method: 'POST',
		data
	})
}
export const getOpenId = (data) => {
	return http.request({
		url: '/mall/user/openid',
		method: 'POST',
		data
	})
}

export default {
	login,
	sendCode,
	sendNewCode,
	confirmNew,
	getOpenId

}
