zhangwencui
3 天以前 8d4a66c31aa0f6418403ade8a780f27c9fa9d921
src/api/login.js
@@ -1,27 +1,13 @@
import request from '@/utils/request'
// 登录方法
export function login(username, password, code, uuid) {
export function loginCheckFactory(username, password) {
  const data = {
    username,
    password,
    code,
    uuid
  }
  return request({
    url: '/login',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}
// 注册方法
export function register(data) {
  return request({
    url: '/register',
    url: '/loginCheckFactory',
    headers: {
      isToken: false
    },
@@ -46,14 +32,48 @@
  })
}
// 获取验证码
export function getCodeImg() {
// 获取公司列表
export function userLoginFacotryList(params) {
  return request({
    url: '/captchaImage',
    headers: {
      isToken: false
    },
    url: '/userLoginFacotryList',
    method: 'get',
    timeout: 20000
    params: params
  })
}
// 获取未过期公告数量
export function noticesList(params) {
  return request({
    url: '/collaborativeApproval/notice/page',
    method: 'get',
    params: params
  })
}
// 发送客户端推送标识到服务器
export function updateClientId(data) {
  return request({
    url: '/system/client/addOrUpdateClientId',
    method: 'post',
    data: data
  })
}
// 查询公告列表
export function listNotice(query) {
  return request({
    url: '/system/notice/list',
    method: 'get',
    params: query
  })
}
// 获取未读消息数量
export function getNoticeCount(consigneeId) {
  return request({
    url: '/system/notice/getCount',
    method: 'get',
    params: { consigneeId }
  })
}