mock 造数据

export default {

  'POST /api/listData': (req, res) => {
    setTimeout(() => {
      const response = {
        resultCode: '0',
        resultObject: [
          {
            Type: 'AES',
            bitLen: [128, 192, 256],
            databaseType: 'hive',
          },
          {
            Type: 'AES',
            bitLen: [128],
            databaseType: 'mysql',
          },
          {
            Type: 'AES',
            bitLen: [128, 192, 256],
            databaseType: 'oracle',
          },
          {
            Type: 'SM4',
            bitLen: [128],
            databaseType: 'hive',
          },
        ],
      };
      res.send(response);
    }, 1000);
  },
};

请求
import request from '@/utils/request';

export function logHandleBatch(params) {
  const url = '/api/listData';
  return request(url, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

  

原文地址:https://www.cnblogs.com/lipu12281/p/13580316.html