소스 검색

no message

MS-CIAZDCOIXVRW\Administrator 3 년 전
부모
커밋
b91255911d
4개의 변경된 파일12개의 추가작업 그리고 14개의 파일을 삭제
  1. 1 1
      .env.development
  2. 1 1
      .env.production
  3. 7 10
      src/router/index.js
  4. 3 2
      vue.config.js

+ 1 - 1
.env.development

@@ -2,4 +2,4 @@
 ENV = 'development'
 
 # base api
-VUE_APP_BASE_API = '/reporting'
+VUE_APP_BASE_API = '/gradiate-school/reporting/'

+ 1 - 1
.env.production

@@ -2,4 +2,4 @@
 ENV = 'production'
 
 # base api
-VUE_APP_BASE_API = '/prod-api'
+VUE_APP_BASE_API = '/gradiate-school/reporting/'

+ 7 - 10
src/router/index.js

@@ -1,8 +1,5 @@
-import {
-  createRouter,
-  createWebHistory,
-  createWebHashHistory
-} from 'vue-router'
+import { createRouter, createWebHashHistory } from 'vue-router'
+// createWebHistory,
 import layout from '@/layout'
 
 // 公开路由表
@@ -48,11 +45,11 @@ const publicRoutes = [
 ]
 
 const router = createRouter({
-  // history: createWebHashHistory(),
-  history:
-    process.env.NODE_ENV === 'production'
-      ? createWebHistory()
-      : createWebHashHistory(),
+  history: createWebHashHistory(),
+  // history:
+  //   process.env.NODE_ENV === 'production'
+  //     ? createWebHistory()
+  //     : createWebHashHistory(),
   routes: [...publicRoutes]
 })
 

+ 3 - 2
vue.config.js

@@ -3,14 +3,15 @@ const { defineConfig } = require('@vue/cli-service')
 const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
 
 module.exports = defineConfig({
+  publicPath: '/gradiate-school/manage/',
   transpileDependencies: true,
   devServer: {
     // 配置反向代理
     proxy: {
       // 当地址中有/api的时候会触发代理机制
-      '/reporting': {
+      '/gradiate-school/reporting/': {
         // 要代理的服务器地址  这里不用写 api
-        target: 'https://chtech.ncjti.edu.cn/gradiate-school',
+        target: 'https://chtech.ncjti.edu.cn/',
         changeOrigin: true // 是否跨域
       }
     }