congzc 2 anni fa
parent
commit
8c4db94922
6 ha cambiato i file con 106 aggiunte e 3 eliminazioni
  1. +14
    -0
      .env
  2. +9
    -0
      .env.development
  3. +5
    -0
      .env.production
  4. +2
    -1
      package.json
  5. +2
    -2
      src/styles/index.scss
  6. +74
    -0
      vue.config.js

+ 14
- 0
.env Vedi File

@@ -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

+ 9
- 0
.env.development Vedi File

@@ -0,0 +1,9 @@
# just a flag
ENV = 'development'

# base api
VUE_APP_BASE_API = '/api'

# environment env 环境

VUE_APP_MONEY = 1000

+ 5
- 0
.env.production Vedi File

@@ -0,0 +1,5 @@
NODE_ENV=production

VUE_APP_ENV=production

VUE_APP_API_ROOT=http://xxxx.com/api

+ 2
- 1
package.json Vedi File

@@ -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"
}
}
}

+ 2
- 2
src/styles/index.scss Vedi File

@@ -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"),


+ 74
- 0
vue.config.js Vedi File

@@ -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
// },
// },
// }),
// ],
// }
}

Caricamento…
Annulla
Salva