fix(projects): add prod mockjs switch [添加生产模式的mockjs的开关]

This commit is contained in:
Soybean
2023-05-17 07:51:07 +08:00
parent 9b19f96ff6
commit 9f5638f16d
7 changed files with 346 additions and 371 deletions

View File

@ -1,4 +1,4 @@
import betterMock from 'better-mock';
import { mock } from 'mockjs';
import type { MockMethod } from 'vite-plugin-mock';
const apis: MockMethod[] = [
@ -6,7 +6,7 @@ const apis: MockMethod[] = [
url: '/mock/getAllUserList',
method: 'post',
response: (): Service.MockServiceResult<ApiUserManagement.User[]> => {
const data = betterMock.mock({
const data = mock({
'list|1000': [
{
id: '@id',