ovineio/ovine

post 数据没有处理,传给后台参数为{}

z330789559 opened this issue · 1 comments

login 的时候yarn dev 处理后的请求对象

{
actionAddr: "POST user/login"
api: "POST user/login"
body: "{"remember":true,"username":"libaozhong","password":"yyaaf1314","code":"wqeqwe"}"
config: {method: "post", successMessage: "保存成功", errorMessage: "保存失败", onSuccess: ƒ}
data: {remember: true, username: "libaozhong", password: "yyaaf1314", code: "wqeqwe"}
fetchOptions: {credentials: "include"}
headers: {Content-Type: "application/json", X-ACTION-ADDR: "POST user/login"}
isEnvFetcher: true
mappingData: {}
method: "POST"
mock: true
onError: () => {}
onSuccess: source => {}
rawData: {remember: true, username: "libaozhong", password: "yyaaf1314", code: "wqeqwe"}
signal: null
url: "http://121.89.194.107:8081/rtapi/user/login"
}

可以看到 rawData ,body都有数据
但是yarn build的代码

{
actionAddr: "POST user/login"
api: "POST user/login"
body: "{}"
config: {}
data: {}
fetchOptions: {credentials: "include"}
headers: {Content-Type: "application/json", X-ACTION-ADDR: "POST user/login"}
isEnvFetcher: true
mappingData:
code: "LJma"
password: "yyaaf1314"
remember: true
username: "libaozhong"
__proto__: Object
method: "POST"
mock: true
onError: ()=>{Object(o.b)(i.c.updateAuthLoginCode,"")}
onSuccess: e=> {}
rawData: {}
signal: null
url: "http://sass.yffrom.com/rtapi/user/login"
__proto__: Object
}

rawData 和 body都没数据

经过沟通,发现此问题是由于 依赖 amis 包的版本不一致导致的,暂时先关闭了。