Skip to content

Commit

Permalink
修改mock
Browse files Browse the repository at this point in the history
  • Loading branch information
biubiubiu01 committed Sep 6, 2020
1 parent c634664 commit e4edb2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mock/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const Mock = require("mockjs");
const { param2Obj } = require("./utils");
const qs = require("qs");

const chart = require("./chart");

Expand All @@ -26,7 +27,7 @@ function mockXHR() {
const { body, type, url } = options;
result = respond({
method: type,
body: JSON.parse(body),
body: qs.parse(body),
query: param2Obj(url),
});
} else {
Expand Down

0 comments on commit e4edb2e

Please sign in to comment.