zhangwenjian 5 年之前
父節點
當前提交
221c4a2ee2
共有 3 個文件被更改,包括 16 次插入7 次删除
  1. 1 1
      .env.production
  2. 9 0
      src/App.vue
  3. 6 6
      vue.config.js

+ 1 - 1
.env.production

@@ -2,5 +2,5 @@
 ENV = 'production'
 
 # base api
-VUE_APP_BASE_API = '/'
+VUE_APP_BASE_API = 'http://www.zhangwj.com:8000'
 

+ 9 - 0
src/App.vue

@@ -9,6 +9,15 @@ export default {
   name: 'App'
 }
 </script>
+<script>
+var _hmt = _hmt || [];
+(function() {
+  var hm = document.createElement("script");
+  hm.src = "https://hm.baidu.com/hm.js?1d2d61263f13e4b288c8da19ad3ff56d";
+  var s = document.getElementsByTagName("script")[0];
+  s.parentNode.insertBefore(hm, s);
+})();
+</script>
 
 <style lang="scss">
   .el-dialog__wrapper{

+ 6 - 6
vue.config.js

@@ -1,6 +1,6 @@
 'use strict'
 const path = require('path')
-const CompressionPlugin = require('compression-webpack-plugin');//引入gzip压缩插件
+const CompressionPlugin = require('compression-webpack-plugin')// 引入gzip压缩插件
 const defaultSettings = require('./src/settings.js')
 
 function resolve(dir) {
@@ -28,7 +28,7 @@ module.exports = {
    * Detail: https://cli.vuejs.org/config/#publicpath
    */
   publicPath: '/',
-  outputDir: '../service/view/admin',
+  outputDir: 'dist',
   // assetsDir: '../../static/admin',
   // assetsDir: '/',
   lintOnSave: false, // process.env.NODE_ENV === 'development',
@@ -45,12 +45,12 @@ module.exports = {
     plugins: [
       new CompressionPlugin({
         algorithm: 'gzip',
-        test:/\.js$|\.html$|\.css/,//匹配文件名
-        threshold:10240,//对超过10kb的数据进行压缩
-        deleteOriginalAssets:false,//是否删除原文件
+        test: /\.js$|\.html$|\.css/, // 匹配文件名
+        threshold: 10240, // 对超过10kb的数据进行压缩
+        deleteOriginalAssets: false, // 是否删除原文件
         minRatio: 0.8
       }),
-      new MonacoWebpackPlugin(),
+      new MonacoWebpackPlugin()
     ],
     name: name,
     resolve: {