123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- import request from '@/utils/request'
- // import {baseUrl} from '../super-whale-uc'
- export const baseUrl = process.env.VUE_APP_BASEURL;
- export function login(data) {
- return request({
- url: '/user/login',
- method: 'post',
- data
- })
- }
- export function getInfo(token) {
- return request({
- url: '/user/info',
- method: 'get',
- params: {
- token
- }
- })
- }
- export function logout() {
- return request({
- url: '/user/logout',
- method: 'post'
- })
- }
- export function saveUser(data) {
- return request({
- url: baseUrl + 'uc/user',
- method: 'post',
- data
- })
- }
- export function updateUser(data) {
- return request({
- url: baseUrl + 'uc/user',
- method: 'put',
- data
- })
- }
- export function deleteUser(id) {
- return request({
- url: baseUrl + 'uc/user/' + id,
- method: 'delete',
- })
- }
- export function getUserInfoByEmail(email) {
- return request({
- url: baseUrl + 'uc/user/user-info/' + email,
- method: 'post',
- })
- }
- export function pageUser(data) {
- return request({
- url: 'ams/user/page',
- method: 'post',
- data
- })
- }
- export function countUser(systemId) {
- return request({
- url: baseUrl + 'uc/user/countUser/' + systemId,
- method: 'get',
- })
- }
- export function countUserData(data) {
- return request({
- url: baseUrl + 'uc/user/countUser',
- method: 'post',
- data
- })
- }
- export function resetPassword(data) {
- return request({
- url: baseUrl + 'uc/user/reset-password',
- method: 'put',
- data
- })
- }
- export function validUsername(username) {
- return request({
- url: baseUrl + 'uc/user/valid/' + username,
- method: 'get',
- })
- }
- export function currentUser() {
- return request({
- url: baseUrl + 'uc/user/current',
- method: 'get',
- })
- }
- //修改密码
- export function updatePassword(params) {
- return request({
- url: 'uc/user/update_password',
- method: 'post',
- data: params
- })
- }
- //获取当前用户的菜单ID数组
- export function getUserRights() {
- return request({
- url: 'uc/menu/current/user/menu',
- method: 'get',
- })
- }
|