|
@@ -2,10 +2,12 @@ import Vue from "vue";
|
|
|
import throttle from "lodash-es/throttle";
|
|
|
|
|
|
// function printErr(val) {
|
|
|
-export const notifyInvalidTokenThrottled = throttle(() => {
|
|
|
- Vue.prototype.$notify({
|
|
|
- showClose: true,
|
|
|
- message: "登录失效,请重新登录!",
|
|
|
- type: "error",
|
|
|
- });
|
|
|
-}, 1000);
|
|
|
+export const notifyInvalidTokenThrottled = (message) => {
|
|
|
+ return throttle(() => {
|
|
|
+ Vue.prototype.$notify({
|
|
|
+ showClose: true,
|
|
|
+ message,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }, 1000)();
|
|
|
+};
|