import axios from 'axios';
import prefix from '@/store/prefix';
import { PsyBaseUrl } from '@/config/models';
const service = axios.create({
  baseURL: PsyBaseUrl
});
service.interceptors.request.use(request => {
  if (localStorage.getItem(prefix + 'ssjlToken')) {
    request.headers.AccessToken = localStorage.getItem(prefix + 'ssjlToken');
  }
  return request;
});
export const APIPsy = {
  getHomeData,
  getCalendarData,
  getProgress,
  getComprehensiveEvaluation //当天三大指标综合总评
};
export default APIPsy;
function getHomeData(data) {
  return service({
    url: `/api/Data/GetHomeData`,
    method: 'get',
    params: data
  });
}
function getCalendarData(data) {
  return service({
    url: `/api/Data/GetCalendarData`,
    method: 'get',
    params: data
  });
}
function getProgress(data) {
  return service({
    url: `/api/Question/Progress`,
    method: 'get',
    params: data
  });
}
function getComprehensiveEvaluation(data) {
  return service({
    url: `/api/Data/GetComprehensiveEvaluation`,
    method: 'get',
    params: data
  });
}
