From b445789b2ed0ab3b70291ff0bebc09c73aac7207 Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期四, 16 十二月 2021 10:04:04 +0800
Subject: [PATCH] 自适应

---
 public/index.html       |    3 +
 src/pages/index/App.vue |   65 +-------------------------------
 src/pages/index/main.ts |    1 
 package.json            |    1 
 src/pages/login/App.vue |   34 ++++++++++-------
 5 files changed, 27 insertions(+), 77 deletions(-)

diff --git a/package.json b/package.json
index 6ebdc06..c00fb28 100644
--- a/package.json
+++ b/package.json
@@ -52,6 +52,7 @@
     "eslint": "^5.16.0",
     "eslint-plugin-prettier": "^3.1.0",
     "eslint-plugin-vue": "^5.0.0",
+    "lib-flexible": "^0.3.2",
     "mini-css-extract-plugin": "^2.4.5",
     "parcel-bundler": "^1.12.5",
     "prettier": "^1.18.2",
diff --git a/public/index.html b/public/index.html
index e78c1a5..1bc2029 100644
--- a/public/index.html
+++ b/public/index.html
@@ -4,7 +4,8 @@
 <head>
   <meta charset="utf-8" />
   <meta http-equiv="X-UA-Compatible" content="IE=edge" />
-  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
+  <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0" /> -->
+
   <link rel="stylesheet" href="/public//css/globalVariable.css">
   <link rel="icon" type="image/png" href="<%= BASE_URL %>favicon.png" sizes="32x32" />
   <link rel="stylesheet" href="/fonts/alibaba/iconfont.css">
diff --git a/src/pages/index/App.vue b/src/pages/index/App.vue
index 46e1cda..70cb09b 100644
--- a/src/pages/index/App.vue
+++ b/src/pages/index/App.vue
@@ -56,7 +56,6 @@
 } from "./api";
 
 export default {
-  async created() {},
   mounted() {
     this.getInitInfo();
     let message = "缃戠粶姝e父";
@@ -137,64 +136,6 @@
       }
     },
     nextFormNot() {
-      this.active++;
-      this.$refs["carousel"].next();
-    },
-    systemLogin() {
-      this.nullRule = this.rules;
-      this.$nextTick(() => {
-        this.$refs["ruleForm"].validate((valid) => {
-          if (valid) {
-            this.loading = this.$loading({
-              lock: true,
-              text: "Loading",
-              spinner: "el-icon-loading",
-              background: "rgba(0, 0, 0, 0.7)",
-            });
-            this.testLogin();
-          } else {
-            this.nullRule = {};
-          }
-        });
-        this.nullRule = {};
-      });
-    },
-    async testLogin() {
-      // location.assign("/view/desktop/")
-      tologin({ username: this.user.loginName, password: this.user.password })
-        .then((json) => {
-          const loginedInfo = {
-            access_token: json.token_type + " " + json.access_token,
-            refresh_token: json.refresh_token,
-          };
-          sessionStorage.setItem("expires_in", json.expires_in);
-          sessionStorage.setItem("loginedInfo", JSON.stringify(loginedInfo));
-          this.loading.close();
-          this.getLoginUserData();
-        })
-        .catch((err) => {
-          this.loading.close();
-          this.$notify({
-            title: "鎻愮ず",
-            type: "error",
-            message: err.msg,
-          });
-          this.$refs.pwd.focus();
-        });
-    },
-    async getLoginUserData() {
-      let res = await getLoginUserData();
-      if (res.success) {
-        sessionStorage.setItem("userInfo", JSON.stringify(res.data));
-        this.$notify.success("鐧诲綍鎴愬姛锛�");
-        // 鑾峰彇鏉冮檺
-        await this.getMenuList();
-        location.assign("/view/desktop/");
-        return res.data;
-      } else {
-        this.$notify.error("鐧诲綍澶辫触锛�");
-      }
-
       this.active++;
       this.$refs["carousel"].next();
     },
@@ -312,21 +253,21 @@
     }
 
     .formAccount {
-      margin-top: 157px;
+      margin-top: 0.81rem;
       margin-left: 200px;
       width: 550px;
     }
 
     .formNet,
     .formInfo {
-      margin-top: 90px;
+      margin-top: 0.47rem;
       margin-left: 200px;
       width: 550px;
     }
 
     .control {
       position: fixed;
-      top: 770px;
+      top: 80%;
       left: 0;
       right: 0;
       line-height: 40px;
diff --git a/src/pages/index/main.ts b/src/pages/index/main.ts
index 1a04451..641a846 100644
--- a/src/pages/index/main.ts
+++ b/src/pages/index/main.ts
@@ -4,6 +4,7 @@
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
 import '@/assets/css/element-variables.scss'
+import 'lib-flexible'
 
 import i18n from '@/lang'
 
diff --git a/src/pages/login/App.vue b/src/pages/login/App.vue
index e623efb..b752383 100644
--- a/src/pages/login/App.vue
+++ b/src/pages/login/App.vue
@@ -332,15 +332,15 @@
 body,
 .login {
   height: 100%;
-  min-width: 1646px;
-  min-height: 811px;
+  min-width: 1200px;
+  min-height: 680px;
   position: relative;
   background-image: url("/apps/loginData/background.png");
 
   .title {
     position: absolute;
-    top: 345px;
-    left: 301px;
+    top: 40%;
+    left: 15.6%;
     color: #fff;
     text-align: center;
 
@@ -359,7 +359,7 @@
     display: flex;
     justify-content: start;
     align-items: center;
-    left: 358px;
+    left: 18.6%;
     bottom: 40px;
 
     .logo {
@@ -376,10 +376,10 @@
 
   .login-form {
     position: absolute;
-    width: 780px;
-    height: 1000px;
-    right: 40px;
-    top: 40px;
+    width: 40%;
+    height: 92.5%;
+    right: 3.75%;
+    top: 3.75%;
     padding: 0 90px;
     box-sizing: border-box;
 
@@ -387,10 +387,16 @@
     opacity: 0.95;
     box-shadow: -4px 0px 10px rgba(0, 0, 0, 0.25);
     border-radius: 56px;
+    overflow: hidden;
 
     .logo {
-      margin-top: 100px;
-      margin-bottom: 16px;
+      width: 100%;
+      margin-top: 13%;
+      margin-bottom: 20px;
+    }
+
+    .el-form {
+      width: 100%;
     }
 
     .el-form-item {
@@ -398,12 +404,12 @@
     }
 
     .el-form-item:nth-child(2) {
-      margin-top: 60px;
-      margin-bottom: 80px;
+      margin-top: 10%;
+      margin-bottom: 13%;
     }
 
     .el-button {
-      width: 600px;
+      width: 100%;
       height: 60px;
       background: #4e94ff;
       border-radius: 30px;

--
Gitblit v1.8.0