index_new.wxml 5.8 KB
<!--pack-cookbook/pages/index_new.wxml-->
<nav backgroundColor="#4d4e50" color="#fff">{{options.sellerName||'提前点菜'}}</nav>
<loading wx:if="{{isloading}}">数据加载中</loading>
<view wx:if="{{type=='A'}}" class="wrapIine"></view>
<block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs">
	<view class="dishWrap">
		<block wx:if="{{type=='A'}}">
			<view class="heand flex-vc flex-cc">
				<view class="style_round flex-vc flex-cc">
					<view class="round"></view>
					<view class="line"></view>
				</view>
				<view class="title">{{item.class_name}}</view>
				<view class="style_round flex-vc flex-cc">
					<view class="line"></view>
					<view class="round"></view>
				</view>
			</view>
		</block>
		<block wx:for="{{item.cookbooklist[0]}}" wx:key="{{item.id}}" wx:for-index="index">
			<view class="dishWrap">
				<view class="dishItem flex-lr">
					<view class="dishLeft dishTexts">
						{{item.name}}
					</view>
					<view class="dishTexts dishRight">
						{{item.first_name}}
					</view>
				</view>
				<view class="norms">
					{{item.first_name}}
				</view>
				<block wx:if="{{type=='B'}}">
					<view class="dishItem typeB">
						<view class="dishLeft dishTexts">
							{{item.title}}
						</view>
						<view class="dishTexts dishRight">
							{{item.first_name}}
						</view>
					</view>
					<view class="norms normsB">
						{{item.first_name}}
					</view>
				</block>
				<block wx:if="{{type=='C'}}">
					<view class="dishItem">
						<view class="dishLeft dishTexts">
							{{item.title}}
						</view>
						<view class="dishTexts dishRight">
							{{item.first_name}}
						</view>
					</view>
					<view class="norms">
						{{item.first_name}}
					</view>
				</block>
				<image src="{{item.image}}" class="dishImg" mode="widthFix" />
				<view class="greens">
					<view class="news">
						{{item.first_name}}
					</view>
				</view>
				<view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr">
					<image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
				</view>
				<view wx:else class="algorithmImg flex-lr calculate">
					<image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
					<view class="box flex-cc">
						<view class="num flex-cc">
							{{item.quantum}}<view>份</view>
						</view>
						<view class="practice">
							{{item.practice}}
						</view>
					</view>
					<image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{indexs}}" data-indexs="{{indexs}}" />
				</view>
				<view class="wrapIine"></view>
				<view class="twoBox flex-rs">
					<!-- <view class="twoItem">
					<view class="twoTitle">
						{{item.title}}
					</view>
					<view class="twoInfo">
						{{item.info}}{{item.vip}}
					</view>
					{{item.quantum}}
					<image src="{{item.image}}" mode="aspectFill" />
					<view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr oneImg">
						<image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}"/>
					</view>
					<view wx:else class="algorithmImg flex-lr twoImgs">
						<image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}"/>
						<view class="box flex-cc">
							<view class="num flex-cc">
								{{item.quantum}}
							</view>
						</view>
						<image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}"/>
					</view>
				</view> -->
				</view>
			</view>
		</block>
	</view>
	<view class="fixedBox flex-lr">
		<view class="left flex-cmc" bindtap="showClassifyModal">
			<image src="https://qn.colorcun.com/WechatIMG700.png" mode="" />
			<view class="fixedName">
				菜品分类
			</view>
		</view>
		<view class="right flex-cmc" bindtap="gotoShoppingCart">
			<image src="https://qn.colorcun.com/WechatIMG701.png" mode="" />
			<view class="fixedName">
				已选菜品
			</view>
		</view>
	</view>
</block>
<my-modal id="checkModal" height="410px" fadeStyle="center">
	<block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs">
		<block wx:for="{{item.cookbooklist[0]}}" wx:key="{{item.id}}" wx:for-index="index">
			<view slot="modalContent" class="normsModel">
				<scroll-view scroll-y style="height: 78%;overflow: auto;">
					<view class="textSty">
						做法
					</view>
					<view class="itemBox">
						<view class="single {{check1==item?'active':''}}" bindtap="checkSingle1" wx:for="{{item.arr1}}" data-item="{{item}}">
							{{item}}</view>
					</view>
					<view class="checkLine"></view>
					<view class="textSty">
						规格
					</view>
					<view class="itemBox">
						<view class="single {{check2==item?'active':''}}" bindtap="checkSingle2" wx:for="{{item.arr2}}" data-item="{{item}}">{{item}}</view>
					</view>
				</scroll-view>
				<view class="btns">
					<button class="font32r cancellation btn" bindtap="closeModal">取消</button>
					<button class="font32r determine btn" bindtap="determineFun">确定</button>
				</view>
			</view>
		</block>
	</block>
</my-modal>
<my-modal id="classifyModal" fadeStyle="slideDown" height="100%">
	<view slot="modalContent" class="assortModel">
		<view class="assortItem items font48r">
			10道必点菜
		</view>
		<view wx:for="{{assortArr}}" class="assortItem font48r" data-item="{{item}}" bindtap="checkItem">
			{{item.name}}
		</view>
		<image class="assortImg" bindtap="closeClassifyModal" src="https://qn.colorcun.com/WechatIMG807.png" mode="" />
	</view>
</my-modal>