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 | 3 | <titleBox v-if="discountZoneInfo" :titles="discountZoneInfo[0]"></titleBox> |
| 4 | 4 | <div v-if="discountZoneInfo&&discountZoneInfo[0].img" class="item_box"> |
| 5 | 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 | 7 | </div> |
| 8 | 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 | 10 | </div> |
| 11 | 11 | </div> |
| 12 | 12 | </div> | ... | ... |
src/components/preferential/preferential.less
| 1 | 1 | .item_box{ |
| 2 | 2 | margin: 20px; |
| 3 | 3 | display: flex; |
| 4 | - justify-content: space-between; | |
| 5 | 4 | .left{ |
| 5 | + width:350px; | |
| 6 | 6 | img{ |
| 7 | 7 | display: block; |
| 8 | 8 | width:350px; |
| 9 | 9 | height:160px; |
| 10 | 10 | } |
| 11 | + img:nth-child(2),img:nth-child(3){ | |
| 12 | + margin-top: 10px; | |
| 13 | + } | |
| 11 | 14 | } |
| 12 | 15 | .right{ |
| 13 | - flex: 1; | |
| 16 | + width:350px; | |
| 14 | 17 | display: flex; |
| 15 | 18 | justify-content: space-between; |
| 16 | 19 | flex-wrap: wrap; |
| 20 | + margin-left: 10px; | |
| 21 | + img{ | |
| 22 | + display: block; | |
| 23 | + } | |
| 17 | 24 | .first{ |
| 18 | 25 | width:350px; |
| 19 | 26 | height: 330px; |
| 27 | + margin-bottom: 10px; | |
| 20 | 28 | } |
| 21 | 29 | .item{ |
| 22 | 30 | width:350px; |
| 23 | - height:150px; | |
| 31 | + height:160px; | |
| 24 | 32 | } |
| 25 | 33 | } |
| 26 | 34 | } | ... | ... |
src/components/preferential/preferential.vue
| 1 | 1 | <template> |
| 2 | 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 | 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 | 7 | </div> |
| 10 | 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 | 11 | </div> |
| 14 | 12 | </div> |
| 15 | 13 | </div> |
| ... | ... | @@ -24,6 +22,7 @@ |
| 24 | 22 | titles:null |
| 25 | 23 | } |
| 26 | 24 | }, |
| 25 | + props:["preferentialInfo"], | |
| 27 | 26 | components:{ |
| 28 | 27 | titleBox |
| 29 | 28 | }, | ... | ... |
src/components/videoArea/videoArea.vue
| 1 | 1 | <template> |
| 2 | 2 | <div> |
| 3 | - <titleBox :titles="titles"></titleBox> | |
| 3 | + <titleBox v-if="videoAreaInfo" :titles="videoAreaInfo[0]"></titleBox> | |
| 4 | 4 | <div class="item_box"> |
| 5 | 5 | <img src="/static/img/pic_1.jpg" alt="网家家"/> |
| 6 | 6 | <div class="title"> |
| ... | ... | @@ -31,6 +31,7 @@ |
| 31 | 31 | titles:null |
| 32 | 32 | } |
| 33 | 33 | }, |
| 34 | + props:["videoAreaInfo"], | |
| 34 | 35 | components:{ |
| 35 | 36 | titleBox |
| 36 | 37 | }, | ... | ... |