Skip to content

Commit

Permalink
list to detail
Browse files Browse the repository at this point in the history
  • Loading branch information
newbg committed Jan 26, 2019
1 parent e5744b9 commit 77e1ba5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/card2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default {
},
// 跳转到详情页面
navToDetail (e) {
console.log('navToDetail e+=======================', e)
console.log('navToDetail e++++=======================', e.currentTarget.id)
wx.navigateTo({
url: '../../pages/detail/main?id=' + e.currentTarget.id
})
Expand Down
18 changes: 12 additions & 6 deletions src/pages/list/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
<!-- 列表信息 -->
<div class="line"></div>
<div class="list_box" v-for="(item, index) in database" :key="index" :summary=summary>
<div class="list_box" v-for="(item, index) in database" :key="index" :summary=summary @click="navToDetail" :id="item.UUID">
<div class='list_item'>
<div class='list_left'>
<img :src="item.AvatarUrl" alt="" class='list_img'>
Expand All @@ -44,6 +44,12 @@ export default {
console.log('database information:', db)
},
methods: {
navToDetail (e) {
console.log('navToDetail e+=======================', e)
wx.navigateTo({
url: '../../pages/detail/main?id=' + e.mp.currentTarget.id
})
}
}
}
</script>
Expand Down Expand Up @@ -148,7 +154,7 @@ export default {
}
.list_item {
width: 750rpx;
height: 40px;
height: 50px;
display: flex;
flex-direction: row;
/* border-top: 1px solid; */
Expand All @@ -165,10 +171,10 @@ export default {
}
.list_right {
height: 40px;
line-height: 40px;
font-size: 14px;
font-weight: 300;
height: 50px;
line-height: 50px;
font-size: 15px;
font-weight: 400;
color: rgba(29, 27, 27, 0.986);
overflow:hidden;
}
Expand Down

0 comments on commit 77e1ba5

Please sign in to comment.