51 lines
1009 B
JavaScript
51 lines
1009 B
JavaScript
import request from '@/utils/request'
|
|
|
|
/**
|
|
* 获取手机验证码
|
|
*/
|
|
export function getSendCode(data) {
|
|
return request({
|
|
'url': '/api/front/login/send/code',
|
|
method: 'post',
|
|
timeout: 20000,
|
|
data
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 用户验证码登录
|
|
*/
|
|
export function userLogin(data) {
|
|
return request({
|
|
'url': '/api/front/login/mobile/captcha',
|
|
'method': 'post',
|
|
'data': data
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 小程序用户登录
|
|
* @param data object 小程序用户登录信息
|
|
*/
|
|
export function loginPhone(data) {
|
|
// return request.post("login/wechat/phone", data, { noAuth : true });
|
|
return request({
|
|
'url': '/api/front/login/wechat/phone',
|
|
'method': 'post',
|
|
'data': data
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 微信(公众号,小程序)绑定手机号
|
|
* @param {Object} data
|
|
*/
|
|
export function getUserPhone(data){
|
|
// return request.post('login/wechat/register/binding/phone',data,{noAuth : true});
|
|
return request({
|
|
'url': '/api/front/login/wechat/register/binding/phone',
|
|
'method': 'post',
|
|
'data': data
|
|
})
|
|
}
|