Procházet zdrojové kódy

Merge branch 'shenwu' of http://git.zanxiangnet.com/wjx/ad-manage into wangjianxin

wjx před 2 roky
rodič
revize
3f3b972ae6
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/Hook/useAjax.tsx

+ 2 - 1
src/Hook/useAjax.tsx

@@ -49,7 +49,8 @@ export function useAjax(fnc: CombineService<any, any>, options?: Options){
         // throttleInterval:500,
         formatResult: (res) => {
             let reqTime = moment().format('YYYY-MM-DD HH:mm:ss')
-            return options?.formatResult ? {...res,reqTime} :Array.isArray(res.data) ? {data:res.data,reqTime} :{...res.data,reqTime}
+            res['reqTime'] = reqTime
+            return options?.formatResult ? {...res,reqTime} :res
             
         },
         onSuccess: (res) => {