You need to sign in or sign up before continuing.
analysis.ts 552 Bytes
Newer Older
zhangsan's avatar
1  
zhangsan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
import { MockMethod } from 'vite-plugin-mock'

const ageDistributionData = {
  code: 200,
  success: true,
  message: '获取成功',
  result: [
    { value: 120, name: '18岁以下' },
    { value: 580, name: '18-25岁' },
    { value: 850, name: '26-35岁' },
    { value: 650, name: '36-45岁' },
    { value: 320, name: '46-55岁' },
    { value: 180, name: '55岁以上' }
  ]
}

export default [
  {
    url: '/mock/analysis/ageDistribution',
    method: 'get',
    response: () => {
      return ageDistributionData
    }
  }
] as MockMethod[]