first commit

This commit is contained in:
2026-03-17 14:52:07 +08:00
parent a23b829323
commit ec25e6e617
104 changed files with 35840 additions and 0 deletions

40
src/api/modules/user.js Normal file
View File

@@ -0,0 +1,40 @@
/**
* 用户相关接口
*/
import request from '@/utils/request'
/**
* 更新用户信息
*/
export const updateUserInfo = (data) => {
return request.put('/user/info', data)
}
/**
* 上传头像
*/
export const uploadAvatar = (filePath) => {
return request.upload('/user/avatar', filePath)
}
/**
* 获取用户详情
*/
export const getUserDetail = (userId) => {
return request.get(`/user/${userId}`)
}
/**
* 绑定手机号
*/
export const bindPhone = (data) => {
return request.post('/user/phone/bind', data)
}
/**
* 解绑手机号
*/
export const unbindPhone = () => {
return request.post('/user/phone/unbind')
}