Update api.js
This commit is contained in:
parent
945b4ef9be
commit
0de75e5e69
|
@ -31,7 +31,7 @@ const req = (method, url, params, responseType) => {
|
||||||
export const handelResponse=(res, cb, errCb)=> {
|
export const handelResponse=(res, cb, errCb)=> {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
cb(res)
|
cb(res.data,res.msg)
|
||||||
} else {
|
} else {
|
||||||
if (typeof errCb == 'function') {
|
if (typeof errCb == 'function') {
|
||||||
errCb()
|
errCb()
|
||||||
|
|
Loading…
Reference in New Issue