Blame view

HHECS.Web/src/api/user.js 745 Bytes
胡菁 authored
1
import request from "@/utils/request";
胡菁 authored
2
// import { setToken, setRefreshToken } from '@/utils/auth'
胡菁 authored
3
胡菁 authored
4
5
export function login(data) {
  return request({
胡菁 authored
6
7
    url: "/api/User/Login",
    method: "post",
胡菁 authored
8
9
    data: {
      userCode: data.username,
胡菁 authored
10
11
12
13
14
      password: data.password,
    },
  }).then((response) => {
    return { ...response, code: "Success" };
  });
胡菁 authored
15
16
}
胡菁 authored
17
export function logout() {
胡菁 authored
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  return Promise.resolve();
}

// 权限获取
export function getLicense() {
  return request({
    url: "/api/System/GetLicense",
    method: "get",
    // data,
  });
}

// 权限导入
export function importLicense(data) {
  return request({
    url: "/api/System/ImportLicense?content=" + encodeURIComponent(data),
    method: "get",
    // data,
  });
胡菁 authored
37
}