From 1820aef3fb5c926664de1d4d484f64a5c9ba7099 Mon Sep 17 00:00:00 2001
From: YANGDL <114714267@qq.com>
Date: 星期二, 05 一月 2021 17:06:08 +0800
Subject: [PATCH] 优化逻辑

---
 src/utils/tools.js |   27 +++++++++++++++++++++------
 1 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/utils/tools.js b/src/utils/tools.js
index 9aeb1f0..0838a7f 100644
--- a/src/utils/tools.js
+++ b/src/utils/tools.js
@@ -1,9 +1,9 @@
 
 import * as $CONST from './constant'
+import { Message } from 'element-ui'
 // import { notify } from '@nutui/nutui'
 
 export const _ = require('lodash')
-const notify = window.vm.$notify
 /**
  * 闆嗗悎杞崲涓篔SON
  * @param obj collection鏁版嵁
@@ -993,23 +993,38 @@
 }
 
 export function success (msg = $CONST.MSG_SYS_SUCCESS) {
-  notify.success(msg)
+  Message({
+    message: msg,
+    type: 'success'
+  })
 }
 
 export function fail (msg = $CONST.MSG_SYS_FAIL) {
-  notify.warn(msg)
+  Message({
+    message: msg,
+    type: 'error'
+  })
 }
 
 export function error (msg = $CONST.MSG_SYS_ERR) {
-  notify.danger(msg)
+  Message({
+    message: msg,
+    type: 'error'
+  })
 }
 
 export function warning (msg = $CONST.MSG_SYS_WARNING) {
-  notify.warn(msg)
+  Message({
+    message: msg,
+    type: 'warning'
+  })
 }
 
 export function info (msg = $CONST.MSG_SYS_CANCELED) {
-  notify.primary(msg)
+  Message({
+    message: msg,
+    type: 'info'
+  })
 }
 
 /**

--
Gitblit v1.8.0