ASEMiniProgram/api/user.js
2021-03-22 12:01:19 +08:00

45 lines
739 B
JavaScript

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
}
})
}