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.

73 lines
3.1 KiB

2 years ago
<!--pages/category/category.wxml-->
2 years ago
<!--index.wxml-->
<view class="body" wx:if="{{remind}}">
<view class='zong'>
<view class="spinner" >
<view class="spinner-container container1">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container2">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container3">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
</view>
</view>
</view>
<!-- 加载页面结束 -->
<block wx:else>
<import src="/wxSearch/wxSearch.wxml"/>
<form bindsubmit="wxSearchFn" report-submit="true" >
<view class="wxSearch-section">
<view class="wxSearch-pancel">
<input bindinput="wxSearchInput" confirmType="search" bindconfirm="search_confirmType" value="{{wxSearchData.value}}" bindtap="wxSerchFocus" class="wxSearch-input" placeholder="搜索" />
<button class="wxSearch-button" type="primary" formType="submit" size="mini" plain="true">搜索</button>
</view>
</view>
</form>
<template is="wxSearch" data="{{wxSearchData}}"/>
<view class="t_container">
<!--左侧栏-->
<view class="nav_left">
<scroll-view scroll-y="true" style="height:99%;">
<view wx:for="{{cateItems}}" wx:key="cateItems">
2 years ago
<!--当前项的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>
</view>
</scroll-view>
</view>
<!--右侧栏-->
<view class="nav_right">
<scroll-view scroll-y="true" style="height:100%">
<!--如果有数据,才遍历项-->
<image class='cimages' wx:if="{{cateItems[curIndex].cimgurl != ''}}" src="{{cateItems[curIndex].cimgurl}}"></image>
<view wx:if="{{cateItems[curIndex].ishaveChild}}">
<block wx:for="{{cateItems[curIndex].children}}" wx:key="children">
2 years ago
<view class="nav_right_items">
<!--界面跳转 -->
<navigator url="../listdetail/listdetail?class={{item.child_id}}&title={{item.name}}" >
<image src="{{item.picture}}"></image>
<text>{{item.name}}</text>
</navigator>
</view>
</block>
</view>
<!--如果无数据,则显示数据-->
<view class="nodata_text" wx:else>该分类暂无数据</view>
</scroll-view>
</view>
</view>
</block>
2 years ago