Commit ae9e71a7 authored by 赵啸非's avatar 赵啸非

修改post提交对象包装

parent 83afc5db
...@@ -83,7 +83,7 @@ instance.interceptors.response.use(response=>{ ...@@ -83,7 +83,7 @@ instance.interceptors.response.use(response=>{
export function post(url, option, config = {}) { export function post(url, option, config = {}) {
//判断object是数组还是对象 //判断object是数组还是对象
if(Object.getPrototypeOf(option) === Array.prototype){ if(Array.isArray(option)){
return instance.post(url, option, config) return instance.post(url, option, config)
} }
const data = Object.assign({}, option, { const data = Object.assign({}, option, {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment