guhongwei 4 年 前
コミット
a0d86884b9
4 ファイル変更10 行追加0 行削除
  1. 1 0
      package.json
  2. 1 0
      src/main.js
  3. 3 0
      src/plugins/check-res.js
  4. 5 0
      src/plugins/vant.js

+ 1 - 0
package.json

@@ -13,6 +13,7 @@
     "element-ui": "^2.13.2",
     "lodash": "^4.17.15",
     "naf-core": "^0.1.2",
+    "vant": "^2.8.2",
     "vue": "^2.6.11",
     "vue-meta": "^2.3.3",
     "vue-router": "^3.1.6",

+ 1 - 0
src/main.js

@@ -3,6 +3,7 @@ import App from './App.vue';
 import router from './router';
 import store from './store';
 import '@/plugins/element.js';
+import '@/plugins/vant';
 import '@/plugins/axios';
 import '@/plugins/check-res';
 import '@/plugins/meta';

+ 3 - 0
src/plugins/check-res.js

@@ -5,6 +5,7 @@
 import Vue from 'vue';
 import _ from 'lodash';
 import { Message } from 'element-ui';
+import { Notify } from 'vant';
 
 const vm = new Vue({});
 const Plugin = {
@@ -23,6 +24,7 @@ const Plugin = {
         }
         if (_okText) {
           Message.success(_okText);
+          Notify({ type: 'success', message: _okText });
         }
         return true;
       }
@@ -30,6 +32,7 @@ const Plugin = {
         return _errText();
       }
       Message.error(_errText || errmsg);
+      Notify({ type: 'danger', message: _okText });
       // Message({ message: _errText || errmsg, duration: 60000 });
       return false;
     };

+ 5 - 0
src/plugins/vant.js

@@ -0,0 +1,5 @@
+import Vue from 'vue';
+import Vant from 'vant';
+import 'vant/lib/index.css';
+
+Vue.use(Vant);