1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- import {
- request
- } from '@/libs/request.js'
- export function login(data) {
- return request({
- url: '/login',
- method: 'post',
- header:{
- 'content-type':"application/x-www-form-urlencoded"
- },
- data
- })
- }
- // 获取用户基本信息
- export function getUserProfile() {
- return request({
- url: '/user/profile',
- method: 'GET'
- })
- }
- // 更新用户基本信息
- export function updateUserProfile(data) {
- return request({
- url: '/user/profile/update',
- method: 'PUT',
- data
- })
- }
- export function getUserInfo() {
- return request({
- url: '/user/profile'
- })
- }
- export function logout() {
- return request({
- url: '/logout',
- method: 'GET'
- })
- }
- export function register(data) {
- return request({
- url: '/user/register',
- method: 'post',
- data: data
- })
- }
- /**公用上传接口 */
- export function uploadFile(data) {
- return request({
- url: '/upload/file',
- method: "post",
- headers: {
- 'Content-Type': 'multipart/form-data'
- },
- data
- })
- }
- export function updatePwd(data) {
- return request({
- url: '/user/updatePassword',
- method: "PUT",
- data
- })
- }
- //查询用户的带岗位
- export function getUserList() {
- return request({
- url: '/user/select',
- method: 'get'
- })
- }
- //企业微信登录
- export function wxWorkLogin({userId,code}) {
- return request({
- url: `/user/updateWxUserId/${userId}/${code}`,
- method: 'post'
- })
- }
|