dongjh 2 kuukautta sitten
vanhempi
commit
0d8a90a865
3 muutettua tiedostoa jossa 6 lisäystä ja 5 poistoa
  1. 2 1
      .env.production
  2. 1 1
      src/router/index.js
  3. 3 3
      vue.config.js

+ 2 - 1
.env.production

@@ -1,4 +1,5 @@
 NODE_ENV=production
-VUE_APP_API_BASE_URL=http://localhost:8520/jeecg-boot
+# 打包时修改该配置 因为有别的电脑会使用,这里要设置成真实IP
+VUE_APP_API_BASE_URL=http://192.168.31.110:8520/jeecg-boot
 VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
 VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview

+ 1 - 1
src/router/index.js

@@ -5,7 +5,7 @@ import { constantRouterMap } from '@/config/router.config'
 Vue.use(Router)
 
 export default new Router({
-  mode: 'history',
+  mode: 'history', // 打包时修改该配置 如果发布时,是以应用程序方式发布(类似8082/screen),需要将此段注释掉
   base: process.env.BASE_URL,
   scrollBehavior: () => ({ y: 0 }),
   routes: constantRouterMap

+ 3 - 3
vue.config.js

@@ -15,7 +15,7 @@ module.exports = {
   // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
   productionSourceMap: false,
   //qiankuan打包时放开
-  //outputDir: "../dist/main",
+  outputDir: "interlock",
   // 多入口配置
   // pages: {
   //   index: {
@@ -24,8 +24,8 @@ module.exports = {
   //     filename: 'index.html',
   //   }
   // },
-  //打包app时放开该配置
-  //publicPath:'/',
+  //打包时修改该配置 需放开
+  //publicPath:'/interlock',
   configureWebpack: config => {
     //生产环境取消 console.log
     if (process.env.NODE_ENV === 'production') {