Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yang bo
authored and
yang bo
committed
Jun 2, 2017
1 parent
cce219c
commit c18b31d
Showing
8 changed files
with
125 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,5 +46,5 @@ export default { | |
</script> | ||
|
||
<style lang="scss"> | ||
@import "./style" | ||
@import "./style" | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<template> | ||
<div class="album-list-container"> | ||
专辑列表页 | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'album-list' | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<template> | ||
|
||
<div class="album-container"> | ||
<div class="album-header"> | ||
<div class="title">新歌速递</div> | ||
<router-link to="/album" class="link"> | ||
<span class="arrow"></span> | ||
</router-link> | ||
</div> | ||
<div class="album-body"> | ||
<div class="album-item-box" v-for="item in albumList"> | ||
<router-link to="/"> | ||
<div class="album-cover" :style="item.album_cover_style"></div> | ||
<div class="info-mask"> | ||
<div class="album-name">{{ item.album_name }}</div> | ||
<div class="singer">{{ item.singer_name }}</div> | ||
</div> | ||
</router-link> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</template> | ||
|
||
<script> | ||
import * as request from 'utils/request' | ||
export default { | ||
name: 'album', | ||
data () { | ||
return { | ||
albumList: [] | ||
} | ||
}, | ||
mounted () { | ||
request.getAlbumList({ cmd: 'get_album_info', pagesize: 6 }).then(resp => { | ||
this.albumList = resp.albumlist.map(item => { | ||
item.album_cover_style = { | ||
backgroundImage: `url(https://y.gtimg.cn/music/photo_new/T002R300x300M000${item.album_mid}.jpg)` | ||
} | ||
return item | ||
}) | ||
}) | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
.album-container { | ||
margin-top: 20px; | ||
|
||
.album-header { | ||
height: 40px; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 0 10px; | ||
} | ||
.link { | ||
display: block; | ||
width: 20px; | ||
height: 20px; | ||
background-color: #ccc; | ||
} | ||
|
||
.album-body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
} | ||
|
||
.album-item-box { | ||
width: 33%; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.album-cover { | ||
height: 100px; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
} | ||
.info-mask { | ||
padding-left: 10px; | ||
font-size: 12px; | ||
margin-top: 5px; | ||
} | ||
|
||
.album-name { | ||
font-size: 14px; | ||
color: #000; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters