diff --git a/mock/rule.js b/mock/rule.js index 4a1a4dabdd86ea4d18f91ca5294fd148a7eccf08..2090ce8e18a0687987045ab6119471aa21508d86 100644 --- a/mock/rule.js +++ b/mock/rule.js @@ -41,10 +41,14 @@ export function getRule(req, res, u) { } if (params.status) { - const s = params.status.split(','); - if (s.length === 1) { - dataSource = dataSource.filter(data => parseInt(data.status, 10) === parseInt(s[0], 10)); - } + const status = params.status.split(','); + let filterDataSource = []; + status.forEach((s) => { + filterDataSource = filterDataSource.concat( + [...dataSource].filter(data => parseInt(data.status, 10) === parseInt(s[0], 10)) + ); + }); + dataSource = filterDataSource; } if (params.no) {