2024-06-20 15:36:19 +00:00
|
|
|
import {http} from "../utils/http.js"
|
|
|
|
/**
|
|
|
|
*微信登录
|
|
|
|
*/
|
|
|
|
export const mark= (code) => {
|
|
|
|
|
|
|
|
return http({
|
|
|
|
url:"/api/wxLogin",
|
|
|
|
data:{
|
2024-06-22 14:19:10 +00:00
|
|
|
|
2024-06-20 15:36:19 +00:00
|
|
|
code,
|
|
|
|
},
|
|
|
|
method:"POST"
|
|
|
|
})
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取当前的user信息
|
|
|
|
*/
|
|
|
|
export const getUserInfo=()=>{
|
|
|
|
return http('/employee/getUserInfo');
|
2024-06-22 07:20:39 +00:00
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 根据id获取用户头像
|
|
|
|
*/
|
|
|
|
export const getImageById=(userId)=>{
|
|
|
|
return http({
|
|
|
|
url:"/api/getUserInfoById",
|
|
|
|
method:"GET",
|
|
|
|
data:{
|
|
|
|
userId,
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 修改头像
|
|
|
|
*/
|
|
|
|
export const updateUserImage=(profilePicture)=>{
|
|
|
|
return http({
|
|
|
|
url:"/api/updateUserImage",
|
|
|
|
method:"POST",
|
|
|
|
data:{
|
|
|
|
profilePicture,
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 修改昵称
|
|
|
|
*/
|
|
|
|
export const updateUserName=(username)=>{
|
|
|
|
return http({
|
|
|
|
url:"/api/updateUserName",
|
|
|
|
method:"POST",
|
|
|
|
data:{
|
|
|
|
username,
|
|
|
|
}
|
|
|
|
})
|
2024-06-20 15:36:19 +00:00
|
|
|
}
|