### 注册跳转监听
> 创建详情页
![](https://box.kancloud.cn/6a0a39af1acaf1e71da1cc1195609d57_268x174.png)
> 注册跳转监听
`post.wxml `
~~~html
<block wx:for="{{posts_key}}" wx:for-item="item" wx:for-index="ids">
<view catchtap='onPostTap' data-postId="{{item.postId}}">
<template is="postItem" data="{{item}}"/>
</view>
</block>
~~~
`post.js`
~~~javascript
onPostTap:function(event){
var postId = event.currentTarget.dataset.postid;
console.log(postId);
wx.navigateTo({
url: 'post-detail/post-detail',
})
},
~~~