Explorar el Código

message 统一为 msg

ahjung hace 2 años
padre
commit
2e74d4f527
Se han modificado 1 ficheros con 6 adiciones y 6 borrados
  1. 6 6
      mock/_util.ts

+ 6 - 6
mock/_util.ts

@@ -1,10 +1,10 @@
 import Mock from 'mockjs';
 import Mock from 'mockjs';
 
 
-export function resultSuccess(data, { message = 'ok' } = {}) {
+export function resultSuccess(data, { msg = 'ok' } = {}) {
   return Mock.mock({
   return Mock.mock({
     code: 200,
     code: 200,
     data,
     data,
-    message,
+    msg,
     type: 'success',
     type: 'success',
   });
   });
 }
 }
@@ -13,7 +13,7 @@ export function resultPageSuccess<T = any>(
   page: number,
   page: number,
   pageSize: number,
   pageSize: number,
   list: T[],
   list: T[],
-  { message = 'ok' } = {},
+  { msg = 'ok' } = {},
 ) {
 ) {
   const pageData = pagination(page, pageSize, list);
   const pageData = pagination(page, pageSize, list);
 
 
@@ -24,15 +24,15 @@ export function resultPageSuccess<T = any>(
       pageCount: list.length,
       pageCount: list.length,
       list: pageData,
       list: pageData,
     }),
     }),
-    message,
+    msg,
   };
   };
 }
 }
 
 
-export function resultError(message = 'Request failed', { code = -1, data = null } = {}) {
+export function resultError(msg = 'Request failed', { code = -1, data = null } = {}) {
   return {
   return {
     code,
     code,
     data,
     data,
-    message,
+    msg,
     type: 'error',
     type: 'error',
   };
   };
 }
 }