diff --git a/.env b/.env new file mode 100644 index 0000000..adb4ec7 --- /dev/null +++ b/.env @@ -0,0 +1,14 @@ +NODE_ENV=development + +VUE_APP_ENV=development + +# VUE_APP_API_ROOT=http://192.168.0.89:8392 +# VUE_APP_API_ROOT=http://192.168.0.165:8392 +#lsf新版接口路径 +# VUE_APP_API_ROOT=http://192.168.0.46:48080 +VUE_APP_API_ROOT=http://192.168.0.89:48080 +# 图片代理接口地址 +VUE_APP_API_ROOT_IMAGE=http://192.168.0.89:8096 +# 登录 +VUE_APP_API_ROOT_USER=http://192.168.0.89:8393 +# VUE_APP_API_ROOT_USER=http://192.168.0.89:8391 \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..9b3b50f --- /dev/null +++ b/.env.development @@ -0,0 +1,9 @@ +# just a flag +ENV = 'development' + +# base api +VUE_APP_BASE_API = '/api' + +# environment env 环境 + +VUE_APP_MONEY = 1000 diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..189abfd --- /dev/null +++ b/.env.production @@ -0,0 +1,5 @@ +NODE_ENV=production + +VUE_APP_ENV=production + +VUE_APP_API_ROOT=http://xxxx.com/api \ No newline at end of file diff --git a/package.json b/package.json index 2232818..0bf32ac 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "vue-cli-service serve", "build": "vue-cli-service build" + }, "dependencies": { "axios": "0.18.1", @@ -36,4 +37,4 @@ "uglifyjs-webpack-plugin": "^2.2.0", "vue-template-compiler": "^2.6.11" } -} +} \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index 54b0f1f..cd66328 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -59,8 +59,8 @@ p { src: // 数黑体 url("../assets/fonts/Alimama_ShuHeiTi_Bold.woff2") format("woff2"), - // url("../assets/fonts/Alimama_ShuHeiTi_Bold.woff") format("woff"), - // url("../assets/fonts/Alimama_ShuHeiTi_Bold.ttf") format("ttf"), + url("../assets/fonts/Alimama_ShuHeiTi_Bold.woff") format("woff"), + url("../assets/fonts/Alimama_ShuHeiTi_Bold.ttf") format("ttf"), //进步体 // url("../assets/fonts/DingTalk_JinBuTi_Regular.woff2") format("woff2"), // url("../assets/fonts/DingTalk_JinBuTi_Regular.woff") format("woff"), diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..c6e1a89 --- /dev/null +++ b/vue.config.js @@ -0,0 +1,74 @@ +// const UglifyJsPlugin = require('uglifyjs-webpack-plugin') +const path = require('path'); +module.exports = { + configureWebpack: { + resolve: { + alias: { + '@': path.resolve(__dirname, 'src') + } + } + }, + css: { + loaderOptions: { + css: { + // options here will be passed to css-loader + }, + // postcss: { + // // options here will be passed to postcss-loader + // plugins: [require('postcss-px2rem')({ + // remUnit: 75 + // })] + // } + } + }, + + pwa: { + iconPaths: { + favicon32: 'favicon.ico', + favicon16: 'favicon.ico', + appleTouchIcon: 'favicon.ico', + maskIcon: 'favicon.ico', + msTileImage: 'favicon.ico' + } + }, + //http://www.metavatar.cc/ + devServer: { + overlay: { + warnings: false, + errors: false + }, + proxy: { + '/api': { + target: 'https://smapitestmalls,iformall.com/C/api', + changeOrigin: true, + pathRewrite: { + '^/api': '' + }, + }, + + } + }, + lintOnSave: false, + publicPath: './', // 打包后引用的资源路径 + + chainWebpack: config => { + config.plugin('html').tap(args => { + args[0].favicon = './public/favicon.ico'; + return args; + }); + } + // configureWebpack: { + // plugins: [ + // //打包环境去掉console.log + // new UglifyJsPlugin({ + // uglifyOptions: { + // compress: { + // drop_console: true, //注释console + // drop_debugger: true, //注释debugger + // pure_funcs: ['console.log'], //移除console.log + // }, + // }, + // }), + // ], + // } +} \ No newline at end of file