index_new.wxml
6.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!--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>
<scroll-view style="height:100vh;" class="content" scroll-into-view="{{toView}}" scroll-y="true" scroll-with-animation="true">
<block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs">
<view class="dishWrap" id="{{ 'inToView'+item.id}}">
<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 wx:if="{{item.type=='1'}}" 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 wx:if="{{item.image}}" src="{{item.image}}" class="dishImg" mode="aspectFill" />
<view class="greens">
<view class="news">{{item.first_name}}</view>
</view>
<view wx:for="{{item.norms}}" wx:for-index="normsIndex" class="algorithmImg flex-lr calculate">
<image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-norms="{{normsIndex}}" data-key="{{index}}" data-indexs="{{indexs}}" />
<view class="box flex-cc">
<view class="num flex-cc">
{{item.quantum}}<view>{{item.unit}}</view>
</view>
<view class="practice">{{item.practice}}</view>
</view>
<image id="add" src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" data-type="0" bindtap="addition" data-norms="{{normsIndex}}" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
</view>
<view class="algorithmImg flex-rr">
<image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-norms="{{normsIndex}}" data-type="1" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
</view>
<view class="wrapIine"></view>
</view>
<view wx:else class="twoBox flex-rs">
<view class="twoItem">
<view class="twoTitle">{{item.name}}</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}}" data-indexs="{{indexs}}" />
</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}}" data-indexs="{{indexs}}" />
<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}}" data-indexs="{{indexs}}" />
</view>
</view>
</view>
</block>
</view>
</block>
</scroll-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">
<view class="rightBox">
<image src="https://qn.colorcun.com/WechatIMG701.png" mode="" />
<view class="num" wx:if="{{normsLen}}">{{normsLen}}</view>
</view>
<view class="fixedName">
已选菜品
</view>
</view>
</view>
<my-modal id="checkModal" height="410px" fadeStyle="center">
<view slot="modalContent" class="normsModel">
<scroll-view scroll-y style="height: 78%;overflow: auto;">
<view class="textSty">做法</view>
<view class="itemBox">
<block wx:for="{{checkItem.arr1}}">
<view class="single {{check1==item?'active':''}}" data-item="{{item}}" bindtap="checkSingle1">
{{item}}</view>
</block>
</view>
<view class="checkLine"></view>
<view class="textSty">规格</view>
<view class="itemBox">
<view class="single {{check2==item?'active':''}}" bindtap="checkSingle2" wx:for="{{checkItem.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>
</my-modal>
<my-modal id="classifyModal" fadeStyle="slideDown" height="100%">
<view slot="modalContent" class="assortModel">
<scroll-view scroll-y="true" style="height: 70%;">
<view wx:for="{{assortArr}}" class="assortItem font48r {{toView==('inToView'+item.id)?'underline':''}}" data-item="{{item}}" bindtap="checkItem">
{{item.class_name}}
</view>
</scroll-view>
<image class="assortImg" bindtap="closeClassifyModal" src="https://qn.colorcun.com/WechatIMG807.png" mode="" />
</view>
</my-modal>