Kaynağa Gözat

Merge branch '1xinfeng-fix' of www.gitinn.com:proginn/proginn-frontend into dev

xinfeng 5 yıl önce
ebeveyn
işleme
4edc710fef

+ 0 - 1
middleware/initialize.js

@@ -11,7 +11,6 @@ export default function (context) {
     } = context;
     let host = req.headers.host;
     console.log("initialize...........req.............header");
-    console.log(req.headers);
     let proto = "https";
     if (req.headers["x-forwarded-proto"]) {
       proto = req.headers["x-forwarded-proto"];

+ 0 - 2
mixins/getDeviceType.js

@@ -14,7 +14,6 @@ export default {
      */
     getDeviceType() {
       const strCookie = document.cookie;
-      console.log('all cookie:' + strCookie)
       //将多cookie切割为多个名/值对
       const arrCookie = strCookie.split("; ");
       let xAPP = "";
@@ -27,7 +26,6 @@ export default {
           break;
         }
       }
-      console.log('x_app:' +xAPP)
       if (xAPP.toLowerCase().indexOf('ios') !== -1) { //判断iPhone|iPad|iPod|iOS APP
         this.deviceType = 'ios';
       } else if (xAPP.toLowerCase().indexOf('android') !== -1) { //判断Android app

+ 0 - 1
mixins/uploadFile.js

@@ -38,7 +38,6 @@ export default {
       formData.append("name", file.name);
       formData.append("target", '{"type":3}');
       for (let key in this.uploadInfo) {
-        console.log('key1', key)
         formData.append(key, this.uploadInfo[key])
       }
       axios.post('/file/proxyUpload', formData, {

+ 5 - 1
nuxt.config.js

@@ -1,6 +1,10 @@
 const seoRouter = require("./plugins/seoRouter");
 const pkg = require("./package");
 
+if (process.env.NODE_ENV) {
+  require('events').EventEmitter.defaultMaxListeners = 50;
+}
+
 module.exports = {
   mode: "universal",
   watchers: {
@@ -75,10 +79,10 @@ module.exports = {
   plugins: [
     "plugins/common",
     "plugins/element",
-    // 'plugins/http',
     "plugins/nuxtAxios",
     "plugins/deviceType",
     "plugins/vant",
+    "plugins/router",
     {
       src: "plugins/vant.js",
       ssr: false

+ 8 - 0
plugins/router.js

@@ -0,0 +1,8 @@
+export default ({app, store}) => {
+  app.router.beforeEach((to, from, next)=> {
+    if (process.client) {
+      console.log("location.href", to, from)
+    }
+    next()
+  })
+}