Jelajahi Sumber

修改首页

guolufei123 4 tahun lalu
induk
melakukan
a85622638b

TEMPAT SAMPAH
front-vue/src/assets/images/home_logo.png


TEMPAT SAMPAH
front-vue/src/assets/images/home_search.png


TEMPAT SAMPAH
front-vue/src/assets/images/nav_icon1.png


TEMPAT SAMPAH
front-vue/src/assets/images/nav_icon2.png


+ 2 - 1
front-vue/src/assets/styles/sidebar.scss

@@ -96,9 +96,10 @@
 
     & .theme-dark .nest-menu .el-submenu>.el-submenu__title,
     & .theme-dark .el-submenu .el-menu-item {
-      background-color: $subMenuBg !important;
+      // background-color: $subMenuBg !important;
 
       &:hover {
+        color: #ffffff;
         background-color: $subMenuHover !important;
       }
     }

+ 3 - 3
front-vue/src/assets/styles/variables.scss

@@ -11,9 +11,9 @@ $panGreen: #30B08F;
 // sidebar
 $menuText:#ffffff;
 $menuActiveText:#919599;
-$subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951
+$subMenuActiveText:#4280f2; // https://github.com/ElemeFE/element/issues/12951
 
-$menuBg:#4A72D4; //全体背景颜色
+$menuBg:#4280f2; //全体背景颜色
 
 $menuHover:#263445;
 $sidebarTitle: #ffffff;
@@ -22,7 +22,7 @@ $menuLightBg:#ffffff;
 $menuLightHover:#f0f1f5;
 $sidebarLightTitle: #001529;
 
-$subMenuBg:#4A72D4;//三级菜单背景颜色
+$subMenuBg:#4280f2;//三级菜单背景颜色
 $subMenuHover:#308EEE;
 
 $sideBarWidth: 200px;

+ 3 - 5
front-vue/src/layout/components/Sidebar/index.vue

@@ -1,19 +1,17 @@
 <template>
-    <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }">
-        <logo v-if="showLogo" :collapse="isCollapse" />
+    <div :class="{'has-logo':showLogo}" style="backgroundColor: #ffffff;">
         <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
             <el-menu
                 :default-active="activeMenu"
                 :collapse="isCollapse"
-                :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg"
-                :text-color="settings.sideTheme === 'theme-dark' ? variables.menuText : 'rgba(0,0,0,.65)'"
+                text-color="#677792"
                 :unique-opened="true"
                 :active-text-color="settings.theme"
                 :collapse-transition="false"
                 mode="vertical"
             >
                 <sidebar-item
-                    v-for="(route, index) in children"
+                    v-for="(route, index) in permission_routes"
                     :key="route.path  + index"
                     :item="route"
                     :base-path="basepath + '/' + route.path"

+ 107 - 25
front-vue/src/layout/index.vue

@@ -1,28 +1,28 @@
 <template>
-  <div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
+  <div :class="classObj" class="app-wrapper zap-home" :style="{'--current-color': theme}">
     <!-- 一级导航水平 start -->
     <!-- <el-header style="width:100%"> -->
-    <el-menu
-      class="horizontalbar-container"
-      mode="horizontal"
-      :default-active="activeMenu"
-      :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg"
-      :text-color="settings.sideTheme === 'theme-dark' ? variables.menuText : 'rgba(0,0,0,.65)'"
-      active-text-color="#ffffff"
-      
-      >
-        <horizontalbar  
-          v-for="(route, index) in permission_routes"
-          :key="route.path  + index"
-          :item="route"
-          :base-path="route.path">
-        </horizontalbar>
-        <user />
-    </el-menu>
+    <div class="zap-header" :style="{backgroundColor: variables.menuBg}">
+      <div style="display:flex;align-items:center;">
+        <img class="zap-home-logo" src="../assets/images/home_logo.png" alt="">
+        <div class="zap-home-name">融信宝</div>
+      </div>
+      <div style="display: flex; align-items: center;">
+        <div class="zap-home-search">
+          <img class="zap-home-search__icon" src="../assets/images/home_search.png" alt="">
+          <el-input class="zap-home-search__input" placeholder="输入搜索关键词"></el-input>
+        </div>
+        <img class="zap-home-header__icon" src="../assets/images/nav_icon1.png" alt="">
+        <img class="zap-home-header__icon" src="../assets/images/nav_icon2.png" alt="">
+        <!-- <user /> -->
+        <img class="zap-avatar" :src="avatar" alt="">
+        <P class="zap-username">{{name}}</P>
+      </div>
+    </div>
     <!-- </el-header> -->
     <!-- 一级导航水平 end -->
     <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
-    <sidebar class="sidebar-container" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
+    <sidebar class="sidebar-container" />
     <div :class="{hasTagsView:needTagsView}" class="main-container">
       <div :class="{'fixed-header':fixedHeader}">
         <navbar />
@@ -66,7 +66,7 @@ export default {
       needTagsView: state => state.settings.tagsView,
       fixedHeader: state => state.settings.fixedHeader
     }),
-    ...mapGetters(["permission_routes", "sidebar"]),
+    ...mapGetters(["permission_routes", "sidebar", "avatar", "name"]),
     classObj() {
       return {
         hideSidebar: !this.sidebar.opened,
@@ -95,17 +95,21 @@ export default {
   }
 }
 </script>
-
+<style lang="scss">
+.zap-home{
+  .el-input--medium .el-input__inner{
+    font-size: 16px;
+    border-color: transparent;
+  }
+}
+</style>
 <style lang="scss" scoped>
   @import "~@/assets/styles/mixin.scss";
   @import "~@/assets/styles/variables.scss";
   .horizontalbar-container{
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
     // display: flex;
     justify-content: space-between;
+    padding-left: 270px;
     z-index:5;
     .el-menu-item{
       padding: 0 2%;
@@ -151,4 +155,82 @@ export default {
   .mobile .fixed-header {
     width: 100%;
   }
+  .zap-header{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 60px;
+    z-index: 99;
+  }
+  .zap-home-logo{
+    width: 215px;
+    height: 60px;
+  }
+  .zap-home-name{
+    display: inline-block;
+    height: 60px;
+    line-height: 60px;
+    text-align: center;
+    padding: 0 16px;
+    font-size: 16px;
+    color: #ffffff;
+    background-image: linear-gradient(
+      #3b72d8, 
+      #3b72d8), 
+    linear-gradient(
+      #588dff, 
+      #588dff);
+    background-blend-mode: normal, 
+      normal;
+  }
+  .zap-home-search{
+    display: flex;
+    align-items: center;
+    width: 395px;
+    height: 40px;
+    padding: 0 22px;
+    background-image: linear-gradient(
+      #ffffff, 
+      #ffffff), 
+    linear-gradient(
+      #f7f7f7, 
+      #f7f7f7);
+    background-blend-mode: normal, 
+      normal;
+    border-radius: 19px;
+    border: solid 1px #ebebeb;
+  }
+  .zap-home-search__icon{
+    width: 21px;
+    height: 22px;
+  }
+  .zap-home-search__input{
+    
+  }
+  .zap-home-header__icon{
+    width: 26px;
+    height: 26px ;
+    &:nth-of-type(1){
+      margin-left: 40px;
+    }
+    &:nth-of-type(2){
+      margin-left: 30px;
+    }
+  }
+  .zap-avatar{
+    width: 40px;
+    height: 40px;
+    margin-left: 40px;
+    border-radius: 50%;
+  }
+  .zap-username{
+    margin-left: 10px;
+    margin-right: 24px;
+    font-size: 14px;
+    color: #ffffff;
+  }
 </style>

+ 220 - 218
front-vue/src/views/login.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="backdrop">
+    <div class="backdrop zap-login">
         <el-container>
             <!-- logo -->
             <img class="zap-logo" src="../assets/images/login_logo.png" alt="">
@@ -109,7 +109,7 @@
                                 <div class="zap-scanning__text">打开<span class="zap-scanning__color">微信</span>扫码登录</div>
                             </div>
                             <el-form-item>
-                                <div class="zap-agreement" style="padding-top: 52px;padding-left: 60px;">
+                                <div class="zap-agreement" style="padding-top: 32px;padding-left: 60px;">
                                     <span class="zap-agreement__text">登录视为同意并遵守</span>
                                     <div class="zap-agreement__link">
                                         <span>《招采云链服务平台会员注册协议》</span>
@@ -385,244 +385,246 @@ export default {
 };
 </script>
 <style rel="stylesheet/scss" lang="scss">
-.login {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    height: 100%;
-    background-size: cover;
+// 大背景图
+.backdrop {
+    padding-top: 100px;
+    background-color: #ebf3ff;
+    width: 100%;
+    min-height: 100%;
+    text-align: center;
 }
-// 中间背景图
-.login-form {
-    margin-left: 75px;
-    border-radius: 6px;
-    background-size: 935px 434px;
-    background-repeat: no-repeat;
-    margin-top: 40px;
-    // 输入框大小
-    .el-input {
+.zap-login{
+    .login {
+        display: flex;
+        justify-content: center;
+        height: 100%;
+        background-size: cover;
+    }
+    // 中间背景图
+    .login-form {
+        margin-left: 75px;
+        border-radius: 6px;
+        background-size: 935px 434px;
+        background-repeat: no-repeat;
+        margin-top: 40px;
+        // 输入框大小
+        .el-input {
+            height: 55px;
+            width: 100%;
+            background-image: linear-gradient(
+                #fdfdfd, 
+                #fdfdfd), 
+            linear-gradient(
+                #e7f0ff, 
+                #e7f0ff);
+            background-blend-mode: normal, 
+                normal;
+            input {
+                height: 55px;
+                width: 100%;
+                font-size: 18px;
+            }
+        }
+        .input-icon {
+            height: 53px;
+            width: 22px;
+            margin-left: 14px;
+            margin-right: 14px
+        }
+        .el-input--prefix .el-input__inner{
+            padding-left: 50px;
+        }
+    }
+    .login-tip {
+        font-size: 13px;
+        text-align: center;
+    }
+    .el-form-item--medium .el-form-item__content{
+        display: flex;
+        align-items: center;
+    }
+    // 验证码
+    .login-code {
+        height: 55px;
+        img {
+            cursor: pointer;
+            vertical-align: middle;
+        }
+    }
+    .login-code-img {
+        flex: 1;
         height: 55px;
+        margin-left: 8px;
+    }
+
+    .rightulliimg{
+        width: 860px;
+
+    }
+    .divider_left{
+        margin-left: -40px;
+    }
+
+    // 内部供应链
+    .zap-tabs{
+        width: 410px;
+        height: 550px;
+        padding: 10px 48px 46px;
+        box-sizing: border-box;
+        background-image: linear-gradient(
+            #ffffff, 
+            #ffffff), 
+        linear-gradient(
+            #f3f3f3, 
+            #f3f3f3);
+        .el-tabs__nav-wrap{
+            padding: 0 12px;
+        }
+        .el-tabs__nav-wrap::after{
+            height: 0;
+        }
+        .el-tabs__nav{
+            width: 100%;
+        }
+        .el-tabs__item{
+            height: 56px;
+            line-height: 56px;
+            font-size: 24px;
+            color: #333333;   
+            &:nth-of-type(3){
+                padding-left: 30px;
+            }
+        }
+        .el-tabs__item.is-active{
+            color: #0056eb;
+        }
+        .el-tabs__active-bar{
+            background-color: #0056eb;
+        }
+    }
+    .login-left{
+        width: 704px;
+        margin-top: 40px;
+        .login-name{
+            width: 100%;
+        }
+        .login-illustration{
+            width: 515px;
+        }
+    }
+    .zap-logo{
+        position: absolute;
+        top: 25px;
+        left: 45px;
+        width: 210px;
+        height: 60px;
+    }
+    .zap-2dcode{
+        display: flex;
+        justify-content: flex-end;
+        align-items: center;
+        width: 410px;;
+        padding-top: 10px;
+        padding-right: 10px;
+        font-size: 0;
+        background-color: #ffffff;
+        box-sizing: border-box;
+    }
+    .zap-2dcode__text{
+        width: 113px;
+        height: 28px;
+    }
+    .zap-2dcode__img{
+        width: 60px;
+        height: 61px;
+        cursor: pointer;
+    }
+    .zap-button{
+        margin-top: 25px;
         width: 100%;
+        height: 55px;
+        font-size: 18px;
+        border-radius: 0;
         background-image: linear-gradient(
-            #fdfdfd, 
-            #fdfdfd), 
+            #0056eb, 
+            #0056eb), 
         linear-gradient(
             #e7f0ff, 
             #e7f0ff);
         background-blend-mode: normal, 
             normal;
-        input {
-            height: 55px;
-            width: 100%;
-            font-size: 18px;
-        }
     }
-    .input-icon {
-        height: 53px;
-        width: 22px;
-        margin-left: 14px;
-        margin-right: 14px
+    .zap-agreement{
+        display: flex;
+        align-items: top;
+        margin-top: 8px;
+        line-height: 18px;
+        font-size: 12px;
     }
-    .el-input--prefix .el-input__inner{
-        padding-left: 50px;
+    .zap-agreement__text{
+        color: #666666;
     }
-}
-.login-tip {
-    font-size: 13px;
-    text-align: center;
-}
-.el-form-item--medium .el-form-item__content{
-    display: flex;
-    align-items: center;
-}
-// 验证码
-.login-code {
-    height: 55px;
-    img {
+    .zap-agreement__link{
+        display: flex;
+        flex-direction: column;
+        align-items: flex-start;
+        color: #389cf4;
         cursor: pointer;
-        vertical-align: middle;
     }
-}
-.login-code-img {
-    flex: 1;
-    height: 55px;
-    margin-left: 8px;
-}
-// 大背景图
-.backdrop {
-    padding-top: 100px;
-    background-color: #ebf3ff;
-    width: 100%;
-    min-height: 100%;
-   text-align: center;
-}
-.rightulliimg{
-    width: 860px;
-
-}
-.divider_left{
-    margin-left: -40px;
-}.el-button.disabled-style {
-    background-color: #EEEEEE;
-    color: #CCCCCC;
-}
-
-// 内部供应链
-.zap-tabs{
-    width: 410px;
-    height: 550px;
-    padding: 10px 48px 46px;
-    box-sizing: border-box;
-    background-image: linear-gradient(
-		#ffffff, 
-		#ffffff), 
-	linear-gradient(
-		#f3f3f3, 
-		#f3f3f3);
-    .el-tabs__nav-wrap{
-        padding: 0 12px;
+    .zap-code-button{
+        padding: 0 16px;
+        line-height: 55px;
+        font-size: 18px;
+        color: #23b24b;
+        border: none;
+        background-color: transparent;
     }
-    .el-tabs__nav-wrap::after{
-        height: 0;
+    .el-button.is-disabled, .el-button.is-disabled:hover, .el-button.is-disabled:focus{
+        background-color: transparent;
     }
-    .el-tabs__nav{
-        width: 100%;
+    // 扫码登录
+    .zap-scanning{
+        width: 410px;
+        height: 550px;
+        background-image: linear-gradient(
+            #ffffff, 
+            #ffffff), 
+        linear-gradient(
+            #f3f3f3, 
+            #f3f3f3);
+        background-blend-mode: normal, 
+            normal;
+        box-sizing: border-box;
     }
-    .el-tabs__item{
-        height: 56px;
-        line-height: 56px;
+    .zap-scanning__title{
+        padding: 0 60px;
         font-size: 24px;
-        color: #333333;   
-        &:nth-of-type(3){
-            padding-left: 30px;
-        }
+        color: #333333;
     }
-    .el-tabs__item.is-active{
-        color: #0056eb;
+    .zap-scanning__img{
+        display: block;
+        width: 220px;
+        height: 220px;
+        margin: 40px auto 0;
+        object-fit: cover;
     }
-    .el-tabs__active-bar{
-        background-color: #0056eb;
+    .zap-scanning__bottom{
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-top: 18px;
+        font-size: 14px;
     }
-}
-.login-left{
-    width: 704px;
-    .login-name{
-        width: 100%;
+    .zap-scanning__icon{
+        width: 22px;
+        height: 22px;
+        margin-right: 10px;
     }
-    .login-illustration{
-        width: 515px;
+    .zap-scanning__text{
+        color: #333333;
+    }
+    .zap-scanning__color{
+        color: #23b24b;
     }
-}
-.zap-logo{
-    position: absolute;
-    top: 25px;
-    left: 45px;
-    width: 210px;
-    height: 60px;
-}
-.zap-2dcode{
-    display: flex;
-    justify-content: flex-end;
-    align-items: center;
-    padding-top: 10px;
-    padding-right: 10px;
-    font-size: 0;
-    background-color: #ffffff;
-}
-.zap-2dcode__text{
-    width: 113px;
-    height: 28px;
-}
-.zap-2dcode__img{
-    width: 60px;
-    height: 61px;
-    cursor: pointer;
-}
-.zap-button{
-    margin-top: 25px;
-    width: 100%;
-    height: 55px;
-    font-size: 18px;
-    border-radius: 0;
-    background-image: linear-gradient(
-		#0056eb, 
-		#0056eb), 
-	linear-gradient(
-		#e7f0ff, 
-		#e7f0ff);
-	background-blend-mode: normal, 
-		normal;
-}
-.zap-agreement{
-    display: flex;
-    align-items: top;
-    margin-top: 8px;
-    line-height: 18px;
-    font-size: 12px;
-}
-.zap-agreement__text{
-    color: #666666;
-}
-.zap-agreement__link{
-    display: flex;
-    flex-direction: column;
-    align-items: flex-start;
-    color: #389cf4;
-    cursor: pointer;
-}
-.zap-code-button{
-    padding: 0 16px;
-    line-height: 55px;
-    font-size: 18px;
-    color: #23b24b;
-    border: none;
-    background-color: transparent;
-}
-.el-button.is-disabled, .el-button.is-disabled:hover, .el-button.is-disabled:focus{
-    background-color: transparent;
-}
-// 扫码登录
-.zap-scanning{
-    width: 410px;
-    height: 550px;
-    background-image: linear-gradient(
-		#ffffff, 
-		#ffffff), 
-	linear-gradient(
-		#f3f3f3, 
-		#f3f3f3);
-	background-blend-mode: normal, 
-		normal;
-    box-sizing: border-box;
-}
-.zap-scanning__title{
-    padding: 0 60px;
-    font-size: 24px;
-    color: #333333;
-}
-.zap-scanning__img{
-    display: block;
-    width: 220px;
-    height: 220px;
-    margin: 40px auto 0;
-    object-fit: cover;
-}
-.zap-scanning__bottom{
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    margin-top: 18px;
-    font-size: 14px;
-}
-.zap-scanning__icon{
-    width: 22px;
-    height: 22px;
-    margin-right: 10px;
-}
-.zap-scanning__text{
-    color: #333333;
-}
-.zap-scanning__color{
-    color: #23b24b;
 }
 </style>