Commit de098de0a11590749b1b82fe779d6e45fa86d66d
Merge branch 'master' of http://bj.gitlab.cnlive.com/w-front-end/select_good
Showing
4 changed files
with
21 additions
and
13 deletions
src/components/discountZone/discountZone.vue
| @@ -3,10 +3,10 @@ | @@ -3,10 +3,10 @@ | ||
| 3 | <titleBox v-if="discountZoneInfo" :titles="discountZoneInfo[0]"></titleBox> | 3 | <titleBox v-if="discountZoneInfo" :titles="discountZoneInfo[0]"></titleBox> |
| 4 | <div v-if="discountZoneInfo&&discountZoneInfo[0].img" class="item_box"> | 4 | <div v-if="discountZoneInfo&&discountZoneInfo[0].img" class="item_box"> |
| 5 | <div class="left"> | 5 | <div class="left"> |
| 6 | - <img v-lazy="discountZoneInfo[0].img[0].simg" /> | 6 | + <img v-lazy="discountZoneInfo[0].img[0].simg" @click="$parent.toDetail(discountZoneInfo[0].img[0])" alt="网家家" /> |
| 7 | </div> | 7 | </div> |
| 8 | <div class="right"> | 8 | <div class="right"> |
| 9 | - <img class="item" v-for="(item,index) in discountZoneInfo[0].img" :key="index" v-if="index>0" v-lazy="item.simg" /> | 9 | + <img class="item" v-for="(item,index) in discountZoneInfo[0].img" :key="index" @click="$parent.toDetail(item)" v-if="index>0" v-lazy="item.simg" alt="网家家"/> |
| 10 | </div> | 10 | </div> |
| 11 | </div> | 11 | </div> |
| 12 | </div> | 12 | </div> |
src/components/preferential/preferential.less
| 1 | .item_box{ | 1 | .item_box{ |
| 2 | margin: 20px; | 2 | margin: 20px; |
| 3 | display: flex; | 3 | display: flex; |
| 4 | - justify-content: space-between; | ||
| 5 | .left{ | 4 | .left{ |
| 5 | + width:350px; | ||
| 6 | img{ | 6 | img{ |
| 7 | display: block; | 7 | display: block; |
| 8 | width:350px; | 8 | width:350px; |
| 9 | height:160px; | 9 | height:160px; |
| 10 | } | 10 | } |
| 11 | + img:nth-child(2),img:nth-child(3){ | ||
| 12 | + margin-top: 10px; | ||
| 13 | + } | ||
| 11 | } | 14 | } |
| 12 | .right{ | 15 | .right{ |
| 13 | - flex: 1; | 16 | + width:350px; |
| 14 | display: flex; | 17 | display: flex; |
| 15 | justify-content: space-between; | 18 | justify-content: space-between; |
| 16 | flex-wrap: wrap; | 19 | flex-wrap: wrap; |
| 20 | + margin-left: 10px; | ||
| 21 | + img{ | ||
| 22 | + display: block; | ||
| 23 | + } | ||
| 17 | .first{ | 24 | .first{ |
| 18 | width:350px; | 25 | width:350px; |
| 19 | height: 330px; | 26 | height: 330px; |
| 27 | + margin-bottom: 10px; | ||
| 20 | } | 28 | } |
| 21 | .item{ | 29 | .item{ |
| 22 | width:350px; | 30 | width:350px; |
| 23 | - height:150px; | 31 | + height:160px; |
| 24 | } | 32 | } |
| 25 | } | 33 | } |
| 26 | } | 34 | } |
src/components/preferential/preferential.vue
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <titleBox :titles="titles"></titleBox> | ||
| 4 | - <div class="item_box"> | 3 | + <titleBox v-if="preferentialInfo" :titles="preferentialInfo[0]"></titleBox> |
| 4 | + <div v-if="preferentialInfo" class="item_box"> | ||
| 5 | <div class="left"> | 5 | <div class="left"> |
| 6 | - <img src="/static/img/pic_1.jpg" alt="网家家"/> | ||
| 7 | - <img src="/static/img/pic_1.jpg" alt="网家家"/> | ||
| 8 | - <img src="/static/img/pic_1.jpg" alt="网家家"/> | 6 | + <img class="item" v-for="(item,index) in preferentialInfo[0].img" :key="index"@click="$parent.toDetail(item)" v-if="index<3" v-lazy="item.simg" /> |
| 9 | </div> | 7 | </div> |
| 10 | <div class="right"> | 8 | <div class="right"> |
| 11 | - <img class="first" src="/static/img/pic_1.jpg" alt="网家家"/> | ||
| 12 | - <img class="item" src="/static/img/pic_1.jpg" alt="网家家"/> | 9 | + <img class="first" v-lazy="preferentialInfo[0].img[3].simg" @click="$parent.toDetail(preferentialInfo[0].img[3])" alt="网家家"/> |
| 10 | + <img class="item" v-lazy="preferentialInfo[0].img[4].simg" @click="$parent.toDetail(preferentialInfo[0].img[4])" alt="网家家"/> | ||
| 13 | </div> | 11 | </div> |
| 14 | </div> | 12 | </div> |
| 15 | </div> | 13 | </div> |
| @@ -24,6 +22,7 @@ | @@ -24,6 +22,7 @@ | ||
| 24 | titles:null | 22 | titles:null |
| 25 | } | 23 | } |
| 26 | }, | 24 | }, |
| 25 | + props:["preferentialInfo"], | ||
| 27 | components:{ | 26 | components:{ |
| 28 | titleBox | 27 | titleBox |
| 29 | }, | 28 | }, |
src/components/videoArea/videoArea.vue
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <titleBox :titles="titles"></titleBox> | 3 | + <titleBox v-if="videoAreaInfo" :titles="videoAreaInfo[0]"></titleBox> |
| 4 | <div class="item_box"> | 4 | <div class="item_box"> |
| 5 | <img src="/static/img/pic_1.jpg" alt="网家家"/> | 5 | <img src="/static/img/pic_1.jpg" alt="网家家"/> |
| 6 | <div class="title"> | 6 | <div class="title"> |
| @@ -31,6 +31,7 @@ | @@ -31,6 +31,7 @@ | ||
| 31 | titles:null | 31 | titles:null |
| 32 | } | 32 | } |
| 33 | }, | 33 | }, |
| 34 | + props:["videoAreaInfo"], | ||
| 34 | components:{ | 35 | components:{ |
| 35 | titleBox | 36 | titleBox |
| 36 | }, | 37 | }, |