fanghuisheng 4 роки тому
батько
коміт
bf8dfe80c1
4 змінених файлів з 24 додано та 25 видалено
  1. BIN
      dist.zip
  2. 8 9
      src/router/index.js
  3. 3 3
      src/utils/request.js
  4. 13 13
      vue.config.js

+ 8 - 9
src/router/index.js

@@ -6,8 +6,16 @@ const routerHistory = createWebHistory(process.env.BASE_URL);
 let routes = [
     // ming router start
     // 大屏首页看板
+    //登录页面
     {
         path: '/',
+        name: 'login',
+        meta: { title: '登录', name: "登录 ", type: "" },
+        component: () =>
+            import('../views/login.vue'),
+    },
+    {
+        path: '/home',
         name: 'home',
         meta: { title: '首页', name: "智慧用电监控平台", type: "index" },
         component: () =>
@@ -102,15 +110,6 @@ let routes = [
         // import('../views/site/Power_diagram.vue'),
     },
 
-    //登录页面
-    {
-        path: '/login',
-        name: 'login',
-        meta: { title: '登录', name: "登录 ", type: "" },
-        component: () =>
-            import('../views/login.vue'),
-    },
-
 
 
 ]

+ 3 - 3
src/utils/request.js

@@ -6,12 +6,12 @@ import qs from 'qs'
 
 // create an axios instance
 
-let baseURL = window.PLATFROM_CONFIG.baseUrl
+// let baseURL = window.PLATFROM_CONFIG.baseUrl
 // console.log(process.env.VUE_APP_BASE_URL)
 // console.log(baseURL)
 const service = axios.create({
-    baseURL: baseURL, // url = base url + request url
-    // baseURL: process.env.VUE_APP_BASE_URL, // url = base url + request url
+    // baseURL: baseURL, // url = base url + request url
+    baseURL: process.env.VUE_APP_BASE_URL, // url = base url + request url
     // withCredentials: true, // send cookies when cross-domain requests
     timeout: 5000, // request timeout
     headers: {

+ 13 - 13
vue.config.js

@@ -36,17 +36,17 @@ module.exports = {
             },
         })
     },
-
-    // devServer: {
-    //     proxy: {
-    //         './': {
-    //             target: 'http://124.71.174.104:80/api',
-    //             ws: false,
-    //             changeOrigin: true,
-    //             pathRewrite: {
-    //                 '^/api': 'http://124.71.174.104:80/api'
-    //             }
-    //         }
-    //     }
-    // }
+    devServer: {
+        proxy: {
+            // '/vuefiv/': {
+            './': {
+                target: 'https://wx.ewoogi.com/api',
+                ws: false,
+                changeOrigin: true,
+                pathRewrite: {
+                    '^/api': 'https://wx.ewoogi.com/api'
+                }
+            }
+        }
+    }
 }