root 2 лет назад
Родитель
Сommit
c0b7c36d8e
6 измененных файлов с 152 добавлено и 154 удалено
  1. 4 65
      app.html
  2. 2 1
      lang/en-US.js
  3. 3 87
      login.html
  4. 1 1
      pages/login/login-json.js
  5. 59 0
      public/static/css/app.css
  6. 83 0
      public/static/css/login.css

+ 4 - 65
app.html

@@ -8,75 +8,14 @@
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
     <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
     <link rel="stylesheet" href="./public/static/amis-sdk/helper.css">
-
     <link rel="stylesheet" href="./public/static/amis-sdk/sdk.css">
     <link rel="stylesheet" href="./public/static/amis-sdk/iconfont.css">
-<link rel="stylesheet" href="./public/static/fonts/remixicon.css">
-    <style>
-        html,
-        body,
-        .app-wrapper {
-            position: relative;
-            width: 100%;
-            height: 100%;
-            margin: 0;
-            padding: 0;
-            touch-action: pan-y;
-        }
-        :root {
-            --Form-item-gap: 1.3rem;
-            --InputGroup-height: 2.5rem;
-            --Button-height: 2.5rem;
-            --InputGroup-paddingX: .6rem;
-            --InputGroup-addOn-bg: var(--Form-input-bg);
-            /* --fontSizeBase: .9rem; */
-        }
-        .app-wrapper {
-            position: relative;
-            width: 100%;
-            height: 100%;
-            margin: 0;
-            padding: 0;
-        }
-        .amis-scope .cxd-Layout--headerFixed .cxd-Layout-header .cxd-Page {
-          background: none;
-        }
-        .amis-scope .cxd-Page-body .cxd-DropDown--alignRight .cxd-DropDown-menu {
-          text-align: center;
-        }
-        /* .amis-scope .cxd-DropDown button .m-r-xs {
-          width: 100%;
-          height: 100%;
-        } */
-        .amis-scope .cxd-Button--default {
-          border: none;
-          outline: none;
-        }
-        .amis-scope .cxd-Button--default:not(:disabled):not(.is-disabled):hover {
-        color: none;
-        background: none;
-        border-color: none;
-        border-width: none;
-        border-style: none;
-        box-shadow: none;
-        border: none;
-        outline: none;
-      }
-      .amis-scope .m-r-xs {
-        margin-top:-5px;
-        width: 30px;
-        height: 30px;
-      }
-      @media (min-width: 768px) {
-        .amis-scope .cxd-Layout--asideFixed.cxd-Layout--folded .cxd-Layout-aside {
-          z-index: 2000;
-        }
-      }
-    </style>
+    <link rel="stylesheet" href="./public/static/fonts/remixicon.css">
+    <!-- 引入自定义样式 -->
+    <link rel="stylesheet" href="./public/static/css/app.css">
 </head>
 <body>
 <div id="root" class="app-wrapper"></div>
-
 <script type='text/javascript' src='./public/static/amis-sdk/sdk.js'></script>
 <script type='text/javascript' src='./public/static/amis-static/history.js'></script>
 <!-- 引入语言包 -->
@@ -166,7 +105,7 @@
         return decodeURI(pathname) === link;
       }
 
-      let languageInfo = getLanguageInfo();
+      let languageInfo = getLanguageInfo();//获取语言包内容
       let amisInstance = amis.embed(
         '#root',
         app,

+ 2 - 1
lang/en-US.js

@@ -9,7 +9,8 @@ function enUs() {
       '密码': 'Password',
       '验证码': 'Verification Code',
       '平台': 'Platform',
-      '登录': 'Sign in'
+      '登 录': 'Sign in',
+      '退出登录': 'Log out'
     },
     register: {
         'Action.countDown': 'Wait for ${timeLeft}s',

+ 3 - 87
login.html

@@ -8,93 +8,9 @@
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
     <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
     <link rel="stylesheet" href="./public/static/amis-sdk/helper.css">
-
     <link rel="stylesheet" href="./public/static/amis-sdk/sdk.css">
-    <style>
-        html,
-        body,
-        .app-wrapper {
-            /* position: relative; */
-            width: 100%;
-            height: 100%;
-            margin: 0;
-            padding: 0;
-            touch-action: pan-y;
-            overflow: hidden;
-        }
-        :root {
-            --Form-item-gap: 1.3rem;
-            --InputGroup-height: 2.5rem;
-            --Button-height: 2.5rem;
-            --InputGroup-paddingX: .6rem;
-            --InputGroup-addOn-bg: var(--Form-input-bg);
-            /* --fontSizeBase: .9rem; */
-        }
-
-        .app-wrapper {
-            /* position: relative; */
-            width: 100%;
-            height: 100%;
-            margin: 0;
-            padding: 0;
-        }
-
-        .amis-scope .cxd-Icon{height: 1rem}
-        .amis-scope .cxd-TextControl-input input{height: 100% !important;}
-        .amis-scope .cxd-TextControl-input:hover{border:var(--Form-input-borderWidth) solid var(--Form-input-borderColor)}
-        .amis-scope .cxd-InputGroup .cxd-TextControl-input{border-left-width: 0;padding-left: 0;}
-        .code_img{cursor: pointer;}
-
-        .amis-scope .cxd-Form{
-            font-size: var(--Form-fontSize);
-            position: none !important;
-            max-width: 700px;
-            margin: 0 auto;
-            margin-top: 10vh;
-            /* position:; */
-        }
-        .amis-scope .cxd-Wrapper--md, .amis-scope .cxd-Container--md {
-            width: 100%;
-            height: 100%;
-        }
-        .amis-scope h1 {
-            font-size: 4vw;
-        }
-        @media (max-width: 768px) {
-            .amis-scope .cxd-Form{
-                font-size: var(--Form-fontSize);
-                position: none !important;
-                margin: 0 auto;
-                margin-top: 0vh;
-                /* position:; */
-            }
-            .amis-scope .cxd-Wrapper--md, .amis-scope .cxd-Container--md {
-                padding: 0;
-            }
-        }
-        .amis-scope .cxd-Button--default {
-          border: none;
-          outline: none;
-        }
-        .amis-scope .cxd-Button--default:not(:disabled):not(.is-disabled):hover {
-        color: none;
-        background: none;
-        border-color: none;
-        border-width: none;
-        border-style: none;
-        box-shadow: none;
-        border: none;
-        outline: none;
-      }
-      .amis-scope .m-r-xs {
-        margin-top:-5px;
-        width: 30px;
-        height: 30px;
-      }
-      .amis-scope .cxd-Form .cxd-Wrapper--md, .amis-scope .cxd-Container--md {
-        height: 1%;
-      }
-    </style>
+    <!-- 引入自定义样式 -->
+    <link rel="stylesheet" href="./public/static/css/login.css">
 </head>
 <body>
 <div id="root" class="app-wrapper"></div>
@@ -130,7 +46,7 @@
     // 刷新验证码
     function refresh_code()
     {
-        document.querySelector('.code_img').src = '/login/verify?' + Math.random();
+      document.querySelector('.code_img').src = '/login/verify?' + Math.random();
     }
 </script>
 </body>

+ 1 - 1
pages/login/login-json.js

@@ -159,7 +159,7 @@ function getLoginJson() {
                     ]
                 },
                 {
-                    "label": "登录",
+                    "label": "登 录",
                     "type": "action",
                     "actionType": "submit",
                     "level": "primary",

+ 59 - 0
public/static/css/app.css

@@ -0,0 +1,59 @@
+html,
+        body,
+        .app-wrapper {
+            position: relative;
+            width: 100%;
+            height: 100%;
+            margin: 0;
+            padding: 0;
+            touch-action: pan-y;
+        }
+        :root {
+            --Form-item-gap: 1.3rem;
+            --InputGroup-height: 2.5rem;
+            --Button-height: 2.5rem;
+            --InputGroup-paddingX: .6rem;
+            --InputGroup-addOn-bg: var(--Form-input-bg);
+            /* --fontSizeBase: .9rem; */
+        }
+        .app-wrapper {
+            position: relative;
+            width: 100%;
+            height: 100%;
+            margin: 0;
+            padding: 0;
+        }
+        .amis-scope .cxd-Layout--headerFixed .cxd-Layout-header .cxd-Page {
+          background: none;
+        }
+        .amis-scope .cxd-Page-body .cxd-DropDown--alignRight .cxd-DropDown-menu {
+          text-align: center;
+        }
+        /* .amis-scope .cxd-DropDown button .m-r-xs {
+          width: 100%;
+          height: 100%;
+        } */
+        .amis-scope .cxd-Button--default {
+          border: none;
+          outline: none;
+        }
+        .amis-scope .cxd-Button--default:not(:disabled):not(.is-disabled):hover {
+        color: none;
+        background: none;
+        border-color: none;
+        border-width: none;
+        border-style: none;
+        box-shadow: none;
+        border: none;
+        outline: none;
+      }
+      .amis-scope .m-r-xs {
+        margin-top:-5px;
+        width: 30px;
+        height: 30px;
+      }
+      @media (min-width: 768px) {
+        .amis-scope .cxd-Layout--asideFixed.cxd-Layout--folded .cxd-Layout-aside {
+          z-index: 2000;
+        }
+      }

+ 83 - 0
public/static/css/login.css

@@ -0,0 +1,83 @@
+html,
+        body,
+        .app-wrapper {
+            /* position: relative; */
+            width: 100%;
+            height: 100%;
+            margin: 0;
+            padding: 0;
+            touch-action: pan-y;
+            overflow: hidden;
+        }
+        :root {
+            --Form-item-gap: 1.3rem;
+            --InputGroup-height: 2.5rem;
+            --Button-height: 2.5rem;
+            --InputGroup-paddingX: .6rem;
+            --InputGroup-addOn-bg: var(--Form-input-bg);
+            /* --fontSizeBase: .9rem; */
+        }
+
+        .app-wrapper {
+            /* position: relative; */
+            width: 100%;
+            height: 100%;
+            margin: 0;
+            padding: 0;
+        }
+
+        .amis-scope .cxd-Icon{height: 1rem}
+        .amis-scope .cxd-TextControl-input input{height: 100% !important;}
+        .amis-scope .cxd-TextControl-input:hover{border:var(--Form-input-borderWidth) solid var(--Form-input-borderColor)}
+        .amis-scope .cxd-InputGroup .cxd-TextControl-input{border-left-width: 0;padding-left: 0;}
+        .code_img{cursor: pointer;}
+
+        .amis-scope .cxd-Form{
+            font-size: var(--Form-fontSize);
+            position: none !important;
+            max-width: 700px;
+            margin: 0 auto;
+            margin-top: 10vh;
+            /* position:; */
+        }
+        .amis-scope .cxd-Wrapper--md, .amis-scope .cxd-Container--md {
+            width: 100%;
+            height: 100%;
+        }
+        .amis-scope h1 {
+            font-size: 4vw;
+        }
+        @media (max-width: 768px) {
+            .amis-scope .cxd-Form{
+                font-size: var(--Form-fontSize);
+                position: none !important;
+                margin: 0 auto;
+                margin-top: 0vh;
+                /* position:; */
+            }
+            .amis-scope .cxd-Wrapper--md, .amis-scope .cxd-Container--md {
+                padding: 0;
+            }
+        }
+        .amis-scope .cxd-Button--default {
+          border: none;
+          outline: none;
+        }
+        .amis-scope .cxd-Button--default:not(:disabled):not(.is-disabled):hover {
+        color: none;
+        background: none;
+        border-color: none;
+        border-width: none;
+        border-style: none;
+        box-shadow: none;
+        border: none;
+        outline: none;
+      }
+      .amis-scope .m-r-xs {
+        margin-top:-5px;
+        width: 30px;
+        height: 30px;
+      }
+      .amis-scope .cxd-Form .cxd-Wrapper--md, .amis-scope .cxd-Container--md {
+        height: 1%;
+      }