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.
git/scr/food/pages/index/index.wxml

48 lines
1.7 KiB

2 years ago
<view class="imagesize">
<image src=" /images/logo.jpg" style="width:350px" class="in-select2" mode="widthFix">
</image>
</view>
<navigator class="imagesize">
2 years ago
<image src="/images/perfer.jpg" style="width:440px" class="in-select" mode="widthFix"></image>
</navigator>
<navigator class="imagesize">
<image src="/images/zhuanpang.jpg" style="width:440px" class="in-select" mode="widthFix" bindtap="toturning"></image>
</navigator>
<!-- 搜索 -->
<view class="sousuokuang">
<view class="sousuo">
<view class="shurukuang">
<input placeholder="搜索" value="{{inputValue}}" bindinput="GetSearchInput"></input>
</view>
<view class="sousuo_anniu" bindtap="ToSearch">
<text>搜索</text>
<icon type="search" size="20"></icon>
</view>
</view>
</view>
2 years ago
<!-- 导航栏 -->
2 years ago
<scroll-view class="navbar" scroll-x="true" scroll-left="{{tabs}}">
<view class="nav-item" wx:for="{{tabs}}" wx:key="id" >
<view class="nav-text {{item==tabCur?'tab-on':''}}" bindtap="tabSelect" data-tab="{{item}}">{{item}}</view>
2 years ago
</view>
</scroll-view>
<view class="foodlist">
2 years ago
<view class='a' wx:for="{{foodlist}}">
<!--wx:for是微信数据绑定的一种方式该数组有多少数据就显示多少个view-->
2 years ago
<!--item就相当于数组名+下标的结合体,适用于调用数组所有数据-->
2 years ago
<view catchtap="toDetail" data-foodid="{{item._id}}">
<view class='img'>
<image src="{{item.url}}" style="border-radius:20px;"></image>
</view>
<view class='info'>
<view class='title'>{{item.food_name}}</view>
<view class='price'>¥{{item.price}}</view>
<view class='num'>{{item.food_shop}}</view>
</view>
2 years ago
</view>
2 years ago
<view class='clear'></view>
2 years ago
</view>
</view>