Parcourir la source

修改登录页面背景图logo样式

ZYZ il y a 1 an
Parent
commit
1d31b18bba

BIN
zkqy-ui/src/assets/images/background3.jpg


BIN
zkqy-ui/src/assets/images/mecos-logo1.jpg


+ 12 - 11
zkqy-ui/src/layout/index.vue

@@ -5,9 +5,8 @@
       <el-row>
         <el-col :span="12">
           <div class="logo-title">
-            <img :src="logo" alt="" class="imgg"/>
+            <img src="../assets/images/mecos-logo1.jpg" alt="" class="imgg"/>
             <span class="title">{{ title }}</span>
-            <!-- <img src="../assets/images/comlo.png" alt="" class="imgg" /> -->
           </div>
         </el-col>
         <el-col :span="4" :offset="8">
@@ -157,7 +156,7 @@ export default {
     },
     getlogo() {
       let logo = sessionStorage.getItem("logo");
-      this.title = sessionStorage.getItem("title") || "工业应用操作系统";
+      this.title = sessionStorage.getItem("title") || "工业应用引擎";
       if (logo) {
         this.logo = process.env.VUE_APP_BASE_API + logo;
       } else {
@@ -238,7 +237,7 @@ export default {
   cursor: pointer;
   width: 50px;
   height: 50px;
-  border-radius: 50px; //是谁的样式来着
+  border-radius: 50px; 
   z-index: 2;
 
   vertical-align: middle;
@@ -263,7 +262,7 @@ export default {
 }
 
 .imgg {
-  // width: 553px;
+  /* width: 553px; */
   width: 270px;
   height: 80px;
   float: left;
@@ -279,14 +278,16 @@ export default {
 
   .title {
     flex: 1;
-    margin-left: 5px;
+    margin-left: -35px;
+    margin-top: 10px;
     display: block;
 
-    font-size: 32px;
-    font-weight: 700;
-    letter-spacing: 0px;
+    font-size: 26px;
+    font-weight: 520;
+    letter-spacing: 2px;
     line-height: 38.4px;
-    color: rgba(7, 68, 138, 1);
+    /* color: rgba(7, 68, 138, 1); */
+    color: black;
     text-align: left;
     vertical-align: top;
     float: left;
@@ -295,7 +296,7 @@ export default {
     overflow: hidden;
     text-overflow: ellipsis;
 
-    // max-width: ;
+    /* // max-width: ; */
   }
 }
 

+ 36 - 15
zkqy-ui/src/views/adminLogin.vue

@@ -1,5 +1,10 @@
 <template>
   <div class="login">
+    <div class="page-description">
+      <span class="description">智能制造</span>
+      <span class="description">万物互联</span>
+      <span class="sub-description"> 登录并开始管理您的智能引擎账户 </span>
+    </div>
     <el-form
       ref="loginForm"
       :model="loginForm"
@@ -10,7 +15,7 @@
         <el-col :span="12" class="comlogo"></el-col>
         <el-col :span="12">
           <div class="grid-content bg-purple-dark title">
-            工业应用操作系统
+            · 工业应用引擎
             <!-- 智能制造平台 -->
           </div>
         </el-col>
@@ -268,6 +273,22 @@ export default {
 </script>
 
 <style rel="stylesheet/scss" lang="scss" scoped>
+.page-description {
+  width: 245px;
+  position: relative;
+  left: 30px;
+  top: -90px;
+  .description {
+    display: block;
+    font-size: 32px;
+    color: #fff;
+  }
+  .sub-description {
+    display: block;
+    font-size: 16px;
+    color: #fff;
+  }
+}
 ::v-deep.el-input--medium .el-input__inner {
   height: 54px;
   line-height: 54px;
@@ -350,12 +371,12 @@ export default {
 }
 
 .comlogo {
-  margin-left: 40px;
-  margin-top: 57px;
-  width: 500px;
-  height: 60px;
-  background: url(../assets/images/mecos-logo.jpg);
-  background-size: contain;
+  margin-left: 26px;
+  margin-top: 49px;
+  width: 200px;
+  height: 70px;
+  background: url(../assets/images/mecos-logo1.jpg);
+  background-size: cover;
   /* background: url(../assets/images/comp.png); */
   /* box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25); */
   opacity: 1;
@@ -365,8 +386,8 @@ export default {
   justify-content: center;
   align-items: center;
   height: 100%;
-  background-image: url("../assets/images/background1.jpg");
-  background-size: 100% 99.99%;
+  background-image: url("../assets/images/background3.jpg");
+  background-size:100% 100%;
   /* padding-bottom: 55.19%;  */
   background-position: center;
   background-repeat: no-repeat;
@@ -376,20 +397,20 @@ export default {
 .title {
   width: 258px;
   height: 35px;
-  margin-top: 69px;
-  margin-left: 17px;
-  font-size: 32px;
+  margin-top: 70px;
+  margin-left: 8px;
+  font-size: 22px;
   font-weight: 400;
-  letter-spacing: 0px;
+  letter-spacing: 2px;
   line-height: 38.4px;
-  color: rgba(7, 68, 138, 1);
+  color: black;
   text-align: left;
   vertical-align: top;
   float: left;
 }
 
 .login-form {
-  margin-left: 44%;
+  margin-left: 30%;
   margin-top: 48px;
   width: 621px;
   height: 624px;

+ 38 - 25
zkqy-ui/src/views/login.vue

@@ -13,7 +13,7 @@
         <el-col :span="12" class="comlogo"></el-col>
         <el-col :span="12">
           <div class="grid-content bg-purple-dark title">
-            工业应用操作系统
+            · 工业应用引擎
             <!-- 智能制造平台 -->
           </div>
         </el-col
@@ -156,29 +156,33 @@ export default {
     // 校验url
     validateTenantId() {
       let tenantCode = this.$route.query['tenantCode']
+      console.log("租户登录", tenantCode);
       if (tenantCode != null) {
         // 得到tenantId 查询裤中是否存在该租户
         isTenantExist({tenantCode: tenantCode}).then(res => {
-          if (res == undefined) {
-            this.$router.push({path: "/401"})
-          } else if (res.data?.tenantId) { // 判断当前编号是否存在库中
+          if (res.data?.tenantId) { // 判断当前编号是否存在库中
             this.tenantId = res.data.tenantId;
             this.loginForm.tenantID = this.tenantId;
-            if (res.data.loginPageConfiguration != null) {
-              // 得到租户的信息
-              this.config = res.data.loginPageConfiguration
-              this.setConfig();
+            // 得到租户的信息
+            this.config = res.data.loginPageConfiguration
+            this.setConfig();
+            // 如果当前租户没有配置登录页面则不可访问
+            if (this.config == null && this.config == undefined) {
+              // this.$router.push({path: "/404"})
+              this.getCode();
+              this.getCookie();
+            } else {
+              this.getCode();
+              this.getCookie();
             }
-            this.getCode();
-            this.getCookie();
           } else {
-            console.log("租户有问题!")
             // 当前访问链接中的租户编号不存在
-            this.$router.push({path: "/401"})
+            this.$router.push({path: "/404"})
           }
         })
       } else {
-        this.$router.push({path: "/401"})
+        console.log('跳转')
+        this.$router.push({path: "/404"})
       }
     },
     setConfig() {
@@ -199,6 +203,9 @@ export default {
             process.env.VUE_APP_BASE_IMG_API + loginPageBackgroundImage
           })`;
 
+          console.log("" + `url(${
+            process.env.VUE_APP_BASE_IMG_API + loginPageBackgroundImage
+          })`)
         }
       }
 
@@ -215,6 +222,7 @@ export default {
       // 设置title
       if (loginPageTitle) {
         let titleDom = document.getElementsByClassName("title");
+        console.log(titleDom);
         if (titleDom.length > 0) {
           titleDom[0].innerHTML = loginPageTitle;
         }
@@ -223,6 +231,7 @@ export default {
       // 设置meta信息
       if (windowTitle) {
         document.title = windowTitle;
+        console.dir(document);
       }
       // 设置页面描述
       if (loginPageDescription) {
@@ -415,11 +424,11 @@ export default {
 }
 
 .comlogo {
-  margin-left: 28px;
-  margin-top: 57px;
-  width: 194px;
-  height: 64px;
-  background: url(../assets/images/mec_logo_login.png);
+  margin-left: 26px;
+  margin-top: 49px;
+  width: 200px;
+  height: 70px;
+  background: url(../assets/images/mecos-logo1.jpg);
   /* background: url(../assets/images/comp.png); */
   /* box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25); */
   opacity: 1;
@@ -431,20 +440,24 @@ export default {
   justify-content: center;
   align-items: center;
   height: 100%;
-  background-image: url("../assets/images/background.jpg");
-  background-size: cover;
+  background-image: url("../assets/images/background3.jpg");
+  background-size:100% 100%;
+  /* padding-bottom: 55.19%;  */
+  background-position: center;
+  background-repeat: no-repeat;
 }
 
 .title {
   width: 258px;
   height: 35px;
-  margin-top: 69px;
-  margin-left: 17px;
-  font-size: 32px;
+  margin-top: 70px;
+  margin-left: 8px;
+  font-size: 22px;
   font-weight: 400;
-  letter-spacing: 0px;
+  letter-spacing: 2px;
   line-height: 38.4px;
-  color: rgba(7, 68, 138, 1);
+  /* color: rgba(7, 68, 138, 1); */
+  color: black;
   text-align: left;
   vertical-align: top;
   float: left;