ASEMiniProgram/api/user.js

45 lines
739 B
JavaScript
Raw Permalink Normal View History

2021-03-20 17:48:56 +00:00
import request from '../utils/request.js'
export const login = (appID, code)=>{
return request({
url: '/wx/user/' + appID + '/login',
method: 'get',
data: {
code
}
})
}
export const checkProfile = () => {
return request({
url: "/user/profile/uploaded",
method: "get",
data: {}
})
}
export const setProfile = (userInfo) => {
return request({
url: "/user/profile/",
method: "post",
data: userInfo
})
}
export const getProfile = () => {
return request({
url: "/user/profile/",
method: "get",
data: {}
})
}
export const attachRole = (userRole) => {
return request({
url: "/permission/role/user/",
method: "post",
data: {
userRole
}
})
2021-03-20 17:48:56 +00:00
}