Commit ba8a0b4d by chenjinjing

no message

parent 705f05ed
......@@ -11,7 +11,13 @@ export function get(url:string, query?, headers?, timeOut?) {
request.get(paramater, function (err, res, body) {
const success = !err && res && res == 200;
let message = err || res.statusCode || "";
resolve({success, message, body:body.data});
if (body) {
if (body.error_code == 0) {
resolve({success, message, body:body.data})
} else {
resolve({success, message, body:null})
}
}
})
})
}
......
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