123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <template>
- <div class="video-w">
- <div class="container">
- <ul class="setion">
- <li class="common-title" :class="{'is-active': activeTab === i}" v-for="(item,i) in langVideoCourse" @click="activeTab=i" :key="i">{{item.name}}</li>
- </ul>
- <h-row class="i-ul" :gutter="20">
- <h-col :span="langVideoCourse[activeTab].items.length > 2 ? 6 : 12" v-for="(sub,idx) in langVideoCourse[activeTab].items" :key="idx">
- <div class="i-li" :class="{small: langVideoCourse[activeTab].items.length > 2}" @click="itemHandle(sub)">
- <div class="img-w">
- <img class="li-img" :src="`${$cdn}course/img/${sub.code}.jpg?version=1`" alt="">
- <div class="hover-item">
- <img :src="`${$cdn}course/img/video-play.png`" alt="">
- <p>{{sub.name}}</p>
- </div>
- </div>
- <p class="li-p" >{{sub.name}}</p>
- </div>
- </h-col>
- </h-row>
- </div>
- </div>
- </template>
- <script>
- import { mapState } from 'vuex'
- export default {
- computed: {
- ...mapState({
- language: state => state.language.current,
- langVideoCourse: state => state.language.home.videoCourse.content
- })
- },
- data () {
- return {
- activeTab: 0
- }
- },
- methods: {
- itemHandle (item) {
- this.$bus.$emit('toggleVideo', {
- status: true,
- url: this.language === 'en' ? `en/${item.code}` : item.code
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .video-w {
- background: #F7F7F7;
- }
- .container{
- // width: 1200px;
- margin: 0 auto;
- padding: 0 0 124px;
- .setion{
- margin: 0 0 0;
- padding-top: 86px;
- display: flex;
- .common-title {
- margin: 0;
- padding-right: 34px;
- margin-right: 32px;
- position: relative;
- font-weight: 200;
- color: #909090;
- cursor: pointer;
- &.is-active {
- color: #202020;
- &::after {
- display: block;
- }
- }
- &::after {
- display: none;
- }
- &:last-child {
- &::before {
- display: none;
- }
- }
- &::before {
- content: '';
- display: block;
- height: 33px;
- width: 1px;
- background: #909090;
- position: absolute;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- }
- }
- }
- .i-ul{
- // display: flex;
- // justify-content: space-between;
- // align-items: center;
- // flex-wrap: wrap;
- width: 100%;
- margin-top: 64px;
- .i-li {
- position: relative;
- margin-bottom: 33px;
- background: #fff;
- .li-img{
- width: 100%;
- cursor: pointer;
- vertical-align: middle;
- }
- .bofang{
- width: 36px;
- height: 36px;
- position: absolute;
- right: 15px;
- bottom: 15px;
- cursor: pointer;
- }
- .li-p{
- font-size: 24px;
- color: #202020;
- line-height: 66px;
- padding: 0 15px;
- position: relative;
- }
- .img-w {
- position: relative;
- overflow: hidden;
- }
- &:hover {
- .hover-item {
- top: 0;
- }
-
- }
- .hover-item {
- background: rgba(0,0,0,0.5);
- position: absolute;
- top: -100%;
- left: 0;
- width: 100%;
- height: 100%;
- cursor: pointer;
- text-align: center;
- // padding-top: 125px;
- transition: top 0.2s linear;
- display: flex;
- flex-direction: column;
- justify-content: center;
- img {
- width: 70px;
- height: 70px;
- margin: 0 auto 9px;
- }
- p {
- font-size: 40px;
- color: #fff;
-
- }
- }
- &.small {
- .li-p{
- line-height: 50px;
- font-size: 16px;
- padding: 0 9px;
- }
- .bofang{
- width: 30px;
- height: 30px;
- position: absolute;
- right: 9px;
- bottom: 10px;
- cursor: pointer;
- }
- .hover-item {
- // padding-top: 50px;
- img {
- width: 50px;
- height: 50px;
- }
- p {
- font-size: 24px;
- }
- }
- }
- }
- }
- }
- </style>
|