Skip to content

Commit

Permalink
[feature]{curd}: 加入params post请求的时候传参
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Jun 3, 2019
1 parent 3cc5419 commit 49425e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/Public/crud.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
import axios from '@/utils/fetch';

export default function (dml, tableName, data) {
export default function (dml, tableName, data, params) {
const options = {
// url: `/${tableName.replace(/_/g, '/')}/${dml}`,
url: `/${tableName}/${dml}`,
Expand All @@ -29,6 +29,7 @@ export default function (dml, tableName, data) {
],
...data,
};
options.params = params;
} else if ('add,update'.includes(dml)) {
options.data = data;
} else {
Expand Down

0 comments on commit 49425e2

Please sign in to comment.