<view class = 'allBooks' >
    <view class="book" wx:for="{{allBooks}}" wx:key="{{index}}" data-id="{{item.id}}" data-title="{{item.title}}" bindtap="goToBook">
        <image src="{{item.iconImg}}" />
        <text >{{item.title}}</text>
    </view>
</view>