Skip to content

Commit

Permalink
fix: 修复mockjs模糊匹配问题
Browse files Browse the repository at this point in the history
mockjs按定义顺序匹配(模糊匹配)匹配成功后直接返回
  • Loading branch information
yuntian001 committed Sep 3, 2022
1 parent 857c96d commit e287f58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mock/apiDemo/statistics.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { success, fail } from '../helper';

//请求地址是按先后顺序模糊匹配
export default [
{
url: '/api/statistics', //
url: '/api/statistics/index',
method: 'get',
timeout: 500 + Math.floor(Math.random() * 1000),
response: () => {
Expand Down
2 changes: 1 addition & 1 deletion src/api/statistics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import request from '@/utils/request';

const enum Api {
STATISTICS = '/api/statistics',
STATISTICS = '/api/statistics/index',
CHART = '/api/statistics/chart',
}

Expand Down

0 comments on commit e287f58

Please sign in to comment.