You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hunjianghu/江可飞/小程序开发/pages/fenlei/fenlei.wxml

29 lines
1.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!--pages/fenlei/fenlei.wxml-->
<!--主盒子-->
<!--左侧栏-->
<view class="nav_left">
<block wx:for="{{cateItems}}">
<!--当前项的id等于item项的id那个就是当前状态-->
<!--用data-index记录这个数据在数组的下标位置使用data-id设置每个item的id值供打开2级页面使用-->
<view class="nav_left_items {{curNav == item.cate_id ? 'active' : ''}}" bindtap="switchRightTab" data-index="{{index}}" data-id="{{item.cate_id}}">{{item.cate_name}}</view>
</block>
</view>
<!--右侧栏-->
<view class="nav_right">
<!--如果有数据,才遍历项-->
<view wx:if="{{book!=null}}">
<block wx:for="{{book}}" wx:for-item="books">
<view class="nav_right_items">
<!--界面跳转 -->
<navigator url="/pages/detail/detail?id={{books.BookID}}">
<image src="https://hunjianghu.xuanjis.com/web/BookImage/{{books.BookName}}.jpg"></image>
<text>{{books.BookName}}</text>
</navigator>
</view>
</block>
</view>
<!--如果无数据,则显示数据-->
<view class="nodata_text" wx:else>该分类暂无数据</view>
</view>