123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- /*
- * @Author:
- * @Date: 2023-09-27 14:33:29
- * @LastEditors: Please set LastEditors
- * @LastEditTime: 2024-01-03 17:28:27
- * @Description: tel files
- * @filePath:
- */
- // 根据角色动态生成路由
- import { MockMethod } from "vite-plugin-mock";
- export default [
- {
- url: "/pie",
- method: "get",
- response: () => {
- return {
- status: '1',
- message: '',
- data: [
- {
- name: '数据1',
- value: 100
- },
- {
- name: '数据2',
- value: 125
- },
- {
- name: '数据3',
- value: 635
- },
- ]
- };
- }
- },
- {
- url: "/line",
- method: "get",
- response: () => {
- return {
- status: '1',
- message: '',
- data: [
- {
- name: '数据1',
- data: [
- 509, 917, 2455, 2610, 2719, 3033, 3044, 3085, 2708, 2809, 2117, 2000, 1455, 1210, 719, 733, 944, 2285, 2208, 3372, 3936, 3693, 2962, 2810, 3519, 2455, 2610, 2719, 2484, 2078]
- },
- {
- name: '数据2',
- data: [
- 2136, 3693, 2962, 3810, 3519, 3484, 3915, 3823, 3455, 4310, 4019, 3433, 3544, 3885, 4208, 3372, 3484, 3915, 3748, 3675, 4009, 4433, 3544, 3285, 4208, 3372, 3484, 3915, 3823, 4265, 4298
- ]
- },
- {
- name: '数据3',
- data: [
- 1361, 2693, 5962, 3810, 3519, 3484, 3915, 3823, 3455, 4310, 4019, 4332, 3544, 3885, 4208, 3372, 3484, 3915, 3748, 3675, 4009, 4433, 3544, 3283, 4208, 3372, 3484, 3915, 3823, 4265, 4298
- ]
- }
- ]
- };
- }
- },
- {
- url: "/bar",
- method: "get",
- response: () => {
- return {
- status: '1',
- message: '',
- data: [
- { name: '数据1', data: [100, 500, 1000], date: ["2021", "2022", "2023"] },
- { name: '数据2', data: [10, 50, 100], date: ["2021", "2022", "2023"] },
- { name: '数据3', data: [80, 130, 600], date: ["2021", "2022", "2023"] },
- ]
- };
- }
- },
- {
- url: "/list",
- method: "get",
- response: () => {
- return {
- status: '1',
- message: '',
- data: [
- { content: '这是第一条', date: '2024/01/01 00:00:15' },
- { content: '这是第二条', date: '2024/01/02 10:30:57' },
- { content: '这是第三条', date: '2024/01/03 11:08:29' },
- ]
- };
- }
- },
- ] as MockMethod[];
|