Ver Fonte

Merge branch 'master' of http://47.108.172.52:3000/dayou/productivity-platform-web

GouGengquan há 8 meses atrás
pai
commit
6be39e4be8

+ 1 - 1
.env.development

@@ -4,7 +4,7 @@ NODE_ENV = development
 VITE_NAME='全局环境'
 
 # 接口地址
-VITE_BASE_URL='http://127.0.0.1:8080/api/'
+VITE_BASE_URL='http://127.0.0.1:8080/pp/'
 
 # OA系统地址
 VITE_OA_URL='http://127.0.0.1:9518/'

+ 5 - 1
.env.production

@@ -1,4 +1,8 @@
 // 环境变量,哪个环境用的哪个见package.json
 NODE_ENV = production
 VITE_NAME='全局环境'
-VITE_BASE_URL='http://127.0.0.1:9080/productivity-platform/'
+# 接口地址
+VITE_BASE_URL='http://doc.scdayou.com/pp/'
+
+# OA系统地址
+VITE_OA_URL='http://mbs.scdayou.com/api/'

+ 0 - 1
src/components/PageOffice/index.vue

@@ -2,7 +2,6 @@
     <div class="doc">
       <!-- 此div用来加载PageOffice客户端控件,其中div的高宽及位置就决定了控件的大小及位置 -->
       <div style="width:auto; height:900px;" v-html="poHtmlCode"></div>
-      2323
     </div>
   </template>
  

+ 1 - 1
src/router/index.js

@@ -248,7 +248,7 @@ const routes = [
 ]
 
 const router = createRouter({
-  history: createWebHistory(),
+  history: createWebHistory('/prod/'),
   routes,
 })
 

+ 1 - 1
src/views/house/workbench/components/timeline.vue

@@ -64,7 +64,7 @@ export default {
             paramJson.fileName="";
             paramJson.fileUrl=fileUrl;
             let paramString=JSON.stringify(paramJson);
-            POBrowser.openWindow('/showDoc', 'width=1150px;height=900px;',paramString);
+            POBrowser.openWindow('/pord/showDoc', 'width=1150px;height=900px;',paramString);
         },
     }
  }

+ 17 - 2
vite.config.js

@@ -29,13 +29,28 @@ export default defineConfig({
     host: '127.0.0.1',
     port: 8080, // 端口
     proxy: {
-        '/api': { // 请求接口中要替换的标识
+        '/pp': { // 请求接口中要替换的标识
             target: 'http://localhost:9080', // 代理地址
             changeOrigin: true, // 是否允许跨域
             secure: true,
-            rewrite: (path) => path.replace(/^\/api/, '/api') // api标志替换为''
+            rewrite: (path) => path.replace(/^\/pp/, '/pp') // api标志替换为''
         },
     }
+  },
+  base: './',
+  build: {
+    chunkSizeWarningLimit: 1000,
+    outDir: "dist",
+    assetsDir: "assets", //指定静态资源存放路径
+    // assetsPublicPath:'',
+    sourcemap: true, //是否构建source map 文件
+    terserOptions: {
+      // 生产环境移除console
+      compress: {
+        drop_console: true,
+        drop_debugger: true,
+      },
+    },
   }
   
 })