Explorar el Código

兼容message

zangkai hace 5 años
padre
commit
f011ffae5f
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      frontend_web/src/plugin/axios/index.js

+ 7 - 2
frontend_web/src/plugin/axios/index.js

@@ -16,10 +16,15 @@ function errorCreate (msg) {
 
 // 反馈消息弹框提示
 function noticeMsg (dataAxios, type) {
-  if (!dataAxios.msg) {
+  let msg
+  if (dataAxios.msg) {
+    msg = dataAxios.msg
+  }
+  if (dataAxios.message) {
+    msg = dataAxios.message
     return
   }
-  if (!dataAxios.message) {
+  if (!msg) {
     return
   }
   Message({