jz.kai 4 years ago
parent
commit
a05b8f906a
6 changed files with 43 additions and 5 deletions
  1. 3 0
      .env.development
  2. 3 0
      .env.production
  3. 3 0
      .env.test
  4. 16 0
      src/api/sys/user.js
  5. 5 5
      src/routers/index.js
  6. 13 0
      src/routers/modules/sys.js

+ 3 - 0
.env.development

@@ -0,0 +1,3 @@
+OUT_PUT_DIR=dist/supervision-mobile
+
+VUE_APP_BACKEND_URL=http://192.168.33.225:8086/supervision-server

+ 3 - 0
.env.production

@@ -0,0 +1,3 @@
+OUT_PUT_DIR=dist/qylhh-admin
+
+VUE_APP_BACKEND_URL=http://qylhhapi.xiaoxinda.com/enterprise-server

+ 3 - 0
.env.test

@@ -0,0 +1,3 @@
+OUT_PUT_DIR=dist/enterprise-portal
+
+VUE_APP_BACKEND_URL=http://ykt-test.xiaoxinda.com/enterprise-server

+ 16 - 0
src/api/sys/user.js

@@ -0,0 +1,16 @@
+import request from '@/utils/request'
+import constant from '@/constant'
+
+function login(data) {
+  var formData = new FormData();
+
+  for (var key in data) {
+    formData.append(key, data[key]);
+  }
+
+  return request.post(constant.serverUrl + '/login', formData)
+}
+
+export default {
+  login
+}

+ 5 - 5
src/routers/index.js

@@ -6,12 +6,12 @@ Vue.use(Router)
 export const constantRoutes = [
     {
       path: '/',
-      component: () => import('@/views/home')
+      component: () => import('@/views/login')
     },
-    {
-        path: '/login',
-        component: () => import('@/views/login')
-    }
+    // {
+    //     path: '/login',
+    //     component: () => import('@/views/login')
+    // }
   ];
   
   // Array.prototype.push.apply(routes, caseRouters);

+ 13 - 0
src/routers/modules/sys.js

@@ -0,0 +1,13 @@
+var routers = [
+        // {
+        //         path: '/sys/user/list',
+        //         name: 'SysUserList',
+        //         component: () => import('@/views/sys/user-list.vue'),
+        //         meta: {
+        //                 roles: ["admin"],
+        //                 title: '用户管理'
+        //         }
+        // },
+]
+
+export default routers;