Commit e58ff77259518ae793c41b4c86ef78230f2d34b7
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 | 31 | }); |
| 32 | 32 | let menu = reactive({ |
| 33 | 33 | data: [], |
| 34 | + platform: [], | |
| 34 | 35 | }); |
| 35 | 36 | /** |
| 36 | 37 | * 登录框上面标题 |
| ... | ... | @@ -97,15 +98,15 @@ const handleCommand = (data: any) => { |
| 97 | 98 | // 鼠标移入移出菜单效果 |
| 98 | 99 | const handleMouseEnter = (ele) => { |
| 99 | 100 | if (ele.target.childNodes[1].classList) { |
| 101 | + ele.target.childNodes[1].style.display = "block"; | |
| 100 | 102 | ele.target.childNodes[1].classList.add("animated-fast"); |
| 101 | 103 | ele.target.childNodes[1].classList.add("fadeInUpMenu"); |
| 102 | - ele.target.childNodes[1].style.display = "block"; | |
| 103 | 104 | } |
| 104 | 105 | }; |
| 105 | 106 | const handleMouseLeave = (ele) => { |
| 106 | 107 | if (ele.target.childNodes[1].classList) { |
| 107 | - ele.target.childNodes[1].classList = ["dropdown"]; | |
| 108 | 108 | ele.target.childNodes[1].style.display = "none"; |
| 109 | + ele.target.childNodes[1].classList = ["dropdown"]; | |
| 109 | 110 | } |
| 110 | 111 | }; |
| 111 | 112 | onMounted(() => { |
| ... | ... | @@ -115,8 +116,8 @@ onMounted(() => { |
| 115 | 116 | }) |
| 116 | 117 | .then((data) => data.json()) |
| 117 | 118 | .then((res) => { |
| 118 | - console.log(res); | |
| 119 | 119 | menu.data = res?.menu; |
| 120 | + menu.platform = res?.menu[2]?.children; | |
| 120 | 121 | }); |
| 121 | 122 | }); |
| 122 | 123 | </script> |
| ... | ... | @@ -129,7 +130,7 @@ onMounted(() => { |
| 129 | 130 | <div id="gtco-logo"> |
| 130 | 131 | <a href="http://cnlive.com/"> |
| 131 | 132 | <img |
| 132 | - height="72" | |
| 133 | + height="88" | |
| 133 | 134 | src="https://cnlive-resweb.ks3-cn-beijing.ksyuncs.com/sites/cnlive_web/new-images/logo.png" |
| 134 | 135 | alt="" |
| 135 | 136 | /> |
| ... | ... | @@ -137,53 +138,35 @@ onMounted(() => { |
| 137 | 138 | </div> |
| 138 | 139 | |
| 139 | 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 | 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 | 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 | 170 | </ul> |
| 188 | 171 | </div> |
| 189 | 172 | </div> |
| ... | ... | @@ -283,36 +266,34 @@ onMounted(() => { |
| 283 | 266 | @import "https://ks3-cn-beijing.ksyuncs.com/cnlive-resweb/sites/cnlive_web/css/animate.css"; |
| 284 | 267 | .cnlive { |
| 285 | 268 | background-color: #f6f7f9; |
| 269 | + font-family: 微软雅黑, "Droid Sans", Arial, sans-serif; | |
| 286 | 270 | &-nav { |
| 287 | 271 | .gtco-nav { |
| 288 | 272 | top: 0; |
| 289 | 273 | margin: 0; |
| 290 | 274 | width: 100%; |
| 291 | - padding: 20px 0; | |
| 275 | + padding: 17px 0; | |
| 292 | 276 | z-index: 1001; |
| 293 | 277 | position: initial; |
| 294 | - height: 106px; | |
| 278 | + height: 156px; | |
| 295 | 279 | background-color: #feffff; |
| 296 | 280 | .wrap { |
| 297 | 281 | width: 1346px; |
| 298 | 282 | margin: 0 auto; |
| 299 | 283 | #gtco-logo { |
| 300 | - width: 200px; | |
| 284 | + width: 256px; | |
| 301 | 285 | display: flex; |
| 302 | 286 | flex-direction: row; |
| 303 | 287 | align-items: center; |
| 304 | 288 | float: left; |
| 305 | 289 | font-size: 20px; |
| 306 | - margin: 0; | |
| 290 | + margin: 23px 15px 0 0; | |
| 307 | 291 | padding: 0; |
| 308 | 292 | text-transform: uppercase; |
| 309 | 293 | } |
| 310 | 294 | .cnlive-list { |
| 311 | 295 | float: left; |
| 312 | 296 | letter-spacing: 1px; |
| 313 | - margin-top: 20px; | |
| 314 | - margin-left: 20px; | |
| 315 | - // font-weight: 800; | |
| 316 | 297 | .el-dropdown { |
| 317 | 298 | margin-left: 60px; |
| 318 | 299 | font-size: 20px; |
| ... | ... | @@ -323,13 +304,13 @@ onMounted(() => { |
| 323 | 304 | .cnlive-download { |
| 324 | 305 | width: 170px; |
| 325 | 306 | height: 46px; |
| 326 | - margin-top: 10px; | |
| 307 | + line-height: 46px; | |
| 308 | + margin-top: 65px; | |
| 327 | 309 | text-align: center; |
| 328 | 310 | font-size: 18px; |
| 329 | 311 | padding: 0; |
| 330 | 312 | letter-spacing: 1px; |
| 331 | - color: white!important; | |
| 332 | - line-height: 46px; | |
| 313 | + color: white !important; | |
| 333 | 314 | background-color: #f5a623; |
| 334 | 315 | border-radius: 24px; |
| 335 | 316 | float: right; |
| ... | ... | @@ -434,8 +415,6 @@ onMounted(() => { |
| 434 | 415 | <style lang="scss" scoped> |
| 435 | 416 | a { |
| 436 | 417 | text-decoration: none; |
| 437 | - // color: #000; | |
| 438 | - // *color: #3a3a3a; | |
| 439 | 418 | outline: none; |
| 440 | 419 | } |
| 441 | 420 | * { |
| ... | ... | @@ -462,6 +441,7 @@ body { |
| 462 | 441 | } |
| 463 | 442 | .gtco-nav .menu-1 { |
| 464 | 443 | float: left; |
| 444 | + margin-top: 25px; | |
| 465 | 445 | } |
| 466 | 446 | .gtco-nav ul li.has-dropdown .dropdown:before { |
| 467 | 447 | bottom: 100%; |
| ... | ... | @@ -476,40 +456,46 @@ body { |
| 476 | 456 | background-size: 20px 12px; |
| 477 | 457 | } |
| 478 | 458 | .gtco-nav ul { |
| 479 | - padding: 0; | |
| 480 | - margin: 0; | |
| 481 | 459 | list-style: none; |
| 482 | 460 | display: inline; |
| 483 | 461 | } |
| 484 | 462 | .gtco-nav .menu-1 ul li { |
| 485 | 463 | float: left; |
| 486 | - margin-left: 60px; | |
| 464 | + margin-left: 70px; | |
| 465 | + margin-top: 5px; | |
| 487 | 466 | position: relative; |
| 467 | + &:last-child { | |
| 468 | + margin-left: 80px; | |
| 469 | + } | |
| 488 | 470 | } |
| 489 | 471 | .gtco-nav .menu-1 ul li a { |
| 490 | 472 | color: #333333; |
| 491 | 473 | font-size: 20px; |
| 492 | - // font-weight: bold; | |
| 493 | 474 | } |
| 494 | 475 | .gtco-nav .menu-1 ul li.has-dropdown:hover a, |
| 495 | 476 | .gtco-nav .menu-1 ul li.has-dropdown:focus a { |
| 496 | 477 | color: #f5a623; |
| 497 | 478 | } |
| 498 | 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 | 491 | .gtco-nav .menu-1 ul li.has-dropdown .dropdown { |
| 504 | 492 | border: 1px solid #ccc; |
| 505 | 493 | width: 160px; |
| 506 | 494 | z-index: 1002; |
| 507 | - // visibility: hidden; | |
| 508 | - // opacity: 0; | |
| 509 | 495 | position: absolute; |
| 510 | 496 | display: none; |
| 511 | - top: 45px; | |
| 512 | - left: -26px; | |
| 497 | + top: 40px; | |
| 498 | + left: 4px; | |
| 513 | 499 | text-align: left; |
| 514 | 500 | -webkit-transition: 0s; |
| 515 | 501 | -o-transition: 0s; |
| ... | ... | @@ -525,8 +511,8 @@ body { |
| 525 | 511 | margin: 0; |
| 526 | 512 | width: 100%; |
| 527 | 513 | text-align: center; |
| 528 | - line-height: 53px; | |
| 529 | 514 | height: 53px; |
| 515 | + line-height: 53px; | |
| 530 | 516 | } |
| 531 | 517 | .gtco-nav .menu-1 ul li.has-dropdown .dropdown li a { |
| 532 | 518 | color: #333; |
| ... | ... | @@ -540,10 +526,6 @@ body { |
| 540 | 526 | background: #ecf5ff; |
| 541 | 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 | 530 | @keyframes fadeInUpMenu { |
| 549 | 531 | from { |
| ... | ... | @@ -563,4 +545,28 @@ body { |
| 563 | 545 | -webkit-animation-name: fadeInUpMenu; |
| 564 | 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 | 572 | </style> | ... | ... |