init
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { request } from '@/common/js/request.js'
|
||||
|
||||
// 获得用户的基本信息
|
||||
export function getUserInfo() {
|
||||
return request({
|
||||
url: 'member/user/profile/get',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function updateNickname(nickname) {
|
||||
return request({
|
||||
url: 'member/user/profile/update-nickname',
|
||||
method: 'post',
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
data: {
|
||||
nickname
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { request } from '@/common/js/request.js'
|
||||
|
||||
// 手机号 + 密码登陆
|
||||
export function login(mobile, password) {
|
||||
return request({
|
||||
url: 'login',
|
||||
method: 'post',
|
||||
data: {
|
||||
mobile, password
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 手机号 + 验证码登陆
|
||||
export function smsLogin(mobile, code) {
|
||||
return request({
|
||||
url: 'sms-login',
|
||||
method: 'post',
|
||||
data: {
|
||||
mobile, code
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 发送手机验证码
|
||||
export function sendSmsCode(mobile, scene) {
|
||||
return request({
|
||||
url: 'send-sms-code',
|
||||
method: 'post',
|
||||
data: {
|
||||
mobile, scene
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user