Ver código fonte

:sparkles: Introducing new features.add new login page

lishangbu 6 anos atrás
pai
commit
6905ffd638

BIN
public/img/logo.png


+ 0 - 24
public/svg/logo.svg

@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
-<svg version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 width="186px" height="49.5px" viewBox="0 0 186 49.5" style="enable-background:new 0 0 186 49.5;" xml:space="preserve">
-<style type="text/css">
-	.st0{fill:#333;}
-</style>
-<g>
-
-	<polygon class="st0" points="76.6,1.7 71.7,1.7 71.7,33 87.5,33 87.5,28.1 76.6,28.1 	"/>
-	<path class="st0" d="M114.2,6.3c-3.1-3.1-6.8-4.6-11.1-4.6c-4.3,0-8,1.5-11.1,4.6C89,9.3,87.5,13,87.5,17.3c0,4.3,1.6,8,4.6,11
-		c3.1,3.1,6.8,4.6,11.1,4.6c4.3,0,8-1.5,11.1-4.6c3-3.1,4.6-6.8,4.6-11C118.8,13,117.3,9.3,114.2,6.3z M110.8,25
-		c-2.1,2.1-4.7,3.2-7.7,3.2c-3,0-5.5-1.1-7.6-3.2c-2.1-2.1-3.2-4.7-3.2-7.6c0-3,1.1-5.5,3.2-7.7c2.1-2.1,4.7-3.2,7.6-3.2
-		c3,0,5.5,1.1,7.7,3.2c2.1,2.1,3.2,4.7,3.2,7.7C114,20.3,112.9,22.9,110.8,25z"/>
-	<path class="st0" d="M181.4,28.4c3.1-3.1,4.6-6.8,4.6-11c0-4.3-1.5-8-4.6-11.1c-3.1-3.1-6.8-4.6-11.1-4.6c-4.3,0-8,1.5-11.1,4.6
-		c-3.1,3.1-4.6,6.8-4.6,11.1c0,4.3,1.6,8,4.6,11c3.1,3.1,6.8,4.6,11.1,4.6C174.6,33,178.4,31.4,181.4,28.4z M159.5,17.3
-		c0-3,1.1-5.5,3.2-7.7c2.1-2.1,4.7-3.2,7.6-3.2c3,0,5.5,1.1,7.7,3.2c2.1,2.1,3.2,4.7,3.2,7.7c0,3-1.1,5.5-3.2,7.6
-		c-2.1,2.1-4.7,3.2-7.7,3.2c-3,0-5.5-1.1-7.6-3.2C160.6,22.9,159.5,20.3,159.5,17.3z"/>
-	<path class="st0" d="M147.7,28.4c1.6-1.6,2.8-3.3,3.5-5.3c0.2-0.6,1.1-2.8,1.1-5.8c0-1-0.1-1.8-0.2-2.4c-5.2,0-10.3,0-15.5,0
-		c0,1.6,0,3.2,0,4.8h10.6c-0.4,2-1.4,3.7-2.9,5.2c-2.1,2.1-4.7,3.2-7.7,3.2c-3,0-5.5-1.1-7.6-3.2c-2.1-2.1-3.2-4.7-3.2-7.6
-		c0-3,1.1-5.5,3.2-7.7c2.1-2.1,4.7-3.2,7.6-3.2c2.2,0,4.2,0.6,6,1.8l3.5-3.5c-2.7-2.1-5.9-3.2-9.4-3.2c-4.3,0-8,1.5-11.1,4.6
-		c-3.1,3.1-4.6,6.8-4.6,11.1c0,4.3,1.6,8,4.6,11c3.1,3.1,6.8,4.6,11.1,4.6C140.9,33,144.6,31.4,147.7,28.4z"/>
-</g>
-</svg>

+ 0 - 1
src/const/crud/activiti/task.js

@@ -25,7 +25,6 @@ export const tableOption = {
   delBtn: false,
   addBtn: false,
   menuType: 'menu',
-  dic: [],
   column: [
     {
       label: 'ID',

+ 0 - 1
src/const/crud/admin/client.js

@@ -34,7 +34,6 @@ export const tableOption = {
   editBtn: false,
   delBtn: false,
   viewBtn: true,
-  dic: [],
   column: [{
     width: 150,
     label: '编号',

+ 0 - 1
src/const/crud/admin/dict.js

@@ -26,7 +26,6 @@ export const tableOption = {
   searchSize: 'mini',
   editBtn: false,
   delBtn: false,
-  dic: [],
   column: [{
     width: 150,
     label: '数据值',

+ 0 - 1
src/const/crud/admin/token.js

@@ -35,7 +35,6 @@ export const tableOption = {
   addBtn: false,
   editBtn: false,
   delBtn: false,
-  dic: [],
   column: [{
     label: '用户ID',
     prop: 'user_id',

+ 0 - 1
src/const/crud/daemon/execution-log.js

@@ -37,7 +37,6 @@ export const tableOption = {
   delBtn: false,
   addBtn: false,
   viewBtn: true,
-  dic: [],
   column: [
     {
       label: 'ID',

+ 0 - 1
src/const/crud/daemon/status-trace-log.js

@@ -40,7 +40,6 @@ export const tableOption = {
   delBtn: false,
   addBtn: false,
   viewBtn: true,
-  dic: [],
   column: [{
     label: 'ID',
     prop: 'id',

+ 1 - 11
src/const/website.js

@@ -7,18 +7,8 @@ export default {
   whiteTagList: ['/login', '/404', '/401', '/lock' ], // 配置不添加tags页面 ('/advanced-router/mutative-detail/*'——*为通配符)
   lockPage: '/lock',
   tokenTime: 6000,
-  info: {
-    title: 'PigX Pro 快速开发框架',
-    list: [
-      '一个基于Spring Cloud、OAuth2.0开发基于Vue前后分离的开发平台。',
-      '一个基于Avue2 开发无需前端知识,即可快速上手的开发平台。',
-      '最大程度上帮助节省学习微服务成本。',
-      'QQ群:23754102',
-      '当前版本:v2.1.0'
-    ]
-  },
+  infoTitle: 'PigX Pro 快速开发框架',
   statusWhiteList: [428],
-  // http的status默认放行不才用统一处理的,
   // 配置首页不可关闭
   isFirstPage: false,
   fistPage: {

+ 142 - 128
src/page/login/index.vue

@@ -1,18 +1,18 @@
 <template>
-  <div class="login-container pull-height" @keyup.enter.native="handleLogin">
-    <div class="login-weaper">
-      <div class="login-left animated fadeInLeft">
-        <div class="login-info">
-          <h2 class="login-info-title">{{website.info.title}}</h2>
-          <ul class="login-info-list">
-            <li class="login-info-item" v-for="(item,index) in website.info.list" :key="index">
-              <i class="el-icon-check"></i>
-              &nbsp;{{item}}
-            </li>
-          </ul>
+  <div class="login-container"
+       @keyup.enter.native="handleLogin">
+
+    <div class="login-weaper  animated bounceInDown">
+      <div class="login-left">
+        <div class="login-time">
+          {{time}}
         </div>
+        <img class="img"
+             src="/img/logo.png"
+             alt="">
+        <p class="title">{{website.infoTitle}}</p>
       </div>
-      <div class="login-border animated fadeInRight">
+      <div class="login-border">
         <div class="login-main">
           <h4 class="login-title">
             <el-select
@@ -28,131 +28,155 @@
           <userLogin v-if="activeName==='user'"></userLogin>
           <codeLogin v-else-if="activeName==='code'"></codeLogin>
           <thirdLogin v-else-if="activeName==='third'"></thirdLogin>
+          <div class="login-menu">
+            <a href="#"
+               @click.stop="activeName='user'">账号密码</a>
+            <a href="#"
+               @click.stop="activeName='code'">手机号登录</a>
+            <a href="#"
+               @click.stop="activeName='third'">第三方登录</a>
+          </div>
         </div>
-        <div class="login-menu">
-          <a href="#" @click.stop="activeName='user'">账号密码</a>
-          <a href="#" @click.stop="activeName='code'">手机号登录</a>
-          <a href="#" @click.stop="activeName='third'">第三方登录</a>
-        </div>
+
       </div>
     </div>
   </div>
 </template>
 <script>
-import userLogin from "./userlogin";
-import codeLogin from "./codelogin";
-import thirdLogin from "./thirdlogin";
-import topColor from "../index/top/top-color";
-import color from "@/mixins/color";
-import { setStore, getStore } from "@/util/store";
-import { mapGetters } from "vuex";
-import { validatenull } from "@/util/validate";
-export default {
-  name: "login",
-  mixins: [color()],
-  components: {
-    topColor,
-    userLogin,
-    codeLogin,
-    thirdLogin
-  },
-  data() {
-    return {
-      active: "",
-      activeName: "user"
-    };
-  },
-  watch: {
-    $route() {
-      const params = this.$route.query;
-      this.socialForm.state = params.state;
-      this.socialForm.code = params.code;
-      if (!validatenull(this.socialForm.state)) {
-        const loading = this.$loading({
-          lock: true,
-          text: `登录中,请稍后。。。`,
-          spinner: "el-icon-loading"
-        });
-        setTimeout(() => {
-          loading.close();
-        }, 2000);
-        this.handleSocialLogin();
+  import userLogin from "./userlogin";
+  import codeLogin from "./codelogin";
+  import thirdLogin from "./thirdlogin";
+  import { mapGetters } from "vuex";
+  import { setStore, getStore } from "@/util/store";
+  import { dateFormat } from "@/util/date";
+  import { validatenull } from "@/util/validate";
+  export default {
+    name: "login",
+    components: {
+      userLogin,
+      codeLogin,
+      thirdLogin
+    },
+    data() {
+      return {
+        time: "",
+        active: "",
+        activeName: "user"
+      };
+    },
+    watch: {
+      $route() {
+        const params = this.$route.query;
+        this.socialForm.state = params.state;
+        this.socialForm.code = params.code;
+        if (!validatenull(this.socialForm.state)) {
+          const loading = this.$loading({
+            lock: true,
+            text: `${
+              this.socialForm.state === "WX" ? "微信" : "QQ"
+              }登录中,请稍后。。。`,
+            spinner: "el-icon-loading"
+          });
+          setTimeout(() => {
+            loading.close();
+          }, 2000);
+        }
+      }
+    },
+    created() {
+      this.getTime();
+      setInterval(() => {
+        this.getTime();
+      }, 1000);
+    },
+    mounted() {},
+    computed: {
+      ...mapGetters(["website"])
+    },
+    props: [],
+    methods: {
+      handleCommand(command) {
+        setStore({ name: "tenantId", content: command });
+      },
+      getTime() {
+        this.time = dateFormat(new Date());
       }
     }
-  },
-  created() {
-    this.active = getStore({ name: "tenantId" });
-  },
-  mounted() {},
-  computed: {
-    ...mapGetters(["website"])
-  },
-  props: [],
-  methods: {
-    handleCommand(command) {
-      setStore({ name: "tenantId", content: command });
-    }
-  }
-};
+  };
 </script>
 
 <style lang="scss">
   .login-container {
+    display: flex;
+    align-items: center;
     position: relative;
     width: 100%;
     height: 100%;
     margin: 0 auto;
+    background: url("http://www.17sucai.com/preview/242158/2015-01-10/%E7%99%BB%E5%BD%95/images/cloud.jpg")
+    0 bottom repeat-x #049ec4;
+    animation: animate-cloud 20s linear infinite;
   }
   .login-weaper {
-    position: absolute;
-    top: 22%;
-    left: 0;
-    width: 100%;
+    margin: 0 auto;
+    width: 1000px;
+    box-shadow: -4px 5px 10px rgba(0, 0, 0, 0.4);
   }
-  .login-container::before {
-    z-index: -1024;
-    content: "";
-    position: absolute;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-    background-image: url("/img/login.png");
-    background-size: cover;
+
+  .login-left,
+  .login-border {
+    position: relative;
+    min-height: 500px;
+    align-items: center;
+    display: flex;
   }
   .login-left {
+    border-top-left-radius: 5px;
+    border-bottom-left-radius: 5px;
+    justify-content: center;
+    flex-direction: column;
+    background-color: #409eff;
+    color: #fff;
     float: left;
     width: 50%;
     position: relative;
   }
-  .login-logo {
-    position: absolute;
-    top: 0;
-    left: 0;
-    padding-top: 50px;
-    font-size: 24px;
-    color: #333;
-  }
-  .login-info {
-    padding-left: 140px;
+  .login-left .img {
+    width: 140px;
   }
-  .login-info-title {
-    line-height: 90px;
-    color: rgb(52, 58, 64);
+  .login-time {
+    position: absolute;
+    left: 25px;
+    top: 25px;
+    width: 100%;
+    color: #fff;
+    font-weight: 200;
+    opacity: 0.9;
+    font-size: 18px;
+    overflow: hidden;
   }
-  .login-info-item {
-    font-size: 14px;
-    line-height: 2.5;
-    color: rgb(33, 37, 41);
+  .login-left .title {
+    margin-top: 60px;
+    text-align: center;
+    color: #fff;
+    font-weight: 300;
+    letter-spacing: 2px;
+    font-size: 25px;
   }
+
   .login-border {
+    border-left: none;
+    border-top-right-radius: 5px;
+    border-bottom-right-radius: 5px;
+    color: #fff;
+    background-color: #fff;
     width: 50%;
     float: left;
     box-sizing: border-box;
   }
   .login-main {
     margin: 0 auto;
-    width: 50%;
+    width: 65%;
     box-sizing: border-box;
   }
   .login-main > h3 {
@@ -162,9 +186,7 @@ export default {
     color: #76838f;
   }
   .login-title {
-    display: flex;
-    justify-content: center;
-    align-items: center;
+    color: #333;
     margin-bottom: 40px;
     font-weight: 500;
     font-size: 22px;
@@ -181,40 +203,33 @@ export default {
     }
   }
   .login-menu {
+    margin-top: 40px;
     width: 100%;
     text-align: center;
     a {
-      color: rgb(153, 153, 153);
+      color: #999;
       font-size: 12px;
       margin: 0px 8px;
     }
   }
-  .login-index {
-    margin-top: 40px !important;
-    width: 180px;
-    height: 48px;
-    text-align: center;
-    border-radius: 50px !important;
-    background: transparent !important;
-    color: #333 !important;
-    font-size: 16px !important;
-    border: 1px solid rgb(152, 22, 244);
-  }
   .login-submit {
-    display: block !important;
-    margin: 40px auto 10px auto !important;
-    width: 200px;
-    height: 48px;
-    font-size: 14px !important;
-    text-align: center;
-    border-radius: 50px !important;
-    border: 0px;
-    box-shadow: rgba(152, 22, 244, 0.19) 0px 5px 10px 2px;
+    width: 100%;
+    height: 45px;
+    border: 1px solid #409eff;
+    background: none;
+    font-size: 18px;
+    letter-spacing: 2px;
+    font-weight: 300;
+    color: #409eff;
+    cursor: pointer;
+    margin-top: 30px;
+    font-family: "neo";
+    transition: 0.25s;
   }
   .login-form {
     margin: 10px 0;
     i {
-      color: #999;
+      color: #333;
     }
     .el-form-item__content {
       width: 100%;
@@ -261,4 +276,3 @@ export default {
     text-align: center;
   }
 </style>
-

+ 34 - 1
src/styles/animate/vue-transition.scss

@@ -28,4 +28,37 @@
 .fade-scale-leave-to {
     opacity: 0;
     transform: scale(0.8);
-}
+}
+
+@-webkit-keyframes animate-cloud {
+  from {
+    background-position: 600px 100%;
+  }
+  to {
+    background-position: 0 100%;
+  }
+}
+@-moz-keyframes animate-cloud {
+  from {
+    background-position: 600px 100%;
+  }
+  to {
+    background-position: 0 100%;
+  }
+}
+@-ms-keyframes animate-cloud {
+  from {
+    background-position: 600px 100%;
+  }
+  to {
+    background-position: 0 100%;
+  }
+}
+@-o-keyframes animate-cloud {
+  from {
+    background-position: 600px 100%;
+  }
+  to {
+    background-position: 0 100%;
+  }
+}

+ 4 - 2
src/styles/media.scss

@@ -112,9 +112,11 @@
         margin-left: -30px;
     }
     .login-border {
+        border-radius: 5px;
+        padding: 40px;
         margin: 0 auto;
         float: none !important;
-        width: 86% !important;
+        width: 70% !important;
     }
     .login-main {
         width: 100% !important;
@@ -156,4 +158,4 @@
             display: block;
         }
     }
-}
+}

+ 28 - 0
src/util/date.js

@@ -21,3 +21,31 @@ export const calcDate = (date1, date2) => {
     seconds: seconds
   }
 }
+
+/**
+ * 日期格式化
+ */
+export function dateFormat(date) {
+  let format = 'yyyy-MM-dd hh:mm:ss';
+  if (date != 'Invalid Date') {
+    var o = {
+      "M+": date.getMonth() + 1, //month
+      "d+": date.getDate(), //day
+      "h+": date.getHours(), //hour
+      "m+": date.getMinutes(), //minute
+      "s+": date.getSeconds(), //second
+      "q+": Math.floor((date.getMonth() + 3) / 3), //quarter
+      "S": date.getMilliseconds() //millisecond
+    }
+    if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
+      (date.getFullYear() + "").substr(4 - RegExp.$1.length));
+    for (var k in o)
+      if (new RegExp("(" + k + ")").test(format))
+        format = format.replace(RegExp.$1,
+          RegExp.$1.length == 1 ? o[k] :
+            ("00" + o[k]).substr(("" + o[k]).length));
+    return format;
+  }
+  return '';
+
+}

+ 1 - 1
vue.config.js

@@ -1,4 +1,4 @@
-const url = 'http://127.0.0.1:9999'
+const url = 'http://139.224.200.249:19999'
 module.exports = {
   lintOnSave: true,
   productionSourceMap: false,