Jelajahi Sumber

Merge branch 'master' of http://git.cc-lotus.info/smart-jobs/web-common

lrf402788946 5 tahun lalu
induk
melakukan
8610253d7b
2 mengubah file dengan 51 tambahan dan 58 penghapusan
  1. 37 53
      src/layout/index/login.vue
  2. 14 5
      src/views/index.vue

+ 37 - 53
src/layout/index/login.vue

@@ -1,24 +1,11 @@
 <template>
   <div id="login">
     <el-row>
-      <el-col :span="24" class="login">
-        <el-col :span="8" class="common red">
-          <el-link :underline="false">
-            <span class="mainTwoIcon"><i class="el-icon-user"></i></span>
-            <span class="mainTwoTit">生源信息</span>
-          </el-link>
-        </el-col>
-        <el-col :span="8" class="common green" @click.native="turnTo('http://hr.smart.cc-lotus.info/www/login')">
-          <el-link :underline="false">
-            <span class="mainTwoIcon"><i class="el-icon-office-building"></i></span>
-            <span class="mainTwoTit">单位登录/注册</span>
-          </el-link>
-        </el-col>
-        <el-col :span="8" class="common blue" @click.native="turnTo('/www/student/login')">
-          <el-link :underline="false">
-            <span class="mainTwoIcon"><i class="el-icon-user"></i></span>
-            <span class="mainTwoTit">学生登录</span>
-          </el-link>
+      <el-col :span="24">
+        <el-col :span="12" class="date">{{ gettime }} </el-col>
+        <el-col :span="12" class="login">
+          <el-link :underline="false" @click.native="turnTo('http://hr.smart.cc-lotus.info/www/login')">单位登录/注册</el-link>
+          <el-link :underline="false" @click.native="turnTo('/www/student/login')">学生登录</el-link>
         </el-col>
       </el-col>
     </el-row>
@@ -30,54 +17,51 @@ export default {
   name: 'login',
   props: {},
   components: {},
-  data: () => ({}),
-  created() {},
+  data: () => ({
+    gettime: '',
+  }),
+  created() {
+    this.currentTime();
+  },
   computed: {},
   methods: {
     turnTo(uri) {
       window.location.href = uri;
     },
+    currentTime() {
+      setInterval(this.getTime, 500);
+    },
+    getTime: function() {
+      var _this = this;
+      let yy = new Date().getFullYear();
+      let mm = new Date().getMonth() + 1;
+      let dd = new Date().getDate();
+      _this.gettime = yy + '年' + mm + '月' + dd + '日';
+    },
   },
 };
 </script>
 
 <style lang="less" scoped>
-.login {
-  padding: 10px;
+.date {
+  padding: 0 20px;
+  font-size: 18px;
+  font-family: 楷体;
+  color: #a90a0a;
+  font-weight: 600;
 }
-.login .common {
-  padding: 10px;
-  text-align: center;
-  border-radius: 17px;
-  margin: 0 10px 0 0;
-  width: 380px;
+.login {
+  text-align: right;
+  padding: 0 60px;
 }
-.mainTwoIcon {
-  display: inline-block;
-  width: 35px;
-  height: 35px;
-  border-radius: 90px;
-  background: #fff;
-  text-align: center;
-  line-height: 35px;
-  color: #333;
+/deep/.login .el-link {
+  padding: 0 10px;
+  font-size: 18px;
+  font-family: 楷体;
+  color: #a90d0d;
+  font-weight: 600;
 }
-.mainTwoTit {
-  color: #fff;
-  padding: 0 0 0 10px;
+/deep/.login .el-link:hover {
   font-size: 20px;
-  font-weight: 500;
-}
-.red {
-  background-color: #d0122c;
-}
-.green {
-  background-color: #75d53a;
-}
-.blue {
-  background-color: #47c0ff;
-}
-.orange {
-  background-color: #ff9147;
 }
 </style>

+ 14 - 5
src/views/index.vue

@@ -1,6 +1,11 @@
 <template>
   <div id="index">
     <el-row>
+      <el-col :span="24" class="login">
+        <div class="w_1200">
+          <login></login>
+        </div>
+      </el-col>
       <el-col :span="24">
         <el-col :span="24" class="top">
           <top :topInfo="topInfo"></top>
@@ -125,6 +130,7 @@ export default {
     // native, //导航 slot
     news, //新闻
     notice, //通告
+    login, //登录
     // calendar, //日历 slot
     recruit, //招聘
     fast, //快速链接
@@ -176,11 +182,6 @@ export default {
   border: 1px solid #ccc;
   overflow: hidden;
 }
-.mainLogin {
-  margin: 0 0 20px 0;
-  height: 80px;
-  border: 1px solid #ccc;
-}
 .mainData {
   margin: 0 0 20px 0;
 }
@@ -274,4 +275,12 @@ export default {
   width: 60px;
   height: 120px;
 }
+.login {
+  position: fixed;
+  top: 0;
+  z-index: 1000;
+  height: 40px;
+  line-height: 40px;
+  background: #cccccc9f;
+}
 </style>