import { http } from '@/utils/http/axios';

export interface TypeVisits {
  dayVisits: number;
  rise: number;
  decline: number;
  amount: number;
}
export interface TypeSaleroom {
  weekSaleroom: number;
  amount: number;
  degree: number;
}

export interface TypeOrderLarge {
  weekLarge: number;
  rise: number;
  decline: number;
  amount: number;
}

export interface TypeConsole {
  visits: TypeVisits;
  //销售额
  saleroom: TypeSaleroom;
  //订单量
  orderLarge: TypeOrderLarge;
  //成交额度
  volume: TypeOrderLarge;
}

//获取主控台信息
export function getConsoleInfo() {
  return consoleInfo;
}

/**
 * 模拟控制台数据
 */
const consoleInfo = {
  //访问量
  visits: {
    dayVisits: 32335,
    rise: 48,
    decline: 85,
    amount: 948113,
  },
  //销售额
  saleroom: {
    weekSaleroom: 90758,
    amount: 411553,
    degree: 38.245882,
  },
  //订单量
  orderLarge: {
    weekLarge: 35704,
    rise: 28,
    decline: 28,
    amount: 480578,
  },
  //成交额度
  volume: {
    weekLarge: 67800,
    rise: 96,
    decline: 81,
    amount: 826814,
  },
};
