gemercheung 2 年之前
父节点
当前提交
0a502121be

+ 2 - 1
packages/qjkankan-view/.env.testdev

@@ -6,4 +6,5 @@ VUE_APP_URL_FILL=
 
 # 接口请求地址
 VUE_APP_APIS_URL=https://test.4dkankan.com/
-VUE_APP_DEBBUG_FLAG=0425-01
+VUE_APP_DEBBUG_FLAG=0516-03
+VUE_APP_DEBBUG_NOTIFY=1

+ 2 - 1
packages/qjkankan-view/.env.testprod

@@ -6,4 +6,5 @@ VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_URL_FILL=/qjkankan
 # 接口请求地址
 VUE_APP_APIS_URL=https://test.4dkankan.com/
-VUE_APP_DEBBUG_FLAG=0516-03
+VUE_APP_DEBBUG_FLAG=0516-03
+VUE_APP_DEBBUG_NOTIFY=1

+ 1 - 0
packages/qjkankan-view/package.json

@@ -24,6 +24,7 @@
     "tiny-emitter": "^2.1.0",
     "vue": "^3.2.13",
     "vue-i18n": "^9.1.10",
+    "vue-toastification": "^2.0.0-rc.5",
     "vue3-lazyload": "^0.3.6",
     "vuex": "^4.0.0"
   },

+ 23 - 1
packages/qjkankan-view/src/pages/show.js

@@ -11,6 +11,28 @@ import VueLazyLoad from 'vue3-lazyload'
 import browser from "../utils/browser";
 import Deferred from "@/utils/Deferred";
 import store from '../store'
+import Toast from "vue-toastification";
+// Import the CSS or use your own!
+import "vue-toastification/dist/index.css";
+
+const options = {
+  transition: 'Vue-Toastification__bounce',
+  maxToasts: 3,
+  newestOnTop: true,
+  position: 'top-right',
+  timeout: 2000,
+  closeOnClick: true,
+  pauseOnFocusLoss: true,
+  pauseOnHover: false,
+  draggable: true,
+  draggablePercent: 0.7,
+  showCloseButtonOnHover: false,
+  hideProgressBar: true,
+  closeButton: 'button',
+  icon: true,
+  rtl: false
+};
+
 
 
 let App;
@@ -43,7 +65,7 @@ loadLocaleMessages(i18n, local).then(() => {
     app.locked = Deferred();
     return app.locked;
   };
-
+  app.use(Toast, options);
   app.unlock = function () {
     if (app.locked) {
       app.locked.resolve();

+ 24 - 1
packages/qjkankan-view/src/utils/debuggerHelper.js

@@ -1,11 +1,34 @@
+// import Vue from 'vue'
+import { useToast } from "vue-toastification";
 
 export const debuggerHelper = (show = true) => {
+    const version = '1.4.0'
     if (show) {
         // log.setColors({
         var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";
-        console.log(`%c 👉:当前版本::---> 1.4.0--${process.env.VUE_APP_DEBBUG_FLAG}`,css);
+
+        console.log(`%c 👉:当前版本::---> ${version}--${process.env.VUE_APP_DEBBUG_FLAG}`, css);
 
     }
+    if (Number(process.env.VUE_APP_DEBBUG_NOTIFY) === 1) {
 
+        setTimeout(() => {
+            const toast = useToast();
+            toast.warning(`当前正在开发重构${version}中, 如果要指定版本,请联系开发!`, {
+                position: "top-center",
+                timeout: 400000,
+                closeOnClick: true,
+                pauseOnFocusLoss: true,
+                pauseOnHover: true,
+                draggable: true,
+                draggablePercent: 0.6,
+                showCloseButtonOnHover: false,
+                hideProgressBar: true,
+                closeButton: "button",
+                icon: true,
+                rtl: false
+            });
+        }, 500);
 
+    }
 }