Commit e58ff77259518ae793c41b4c86ef78230f2d34b7

Authored by 杨泽宇
1 parent 983a7b70

官网登录页改样式

Showing 1 changed file with 82 additions and 76 deletions
src/views/user/cnlive_login.vue
@@ -31,6 +31,7 @@ let errorMsg = reactive({ @@ -31,6 +31,7 @@ let errorMsg = reactive({
31 }); 31 });
32 let menu = reactive({ 32 let menu = reactive({
33 data: [], 33 data: [],
  34 + platform: [],
34 }); 35 });
35 /** 36 /**
36 * 登录框上面标题 37 * 登录框上面标题
@@ -97,15 +98,15 @@ const handleCommand = (data: any) => { @@ -97,15 +98,15 @@ const handleCommand = (data: any) => {
97 // 鼠标移入移出菜单效果 98 // 鼠标移入移出菜单效果
98 const handleMouseEnter = (ele) => { 99 const handleMouseEnter = (ele) => {
99 if (ele.target.childNodes[1].classList) { 100 if (ele.target.childNodes[1].classList) {
  101 + ele.target.childNodes[1].style.display = "block";
100 ele.target.childNodes[1].classList.add("animated-fast"); 102 ele.target.childNodes[1].classList.add("animated-fast");
101 ele.target.childNodes[1].classList.add("fadeInUpMenu"); 103 ele.target.childNodes[1].classList.add("fadeInUpMenu");
102 - ele.target.childNodes[1].style.display = "block";  
103 } 104 }
104 }; 105 };
105 const handleMouseLeave = (ele) => { 106 const handleMouseLeave = (ele) => {
106 if (ele.target.childNodes[1].classList) { 107 if (ele.target.childNodes[1].classList) {
107 - ele.target.childNodes[1].classList = ["dropdown"];  
108 ele.target.childNodes[1].style.display = "none"; 108 ele.target.childNodes[1].style.display = "none";
  109 + ele.target.childNodes[1].classList = ["dropdown"];
109 } 110 }
110 }; 111 };
111 onMounted(() => { 112 onMounted(() => {
@@ -115,8 +116,8 @@ onMounted(() => { @@ -115,8 +116,8 @@ onMounted(() => {
115 }) 116 })
116 .then((data) => data.json()) 117 .then((data) => data.json())
117 .then((res) => { 118 .then((res) => {
118 - console.log(res);  
119 menu.data = res?.menu; 119 menu.data = res?.menu;
  120 + menu.platform = res?.menu[2]?.children;
120 }); 121 });
121 }); 122 });
122 </script> 123 </script>
@@ -129,7 +130,7 @@ onMounted(() =&gt; { @@ -129,7 +130,7 @@ onMounted(() =&gt; {
129 <div id="gtco-logo"> 130 <div id="gtco-logo">
130 <a href="http://cnlive.com/"> 131 <a href="http://cnlive.com/">
131 <img 132 <img
132 - height="72" 133 + height="88"
133 src="https://cnlive-resweb.ks3-cn-beijing.ksyuncs.com/sites/cnlive_web/new-images/logo.png" 134 src="https://cnlive-resweb.ks3-cn-beijing.ksyuncs.com/sites/cnlive_web/new-images/logo.png"
134 alt="" 135 alt=""
135 /> 136 />
@@ -137,53 +138,35 @@ onMounted(() =&gt; { @@ -137,53 +138,35 @@ onMounted(() =&gt; {
137 </div> 138 </div>
138 139
139 <div class="cnlive-list"> 140 <div class="cnlive-list">
140 - <!-- <template v-for="(item, index) in menu.data" :key="index">  
141 - <el-dropdown  
142 - v-if="item.children.length"  
143 - @command="handleCommand"  
144 - @mouseenter="handleMouseEnter"  
145 - @mouseleave="handleMouseLeave"  
146 - :show-timeout="500"  
147 - :hide-timeout="500"  
148 - >  
149 - <span>  
150 - {{ item.title }}  
151 - <el-icon class="el-icon--right"> </el-icon>  
152 - </span>  
153 - <template #dropdown v-if="item.children.length">  
154 - <el-dropdown-menu v-if="item.children.length">  
155 - <el-dropdown-item  
156 - class="cnlive-dropdown-item"  
157 - v-for="(ele, i) in item.children"  
158 - :key="i"  
159 - :command="ele.url"  
160 - >{{ ele.title }}</el-dropdown-item  
161 - >  
162 - </el-dropdown-menu>  
163 - </template>  
164 - </el-dropdown>  
165 - <span class="cnlive-single-menu" v-else><a :href="item.url? item.url: '/'">{{item.title}}</a></span>  
166 - </template> -->  
167 <div class="text-left menu-1"> 141 <div class="text-left menu-1">
168 - <ul>  
169 - <li  
170 - class="has-dropdown"  
171 - @mouseenter="handleMouseEnter"  
172 - @mouseleave="handleMouseLeave"  
173 - v-for="(item, index) in menu.data" 142 + <div class="menu-one">
  143 + <a
  144 + :href="item.url ? item.url : '/'"
  145 + v-for="(item, index) in menu.platform"
174 :key="index" 146 :key="index"
  147 + >{{ item.title }}</a
175 > 148 >
176 - <div class="button fadeInUpMenu">  
177 - <a :href="item.url ? item.url : '/'"  
178 - ><span>{{ item.title }}</span></a  
179 - >  
180 - </div>  
181 - <ul class="dropdown" v-if="item.children.length">  
182 - <li v-for="(ele, i) in item.children" :key="i">  
183 - <a :href="ele.url ? ele.url : '/'">{{ ele.title }}</a>  
184 - </li>  
185 - </ul>  
186 - </li> 149 + </div>
  150 + <ul>
  151 + <template v-for="(item, index) in menu.data" :key="index">
  152 + <li
  153 + v-if="index !== 2"
  154 + :class="item.children.length ? 'has-dropdown' : ''"
  155 + @mouseenter="handleMouseEnter"
  156 + @mouseleave="handleMouseLeave"
  157 + >
  158 + <div class="button">
  159 + <a :href="item.url ? item.url : '/'">
  160 + <span>{{ item.title }}</span>
  161 + </a>
  162 + </div>
  163 + <ul class="dropdown" v-if="item.children.length">
  164 + <li v-for="(ele, i) in item.children" :key="i">
  165 + <a :href="ele.url ? ele.url : '/'">{{ ele.title }}</a>
  166 + </li>
  167 + </ul>
  168 + </li>
  169 + </template>
187 </ul> 170 </ul>
188 </div> 171 </div>
189 </div> 172 </div>
@@ -283,36 +266,34 @@ onMounted(() =&gt; { @@ -283,36 +266,34 @@ onMounted(() =&gt; {
283 @import "https://ks3-cn-beijing.ksyuncs.com/cnlive-resweb/sites/cnlive_web/css/animate.css"; 266 @import "https://ks3-cn-beijing.ksyuncs.com/cnlive-resweb/sites/cnlive_web/css/animate.css";
284 .cnlive { 267 .cnlive {
285 background-color: #f6f7f9; 268 background-color: #f6f7f9;
  269 + font-family: 微软雅黑, "Droid Sans", Arial, sans-serif;
286 &-nav { 270 &-nav {
287 .gtco-nav { 271 .gtco-nav {
288 top: 0; 272 top: 0;
289 margin: 0; 273 margin: 0;
290 width: 100%; 274 width: 100%;
291 - padding: 20px 0; 275 + padding: 17px 0;
292 z-index: 1001; 276 z-index: 1001;
293 position: initial; 277 position: initial;
294 - height: 106px; 278 + height: 156px;
295 background-color: #feffff; 279 background-color: #feffff;
296 .wrap { 280 .wrap {
297 width: 1346px; 281 width: 1346px;
298 margin: 0 auto; 282 margin: 0 auto;
299 #gtco-logo { 283 #gtco-logo {
300 - width: 200px; 284 + width: 256px;
301 display: flex; 285 display: flex;
302 flex-direction: row; 286 flex-direction: row;
303 align-items: center; 287 align-items: center;
304 float: left; 288 float: left;
305 font-size: 20px; 289 font-size: 20px;
306 - margin: 0; 290 + margin: 23px 15px 0 0;
307 padding: 0; 291 padding: 0;
308 text-transform: uppercase; 292 text-transform: uppercase;
309 } 293 }
310 .cnlive-list { 294 .cnlive-list {
311 float: left; 295 float: left;
312 letter-spacing: 1px; 296 letter-spacing: 1px;
313 - margin-top: 20px;  
314 - margin-left: 20px;  
315 - // font-weight: 800;  
316 .el-dropdown { 297 .el-dropdown {
317 margin-left: 60px; 298 margin-left: 60px;
318 font-size: 20px; 299 font-size: 20px;
@@ -323,13 +304,13 @@ onMounted(() =&gt; { @@ -323,13 +304,13 @@ onMounted(() =&gt; {
323 .cnlive-download { 304 .cnlive-download {
324 width: 170px; 305 width: 170px;
325 height: 46px; 306 height: 46px;
326 - margin-top: 10px; 307 + line-height: 46px;
  308 + margin-top: 65px;
327 text-align: center; 309 text-align: center;
328 font-size: 18px; 310 font-size: 18px;
329 padding: 0; 311 padding: 0;
330 letter-spacing: 1px; 312 letter-spacing: 1px;
331 - color: white!important;  
332 - line-height: 46px; 313 + color: white !important;
333 background-color: #f5a623; 314 background-color: #f5a623;
334 border-radius: 24px; 315 border-radius: 24px;
335 float: right; 316 float: right;
@@ -434,8 +415,6 @@ onMounted(() =&gt; { @@ -434,8 +415,6 @@ onMounted(() =&gt; {
434 <style lang="scss" scoped> 415 <style lang="scss" scoped>
435 a { 416 a {
436 text-decoration: none; 417 text-decoration: none;
437 - // color: #000;  
438 - // *color: #3a3a3a;  
439 outline: none; 418 outline: none;
440 } 419 }
441 * { 420 * {
@@ -462,6 +441,7 @@ body { @@ -462,6 +441,7 @@ body {
462 } 441 }
463 .gtco-nav .menu-1 { 442 .gtco-nav .menu-1 {
464 float: left; 443 float: left;
  444 + margin-top: 25px;
465 } 445 }
466 .gtco-nav ul li.has-dropdown .dropdown:before { 446 .gtco-nav ul li.has-dropdown .dropdown:before {
467 bottom: 100%; 447 bottom: 100%;
@@ -476,40 +456,46 @@ body { @@ -476,40 +456,46 @@ body {
476 background-size: 20px 12px; 456 background-size: 20px 12px;
477 } 457 }
478 .gtco-nav ul { 458 .gtco-nav ul {
479 - padding: 0;  
480 - margin: 0;  
481 list-style: none; 459 list-style: none;
482 display: inline; 460 display: inline;
483 } 461 }
484 .gtco-nav .menu-1 ul li { 462 .gtco-nav .menu-1 ul li {
485 float: left; 463 float: left;
486 - margin-left: 60px; 464 + margin-left: 70px;
  465 + margin-top: 5px;
487 position: relative; 466 position: relative;
  467 + &:last-child {
  468 + margin-left: 80px;
  469 + }
488 } 470 }
489 .gtco-nav .menu-1 ul li a { 471 .gtco-nav .menu-1 ul li a {
490 color: #333333; 472 color: #333333;
491 font-size: 20px; 473 font-size: 20px;
492 - // font-weight: bold;  
493 } 474 }
494 .gtco-nav .menu-1 ul li.has-dropdown:hover a, 475 .gtco-nav .menu-1 ul li.has-dropdown:hover a,
495 .gtco-nav .menu-1 ul li.has-dropdown:focus a { 476 .gtco-nav .menu-1 ul li.has-dropdown:focus a {
496 color: #f5a623; 477 color: #f5a623;
497 } 478 }
498 .gtco-nav .menu-1 ul li.has-dropdown .button a { 479 .gtco-nav .menu-1 ul li.has-dropdown .button a {
499 - padding-bottom: 55px;  
500 - padding-right: 20px;  
501 - // padding: 14px 10px; 480 + padding: 15px 18px;
  481 + background: url(https://cnlive-resweb.ks3-cn-beijing.ksyuncs.com/sites/cnlive_web/new-images/menu-icon.png)
  482 + center right no-repeat;
  483 + background-size: 10px 7px;
  484 +}
  485 +.gtco-nav .menu-1 ul li.has-dropdown:hover .button a {
  486 + color: #f5a623;
  487 + background: url(https://cnlive-resweb.ks3-cn-beijing.ksyuncs.com/sites/cnlive_web/new-images/menuhover-icon.png)
  488 + center right no-repeat;
  489 + background-size: 10px 7px;
502 } 490 }
503 .gtco-nav .menu-1 ul li.has-dropdown .dropdown { 491 .gtco-nav .menu-1 ul li.has-dropdown .dropdown {
504 border: 1px solid #ccc; 492 border: 1px solid #ccc;
505 width: 160px; 493 width: 160px;
506 z-index: 1002; 494 z-index: 1002;
507 - // visibility: hidden;  
508 - // opacity: 0;  
509 position: absolute; 495 position: absolute;
510 display: none; 496 display: none;
511 - top: 45px;  
512 - left: -26px; 497 + top: 40px;
  498 + left: 4px;
513 text-align: left; 499 text-align: left;
514 -webkit-transition: 0s; 500 -webkit-transition: 0s;
515 -o-transition: 0s; 501 -o-transition: 0s;
@@ -525,8 +511,8 @@ body { @@ -525,8 +511,8 @@ body {
525 margin: 0; 511 margin: 0;
526 width: 100%; 512 width: 100%;
527 text-align: center; 513 text-align: center;
528 - line-height: 53px;  
529 height: 53px; 514 height: 53px;
  515 + line-height: 53px;
530 } 516 }
531 .gtco-nav .menu-1 ul li.has-dropdown .dropdown li a { 517 .gtco-nav .menu-1 ul li.has-dropdown .dropdown li a {
532 color: #333; 518 color: #333;
@@ -540,10 +526,6 @@ body { @@ -540,10 +526,6 @@ body {
540 background: #ecf5ff; 526 background: #ecf5ff;
541 color: #66b1ff; 527 color: #66b1ff;
542 } 528 }
543 -.gtco-nav .menu-1 ul li.has-dropdown:nth-child(1) .dropdown,  
544 -.gtco-nav .menu-1 ul li.has-dropdown:nth-child(2) .dropdown {  
545 - left: -8px;  
546 -}  
547 /**注册**/ 529 /**注册**/
548 @keyframes fadeInUpMenu { 530 @keyframes fadeInUpMenu {
549 from { 531 from {
@@ -563,4 +545,28 @@ body { @@ -563,4 +545,28 @@ body {
563 -webkit-animation-name: fadeInUpMenu; 545 -webkit-animation-name: fadeInUpMenu;
564 animation-name: fadeInUpMenu; 546 animation-name: fadeInUpMenu;
565 } 547 }
  548 +.menu-one {
  549 + margin: 0 0 25px 90px;
  550 + text-align: left;
  551 + a {
  552 + font-size: 18px;
  553 + height: 24px;
  554 + line-height: 24px;
  555 + color: #999;
  556 + margin: 0;
  557 + margin-left: 6px;
  558 + padding: 0 40px;
  559 + letter-spacing: 1px;
  560 + border-right: 1px solid #d8d8d8;
  561 + display: inline-block;
  562 + &:first-child {
  563 + padding-left: 0;
  564 + margin-left: 0;
  565 + }
  566 + &:last-child {
  567 + border: none;
  568 + padding-right: 0;
  569 + }
  570 + }
  571 +}
566 </style> 572 </style>