import request from '@/utils/request' 
 | 
  
 | 
// 获取图片验证码 
 | 
export function getCaptcha () { 
 | 
  return request.get('/common/captcha') 
 | 
} 
 | 
  
 | 
// 下载本地文件 
 | 
export function downloadLocalFile (path) { 
 | 
  // return request.get('/resource/local/download', { 
 | 
  //   params, 
 | 
  //   download: true 
 | 
  // }) 
 | 
  window.open(`${window.location}${path}`) 
 | 
  // window.location = '/template/plans_import_template.xlsx' 
 | 
} 
 | 
  
 | 
// 根据密码登录 
 | 
export function loginByPassword (data) { 
 | 
  return request.post('/system/login', data) 
 | 
} 
 | 
  
 | 
// 自动登录登录--标准版 
 | 
export function edgpLogin ({token, companyId}) { 
 | 
  // return request.post('/lingyang/login', params) 
 | 
  return request.post(`edgp/login?token=${token}&companyId=${companyId}`) 
 | 
} 
 | 
  
 | 
// 自动登录登录 
 | 
export function autoLogin ({token, companyId}) { 
 | 
  // return request.post('/lingyang/login', params) 
 | 
  return request.post(`lingyang/login?token=${token}&companyId=${companyId}`) 
 | 
} 
 | 
  
 | 
// 自动登录登录 
 | 
export function autoLoginDemo ({token, companyId}) { 
 | 
  // return request.post('/lingyang/login', params) 
 | 
  return request.post(`lingyang/loginDemo?token=${token}&companyId=${companyId}`) 
 | 
} 
 | 
  
 | 
// 自动登录登录 --demo1 
 | 
export function autoLoginDemo1 ({token, companyId}) { 
 | 
  // return request.post('/lingyang/login', params) 
 | 
  return request.post(`edgp/loginDemo?token=${token}&companyId=${companyId}`) 
 | 
} 
 | 
  
 | 
  
 | 
// 登出 
 | 
export function logout (data) { 
 | 
  return request.post('/system/logout', data) 
 | 
} 
 | 
  
 | 
// 修改密码 
 | 
export function updatePwd (data) { 
 | 
  return request.post('/system/updatePwd', data) 
 | 
} 
 | 
  
 | 
// 获取已登录的用户信息 
 | 
export function getUserInfo () { 
 | 
  return request.get('/system/getUserInfo', { 
 | 
    autoLogin: false 
 | 
  }) 
 | 
} 
 | 
  
 | 
export function ddLogin (code, companyId) { 
 | 
  return request.post(`/dingding/ddLogin?code=${code}&companyId=${companyId}`) 
 | 
} 
 | 
  
 | 
// 获取企业id 
 | 
export function getDingdingCorpId(companyId) { 
 | 
  return request.get(`/dingding/getDingdingCorpId?companyId=${companyId}`) 
 | 
} 
 |