Commit 22ae371d by tang

feat: 添加data类型

parent 948b701c
...@@ -5,7 +5,7 @@ export function cleanObject(obj){ ...@@ -5,7 +5,7 @@ export function cleanObject(obj){
return return
} }
let retObj = {...obj} let retObj = {...obj}
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
const val = obj[key] const val = obj[key]
if (val === null || val === undefined || (typeof val === 'string' && !val)){ if (val === null || val === undefined || (typeof val === 'string' && !val)){
...@@ -69,7 +69,7 @@ export function handleResponseSuccess(res = {}) { ...@@ -69,7 +69,7 @@ export function handleResponseSuccess(res = {}) {
success: true, success: true,
returnCode: res.code || ResponseCode.success, returnCode: res.code || ResponseCode.success,
returnMsg: res.msg, returnMsg: res.msg,
data: res.data || null data: res.data || res.page || null
} }
} }
...@@ -80,4 +80,4 @@ export function handleResponseError(res = {}) { ...@@ -80,4 +80,4 @@ export function handleResponseError(res = {}) {
returnMsg: res.msg || "", returnMsg: res.msg || "",
data: res.data || null data: res.data || null
} }
} }
\ No newline at end of file
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