From ac235850a9287dae6977c964213176fa7c86b140 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期四, 09 十二月 2021 14:42:20 +0800
Subject: [PATCH] Merge branch 'refactor/separate-vue' of ssh://192.168.0.10:29418/pcalife/PAM into refactor/separate-vue

---
 PAMapp/nuxt.config.js |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/PAMapp/nuxt.config.js b/PAMapp/nuxt.config.js
index 2ae6c63..73f32ed 100644
--- a/PAMapp/nuxt.config.js
+++ b/PAMapp/nuxt.config.js
@@ -37,12 +37,13 @@
     { src: '~/plugins/vue-awesome-swiper.js', mode: 'client' },
     '~/plugins/service.ts',
     '~/plugins/vue-scroll-picker',
-    '~/plugins/filters/date.filter.ts'
+    '~/plugins/filters/date.filter.ts',
+    '~/plugins/filters/age.filter.ts',
   ],
 
   // Auto import components: https://go.nuxtjs.dev/config-components
   components: true,
-  // loading 
+  // loading
   loading: '~/components/loading.vue',
 
   // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
@@ -50,7 +51,9 @@
     // https://go.nuxtjs.dev/typescript
     '@nuxt/typescript-build',
     '@nuxtjs/axios',
-    '@nuxtjs/style-resources'
+    '@nuxtjs/style-resources',
+    ['@nuxtjs/dotenv', { filename: '.env.' + process.env.ENV }],
+
   ],
 
   // Modules: https://go.nuxtjs.dev/config-modules
@@ -66,16 +69,6 @@
     ]
   },
   router: {
-    scrollBehavior (to, from, savedPosition) {
-      if (savedPosition) {
-        return savedPosition;
-      } else {
-        document.body.scrollTop = 0;
-        document.documentElement.scrollTop = 0;
-      }
-    }
-  },
-  env: {
-    BASE_URL: 'http://localhost:8080/api'
+    base: process.env.ENV === 'uat' ? '/pam/' : ''
   }
 }

--
Gitblit v1.8.0