sunran 3 лет назад
Родитель
Сommit
59f26e9ed6
3 измененных файлов с 17 добавлено и 8 удалено
  1. 1 1
      .env.production
  2. 1 1
      src/views/zhulao/App.vue
  3. 15 6
      vue.config.js

+ 1 - 1
.env.production

@@ -6,7 +6,7 @@ VUE_APP_BASE_API = 'https://test.poteviohealth.com/pmgw'
 VUE_APP_ZL_JF = 'https://jifen.tjpoteviohealth.com/blade-api'
 VUE_APP_ZL_HEALTH = 'https://web.poteviohealth.com/zhylsia/'
 VUE_APP_ZL_WSS = 'https://cdbwss.poteviohealth.com'
-# VUE_APP_ZL_WSS_ZP = 'https://web.poteviohealth.com/prod-api'
+# VUE_APP_ZL_WSS_ZP = 'https://test.poteviohealth.com/prod-api'
 VUE_APP_ZL_WSS_ZP = 'https://web.poteviohealth.com/prod-api'
 VUE_APP_ZL_WSS_ZP_BT = 'https://test.poteviohealth.com/subsidy'
 

+ 1 - 1
src/views/zhulao/App.vue

@@ -22,7 +22,7 @@ export default {
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
   color: #2c3e50;
-  min-height: 100%;
+  height: 100%;
 }
 
 #nav {

+ 15 - 6
vue.config.js

@@ -1,9 +1,11 @@
 var projectname = process.argv[3];
 var glob = require("glob");
 var publicPath = ''
+console.log(process.env.NODE_ENV)
 
 function getEntry() {
     var entries = {};
+
     if (process.env.NODE_ENV == "production") {
         entries = {
             index: {
@@ -25,13 +27,10 @@ function getEntry() {
             var fileList = filepath.split("/");
             var fileName = fileList[fileList.length - 2];
             publicPath = '/' + fileName + '/'
-            console.log(fileName, 'fileName')
             entries[fileName] = {
                 entry: `src/views/${fileName}/main.js`,
                 // 模板来源
-                template: `publ
-                ic/index.html`,
-                title: fileName == 'zhulao' ? '邹平养老' : '邹平未保客户端',
+                template: `public/index.html`,
                 // 在 dist/index.html 的输出
                 filename: `${fileName}.html`,
             };
@@ -45,7 +44,7 @@ function resolve(dir) {
     return path.join(__dirname, dir)
 }
 const port = process.env.port || process.env.npm_config_port || 12004 // dev port
-// const name = defaultSettings.title || 'vue Admin Template' // page title
+const name = 'vue Admin Template' // page title
 var pages = getEntry();
 console.log(publicPath)
 module.exports = {
@@ -124,5 +123,15 @@ module.exports = {
             }
         }
         // after: require('./mock/mock-server.js')
-    }
+    },
+    configureWebpack: {
+        // provide the app's title in webpack's name field, so that
+        // it can be accessed in index.html to inject the correct title.
+        name: name,
+        resolve: {
+            alias: {
+                '@': resolve('src')
+            }
+        }
+    },
 };