You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
2.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import request from '@/utils/requestUtil'
export function memberLogin(data) {
return request({
method: 'POST',
url: '/sso/login',
header: {
'content-type': 'application/x-www-form-urlencoded;charset=utf-8'
},
data: data
})
}
export function memberInfo() {
return request({
method: 'GET',
url: '/sso/info'
})
}
/*
* 获取支持的手机号国家码
* */
export function supportedCountryCode() {
return request({
requestBase:'USER', // 携带 USER 模块独有的配置
method: 'GET',
url: '/user/user/supportedCountryCode'
})
}
/*
* 发送短信验证码
* @data mobile 手机号 (必填)
* @data deviceId 设备id (必填)
* @data countryCode 国家码,默认为‘+86
* @data imageCheckCode 图形验证码
**/
export function sendsms(data) {
return request({
requestBase:'USER', // 携带 USER 模块独有的配置
header: {
'content-type': 'application/x-www-form-urlencoded;charset=utf-8'
},
method: 'POST',
url: '/user/user/sendsms',
data: data
})
}
/*
* 登录/注册
* @data mobile 手机号 (必填)
* @data deviceId 设备id (必填)
* @data mobileCheckCode 6位验证码 (必填)
* @data deviceBrand 设备品牌
**/
export function appLogin(data) {
return request({
requestBase:'USER', // 携带 USER 模块独有的配置
header: {
'content-type': 'application/x-www-form-urlencoded;charset=utf-8'
},
method: 'POST',
url: '/user/user/appLogin',
data: data
})
}
/*
* 微信wxId登录/注册
* @data code code码 (必填)
* @data deviceId 设备id (必填)
* @data mobile 手机号
* @data mobileCheckCode 6位验证码
* @data deviceBrand 设备品牌
**/
export function wxIdLogin(data) {
return request({
requestBase:'USER', // 携带 USER 模块独有的配置
method: 'POST',
url: '/user/user/wxIdLogin',
data: data
})
}
/*
* 退出登录
* @hearder Authorization
**/
export function logout() {
return request({
requestBase:'USER', // 携带 USER 模块独有的配置
method: 'POST',
url: '/user/user/logout'
})
}
/*
* 获取个人信息
* */
export function getUserInfo() {
return request({
requestBase:'USER', // 携带 USER 模块独有的配置
method: 'GET',
url: '/user/my/userInfo'
})
}