dct 2 months atrás
parent
commit
17010b63bf
6 changed files with 14 additions and 5 deletions
  1. 1 1
      .env.prod
  2. 1 1
      public/index.html
  3. 1 1
      src/layout/components/aside.vue
  4. 1 1
      src/store/index.js
  5. 1 1
      src/utils/request.js
  6. 9 0
      vue.config.js

+ 1 - 1
.env.prod

@@ -4,4 +4,4 @@ VUE_APP_CURRENTMODE=prod
 
 outputDir = "prod"
 
-VUE_APP_BASEURL=https://api.testhost.com/
+VUE_APP_BASEURL=

+ 1 - 1
public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title><%= htmlWebpackPlugin.options.title %></title>
+    <title>旅居黟县</title>
     <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.css) { %>
       <link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" />
       <link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet" />

+ 1 - 1
src/layout/components/aside.vue

@@ -5,7 +5,7 @@
         <el-icon class="logo">
           <Opportunity />
         </el-icon>
-        <span class="title" v-if="!isCollapse"> 黟县小住 </span>
+        <span class="title" v-if="!isCollapse"> 旅居黟县 </span>
       </router-link>
     </div>
     <el-menu :default-active="$route.path" class="aside-menu" :default-openeds="openeds" :collapse="isCollapse"

+ 1 - 1
src/store/index.js

@@ -5,7 +5,7 @@ export default createStore({
     //token: '' //初始化token
     userInfo: {},
     webSetting: {
-      projectName: '黟县小住'
+      projectName: '旅居黟县'
     }
   },
   mutations: {

+ 1 - 1
src/utils/request.js

@@ -8,7 +8,7 @@ import router from '../router';
 import util from '@/utils/util';
 
 const request = axios.create({
-  baseURL: process.env.VUE_APP_BASEURL, //process.env.BASE_API, // api的base_url
+  baseURL: '/api', //process.env.BASE_API, // api的base_url
   //withCredentials: true,   // Access-Control-Allow-Origin为*则前端不能携带cookie
   async: true,
   timeout: 240000, //4m

+ 9 - 0
vue.config.js

@@ -61,6 +61,15 @@ module.exports = {
     //     key: fs.readFileSync(path.join(__dirname, 'localhost.key')),
     //     cert: fs.readFileSync(path.join(__dirname, 'localhost.cert')),
     // },
+    proxy: {
+      '/api': {
+        target: 'http://kaung.cn:7001',
+        changeOrigin: true,
+        pathRewrite: {
+          '^/api': '',
+        },
+      },
+    },
   },
 
   chainWebpack: (config) => {