Commit 9570b05422c49d6bc134b9c78b256375cd188306

Authored by yiren
1 parent b7a1b0a5

提前点餐页面

@@ -100,7 +100,8 @@ @@ -100,7 +100,8 @@
100 "pages/cart", 100 "pages/cart",
101 "pages/success", 101 "pages/success",
102 "pages/remark", 102 "pages/remark",
103 - "pages/index_new" 103 + "pages/index_new",
  104 + "pages/cart_new"
104 ] 105 ]
105 }, 106 },
106 { 107 {
  1 +// pack-cookbook/pages/cart_new.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + options:{},
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad(options) {
  15 + console.log(options);
  16 + this.setData({
  17 + options: options,
  18 + })
  19 + },
  20 +
  21 + /**
  22 + * 生命周期函数--监听页面初次渲染完成
  23 + */
  24 + onReady() {
  25 +
  26 + },
  27 +
  28 + /**
  29 + * 生命周期函数--监听页面显示
  30 + */
  31 + onShow() {
  32 +
  33 + },
  34 +
  35 + /**
  36 + * 生命周期函数--监听页面隐藏
  37 + */
  38 + onHide() {
  39 +
  40 + },
  41 +
  42 + /**
  43 + * 生命周期函数--监听页面卸载
  44 + */
  45 + onUnload() {
  46 +
  47 + },
  48 +
  49 + /**
  50 + * 页面相关事件处理函数--监听用户下拉动作
  51 + */
  52 + onPullDownRefresh() {
  53 +
  54 + },
  55 +
  56 + /**
  57 + * 页面上拉触底事件的处理函数
  58 + */
  59 + onReachBottom() {
  60 +
  61 + },
  62 +
  63 + /**
  64 + * 用户点击右上角分享
  65 + */
  66 + onShareAppMessage() {
  67 +
  68 + }
  69 +})
  1 +{
  2 + "backgroundTextStyle":"light",
  3 + "navigationBarBackgroundColor": "#fff",
  4 + "navigationBarTextStyle":"white",
  5 + "usingComponents": {
  6 + "nav":"/components/nav/nav"
  7 + }
  8 + }
  1 +<!--pack-cookbook/pages/cart_new.wxml-->
  2 +<nav backgroundColor="#4d4e50" color="#fff">{{options.sellerName||'提交订单'}}</nav>
  1 +/* pack-cookbook/pages/cart_new.wxss */
@@ -8,64 +8,27 @@ Page({ @@ -8,64 +8,27 @@ Page({
8 * 页面的初始数据 8 * 页面的初始数据
9 */ 9 */
10 data: { 10 data: {
11 - type:'C',//样式A,B,C 11 + type:'A',//样式A,B,C
12 scrollTop: 0, 12 scrollTop: 0,
13 - check1:0,//做法  
14 - check2:0,//规格 13 + options:{},
  14 + check1:'',//做法
  15 + check2:'',//规格
15 isloading: true, 16 isloading: true,
16 toView: "", 17 toView: "",
  18 + countPirce:'',
  19 + countTotal:'',
17 hasEnter: false, 20 hasEnter: false,
18 totalWidth: getApp().system.windowWidth, 21 totalWidth: getApp().system.windowWidth,
19 singleWidth: parseInt((getApp().system.windowWidth * 0.92 - 16) / 2), 22 singleWidth: parseInt((getApp().system.windowWidth * 0.92 - 16) / 2),
20 totalHeight: getApp().system.windowHeight, 23 totalHeight: getApp().system.windowHeight,
21 kindHeight: getApp().system.windowHeight - 68, 24 kindHeight: getApp().system.windowHeight - 68,
22 hasListModel: true, 25 hasListModel: true,
23 - cookbooklist: [{}, {}, {}, {}, {}, {}, {},], 26 + cookbooklist: [],
24 showSkeleton: true, 27 showSkeleton: true,
25 order: {}, 28 order: {},
26 orderItemCount:0, 29 orderItemCount:0,
27 checkObj:'', 30 checkObj:'',
28 quantum:'', 31 quantum:'',
29 - arr1:[  
30 - {  
31 - name:'香辣',  
32 - },  
33 - {  
34 - name:'清蒸',  
35 - },  
36 - {  
37 - name:'爆炒',  
38 - },  
39 - {  
40 - name:'清汤',  
41 - },  
42 - {  
43 - name:'爆炒',  
44 - },  
45 - {  
46 - name:'清汤',  
47 - },  
48 - ],  
49 - arr2:[  
50 - {  
51 - name:'小份',  
52 - },  
53 - {  
54 - name:'中份',  
55 - },  
56 - {  
57 - name:'份',  
58 - },  
59 - {  
60 - name:'位',  
61 - },  
62 - {  
63 - name:'例',  
64 - },  
65 - {  
66 - name:'两只',  
67 - },  
68 - ],  
69 normsList:[ 32 normsList:[
70 { 33 {
71 text:'做饭', 34 text:'做饭',
@@ -74,29 +37,6 @@ Page({ @@ -74,29 +37,6 @@ Page({
74 text:'规格', 37 text:'规格',
75 } 38 }
76 ], 39 ],
77 - twoList:[  
78 - {  
79 - title:'烤鸽子',  
80 - info:'¥48/位 ',  
81 - vip:'会员 ¥38/位',  
82 - image:'https://img.zcool.cn/community/0143e15b0239e4a801218cf4503272.jpg@3000w_1l_0o_100sh.jpg',  
83 - quantum:0,  
84 - },  
85 - {  
86 - title:'烤鸽子',  
87 - info:'¥48/位 ',  
88 - vip:'会员 ¥38/位',  
89 - image:'https://img.zcool.cn/community/0143e15b0239e4a801218cf4503272.jpg@3000w_1l_0o_100sh.jpg',  
90 - quantum:0,  
91 - },  
92 - {  
93 - title:'烤鸽子',  
94 - info:'¥48/位 ',  
95 - vip:'会员 ¥38/位',  
96 - image:'https://img.zcool.cn/community/0143e15b0239e4a801218cf4503272.jpg@3000w_1l_0o_100sh.jpg',  
97 - quantum:0,  
98 - }  
99 - ],  
100 assortArr:[ 40 assortArr:[
101 {name:'淮扬热菜'}, 41 {name:'淮扬热菜'},
102 {name:'精品凉菜'}, 42 {name:'精品凉菜'},
@@ -106,34 +46,6 @@ Page({ @@ -106,34 +46,6 @@ Page({
106 {name:'四季时蔬'}, 46 {name:'四季时蔬'},
107 {name:'酒水'}, 47 {name:'酒水'},
108 ], 48 ],
109 - dishList:[  
110 - {  
111 - image:'https://img.zcool.cn/community/0143e15b0239e4a801218cf4503272.jpg@3000w_1l_0o_100sh.jpg',  
112 - title:'默认菜品样式A',  
113 - info:'¥168/份 会员 ¥160/份',  
114 - normsInfo:'味型:咸鲜 烹调:熬煮',  
115 - dw:'1个 (如果没有会员价,则不显示会员价)',  
116 - zs:'有图大',  
117 - quantum:1,  
118 - js:'有(菜品录入了就有,没录入就没有)',  
119 - xz:'否,只显示加号',  
120 - ggInfo:'江南传统名菜,口味咸鲜,汤白汁浓,肉质酥肥,笋清香脆嫩,鲜味浓厚。',  
121 - gg:'菜品名称(味型/烹调)和价格在顶部分开(默认),菜品味型/烹调 录入了才有,没录入没有。'  
122 - },  
123 - {  
124 - image:'https://img.zcool.cn/community/0143e15b0239e4a801218cf4503272.jpg@3000w_1l_0o_100sh.jpg',  
125 - title:'默认菜品样式A',  
126 - info:'¥168/份 会员 ¥160/份',  
127 - normsInfo:'味型:咸鲜 烹调:熬煮',  
128 - dw:'1个 (如果没有会员价,则不显示会员价)',  
129 - zs:'有图大',  
130 - quantum:0,  
131 - js:'有(菜品录入了就有,没录入就没有)',  
132 - xz:'否,只显示加号',  
133 - ggInfo:'江南传统名菜,口味咸鲜,汤白汁浓,肉质酥肥,笋清香脆嫩,鲜味浓厚。',  
134 - gg:'菜品名称(味型/烹调)和价格在顶部分开(默认),菜品味型/烹调 录入了才有,没录入没有。'  
135 - },  
136 - ]  
137 }, 49 },
138 checkModal:'', 50 checkModal:'',
139 classifyModal:'', 51 classifyModal:'',
@@ -141,22 +53,23 @@ Page({ @@ -141,22 +53,23 @@ Page({
141 * 生命周期函数--监听页面加载 53 * 生命周期函数--监听页面加载
142 */ 54 */
143 onLoad: function (options) { 55 onLoad: function (options) {
144 - this.setData({  
145 - options: options,  
146 - })  
147 - this.getCookList();  
148 - this.initOrder();  
149 - mta.Page.init({  
150 - "appID": "500667280",  
151 - "eventID": "500667287",  
152 - "statPullDownFresh": true,  
153 - "statShareApp": true,  
154 - "statReachBottom": true,  
155 - "lauchOpts": options, //渠道分析  
156 - });  
157 - this.checkModal = this.selectComponent("#checkModal");  
158 - this.classifyModal = this.selectComponent("#classifyModal");  
159 - }, 56 + console.log('options',options);
  57 + this.setData({
  58 + options: options,
  59 + })
  60 + this.getCookList();
  61 + this.initOrder();
  62 + mta.Page.init({
  63 + "appID": "500667280",
  64 + "eventID": "500667287",
  65 + "statPullDownFresh": true,
  66 + "statShareApp": true,
  67 + "statReachBottom": true,
  68 + "lauchOpts": options, //渠道分析
  69 + });
  70 + this.checkModal = this.selectComponent("#checkModal");
  71 + this.classifyModal = this.selectComponent("#classifyModal");
  72 + },
160 73
161 /** 74 /**
162 * 生命周期函数--监听页面初次渲染完成 75 * 生命周期函数--监听页面初次渲染完成
@@ -166,14 +79,31 @@ Page({ @@ -166,14 +79,31 @@ Page({
166 }, 79 },
167 // 选择做法 80 // 选择做法
168 checkSingle1(e){ 81 checkSingle1(e){
169 - const check1= e.currentTarget.dataset['index']; 82 + const check1= e.currentTarget.dataset['item'];
  83 + console.log('check1',check1);
170 this.setData({ 84 this.setData({
171 check1 85 check1
172 }) 86 })
173 }, 87 },
  88 + // 已选菜单页面跳转
  89 + gotoShoppingCart(){
  90 + let arr=[]
  91 + this.data.cookbooklist.forEach(item=>{
  92 + if(item.quantum!='0'){
  93 + arr.push(item)
  94 + }
  95 + })
  96 + console.log(arr);
  97 + // wx.navigateTo({
  98 + // url: util.http_build_query({
  99 + // sellerName:this.data.options.sellerName,
  100 + // arr:[]
  101 + // }, '/pack-cookbook/pages/cart_new')
  102 + // })
  103 + },
174 // 选择规格 104 // 选择规格
175 checkSingle2(e){ 105 checkSingle2(e){
176 - const check2= e.currentTarget.dataset['index']; 106 + const check2= e.currentTarget.dataset['item'];
177 this.setData({ 107 this.setData({
178 check2 108 check2
179 }) 109 })
@@ -201,22 +131,35 @@ Page({ @@ -201,22 +131,35 @@ Page({
201 }, 131 },
202 // 选择做法和规格后点击确定 132 // 选择做法和规格后点击确定
203 determineFun(){ 133 determineFun(){
204 - let checkObj =this.data.checkObj; 134 + let index =this.data.checkObj.index;
  135 + let indexs =this.data.checkObj.indexs;
205 let quantum =this.data.quantum; 136 let quantum =this.data.quantum;
  137 + let check1 = this.data.check1;
  138 + console.log(this.data.cookbooklist[indexs].cookbooklist[0][index].arr1[check1]);
  139 + let checkObj=`cookbooklist[${indexs}].cookbooklist[0][${index}].quantum`;
  140 + let arr1=`cookbooklist[${indexs}].cookbooklist[0][${index}].arr1[${check1}]`;
  141 + let practice=`cookbooklist[${indexs}].cookbooklist[0][${index}].practice`;
206 this.setData({ 142 this.setData({
207 [checkObj]:quantum, 143 [checkObj]:quantum,
  144 + [practice]:check1
208 }) 145 })
  146 + console.log(this.data.check1);
  147 + console.log(this.data.cookbooklist[indexs].cookbooklist[0][index]);
209 this.closeModal() 148 this.closeModal()
210 }, 149 },
211 // 点击加号 150 // 点击加号
212 addition(e){ 151 addition(e){
213 const item= e.currentTarget.dataset['item']; 152 const item= e.currentTarget.dataset['item'];
214 - const index= e.currentTarget.dataset['key'];  
215 - const type= e.currentTarget.dataset['type']; 153 + const index= e.currentTarget.dataset['key'];//菜下标
  154 + const indexs= e.currentTarget.dataset['indexs'];//分类下标
216 let quantum = item.quantum * 1 + 1; 155 let quantum = item.quantum * 1 + 1;
217 - let checkObj;  
218 - if(type=='one') checkObj=`dishList[${index}].quantum`;  
219 - if(type=='two') checkObj=`twoList[${index}].quantum`; 156 + console.log('index',index);
  157 + console.log('indexs',indexs);
  158 + console.log('indexs',indexs);
  159 + let checkObj={
  160 + indexs,
  161 + index
  162 + };
220 console.log(checkObj,quantum); 163 console.log(checkObj,quantum);
221 this.showModal() 164 this.showModal()
222 this.setData({ 165 this.setData({
@@ -227,12 +170,10 @@ Page({ @@ -227,12 +170,10 @@ Page({
227 // 点击减号 170 // 点击减号
228 subtraction(e){ 171 subtraction(e){
229 const item= e.currentTarget.dataset['item']; 172 const item= e.currentTarget.dataset['item'];
230 - const index= e.currentTarget.dataset['key'];  
231 - const type= e.currentTarget.dataset['type']; 173 + const index= e.currentTarget.dataset['key'];//菜下标
  174 + const indexs= e.currentTarget.dataset['indexs'];//分类下标
232 let quantum = item.quantum * 1 - 1; 175 let quantum = item.quantum * 1 - 1;
233 - let checkObj;  
234 - if(type=='one') checkObj=`dishList[${index}].quantum`;  
235 - if(type=='two') checkObj=`twoList[${index}].quantum`; 176 + let checkObj=`cookbooklist[${indexs}].cookbooklist[${index}]`;
236 this.setData({ 177 this.setData({
237 checkObj, 178 checkObj,
238 quantum, 179 quantum,
@@ -275,6 +216,8 @@ Page({ @@ -275,6 +216,8 @@ Page({
275 //十道必选菜 216 //十道必选菜
276 let has10CaiOpen = false; 217 let has10CaiOpen = false;
277 let flist = []; 218 let flist = [];
  219 + let check1='';
  220 + let check2='';
278 if (list.length > 0) { 221 if (list.length > 0) {
279 has10CaiOpen = list[0].status == 1; 222 has10CaiOpen = list[0].status == 1;
280 list.forEach(function (cate, i) { 223 list.forEach(function (cate, i) {
@@ -311,6 +254,13 @@ Page({ @@ -311,6 +254,13 @@ Page({
311 } 254 }
312 } 255 }
313 cook.item_clear_num = item_clear_num; 256 cook.item_clear_num = item_clear_num;
  257 + cook.quantum=0;
  258 + cook.index=n;
  259 + cook.practice='';
  260 + cook.arr1=['香辣','清蒸','爆炒','清汤'];
  261 + cook.arr2=['小份','中份','份','例','两只'];
  262 + check1=cook.arr1[0];
  263 + check2=cook.arr2[0];
314 if (item_clear_num == 0) { 264 if (item_clear_num == 0) {
315 flag = false; 265 flag = false;
316 } 266 }
@@ -325,13 +275,19 @@ Page({ @@ -325,13 +275,19 @@ Page({
325 }) 275 })
326 if (cooks.length > 0) { 276 if (cooks.length > 0) {
327 //cooks 排序... 277 //cooks 排序...
328 - 278 +
329 cate.cookbooklist[0] = cooks; 279 cate.cookbooklist[0] = cooks;
330 flist.push(cate) 280 flist.push(cate)
331 } 281 }
332 } 282 }
333 }) 283 })
334 } 284 }
  285 + setTimeout(() => {
  286 + this.setData({
  287 + check1,
  288 + check2
  289 + })
  290 + }, 1);
335 return flist; 291 return flist;
336 }, 292 },
337 // 获取所有分类下所有菜品列表 293 // 获取所有分类下所有菜品列表
@@ -345,6 +301,7 @@ Page({ @@ -345,6 +301,7 @@ Page({
345 App.Advance.GetCookbookByClass(param).then(json => { 301 App.Advance.GetCookbookByClass(param).then(json => {
346 //菜单分类添加修饰 302 //菜单分类添加修饰
347 let cookbooklist = this.formatCookList(json.data[0].list); 303 let cookbooklist = this.formatCookList(json.data[0].list);
  304 + console.log({...cookbooklist[1].cookbooklist[0][0]});
348 setTimeout(() => { 305 setTimeout(() => {
349 this.setData({ 306 this.setData({
350 cookbooklist: cookbooklist, 307 cookbooklist: cookbooklist,
1 <!--pack-cookbook/pages/index_new.wxml--> 1 <!--pack-cookbook/pages/index_new.wxml-->
2 -<nav backgroundColor="#4d4e50" color="#fff">{{options.seeAll||order.seller.sellername||'提前点菜'}}</nav> 2 +<nav backgroundColor="#4d4e50" color="#fff">{{options.sellerName||'提前点菜'}}</nav>
3 <loading wx:if="{{isloading}}">数据加载中</loading> 3 <loading wx:if="{{isloading}}">数据加载中</loading>
4 -<view class="wrapIine"></view>  
5 -<view wx:if="{{type=='A'}}" class="heand flex-vc flex-cc">  
6 - <view class="style_round flex-vc flex-cc">  
7 - <view class="round"></view>  
8 - <view class="line"></view>  
9 - </view>  
10 - <view class="title">10道必点菜</view>  
11 - <view class="style_round flex-vc flex-cc">  
12 - <view class="line"></view>  
13 - <view class="round"></view>  
14 - </view>  
15 -</view>  
16 <view wx:if="{{type=='A'}}" class="wrapIine"></view> 4 <view wx:if="{{type=='A'}}" class="wrapIine"></view>
17 -<view class="dishWrap" wx:for="{{dishList}}" wx:key="index">  
18 - <block wx:if="{{type=='A'}}">  
19 - <view class="dishItem flex-lr">  
20 - <view class="dishLeft dishTexts">  
21 - {{item.title}}  
22 - </view>  
23 - <view class="dishTexts dishRight">  
24 - {{item.info}}  
25 - </view>  
26 - </view>  
27 - <view class="norms">  
28 - {{item.normsInfo}}  
29 - </view>  
30 - </block>  
31 - <block wx:if="{{type=='B'}}">  
32 - <view class="dishItem typeB">  
33 - <view class="dishLeft dishTexts">  
34 - {{item.title}}  
35 - </view>  
36 - <view class="dishTexts dishRight">  
37 - {{item.normsInfo}}  
38 - </view>  
39 - </view>  
40 - <view class="norms normsB">  
41 - {{item.info}}  
42 - </view>  
43 - </block>  
44 - <block wx:if="{{type=='C'}}">  
45 - <view class="dishItem">  
46 - <view class="dishLeft dishTexts">  
47 - {{item.title}}  
48 - </view>  
49 - <view class="dishTexts dishRight">  
50 - {{item.normsInfo}}  
51 - </view>  
52 - </view>  
53 - <view class="norms">  
54 - {{item.info}}  
55 - </view>  
56 - </block>  
57 - <image src="{{item.image}}" class="dishImg" mode="widthFix" />  
58 - <view class="greens">  
59 - <view class="news">  
60 - {{item.ggInfo}}  
61 - </view>  
62 - <view class="news">  
63 - <text class="Textcolor">样式说明:</text>{{item.gg}}  
64 - </view>  
65 - <view class="news">  
66 - <text class="Textcolor">售卖单位:</text>{{item.dw}}  
67 - </view>  
68 - <view class="news">  
69 - <text class="Textcolor">展示大小:</text>{{item.zs}}  
70 - </view>  
71 - <view class="news">  
72 - <text class="Textcolor">菜品介绍:</text>{{item.js}}  
73 - </view>  
74 - <view class="news">  
75 - <text class="Textcolor">是否选中:</text>{{item.xz}}  
76 - </view>  
77 - </view>  
78 - <view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr">  
79 - <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="one" />  
80 - </view>  
81 - <view wx:else class="algorithmImg flex-lr calculate">  
82 - <image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-type="one" />  
83 - <view class="box flex-cc">  
84 - <view class="num flex-cc">  
85 - {{item.quantum}}<view>份</view>  
86 - </view>  
87 - <view class="practice">  
88 - 清蒸 5 +<block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs">
  6 + <view class="dishWrap">
  7 + <block wx:if="{{type=='A'}}">
  8 + <view class="heand flex-vc flex-cc">
  9 + <view class="style_round flex-vc flex-cc">
  10 + <view class="round"></view>
  11 + <view class="line"></view>
  12 + </view>
  13 + <view class="title">{{item.class_name}}</view>
  14 + <view class="style_round flex-vc flex-cc">
  15 + <view class="line"></view>
  16 + <view class="round"></view>
  17 + </view>
89 </view> 18 </view>
90 - </view>  
91 - <image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="one" />  
92 - </view>  
93 - <view class="wrapIine"></view>  
94 -</view>  
95 -<view class="twoBox flex-rs">  
96 - <view class="twoItem" wx:for="{{twoList}}" wx:key="index">  
97 - <view class="twoTitle">  
98 - {{item.title}}  
99 - </view>  
100 - <view class="twoInfo">  
101 - {{item.info}}{{item.vip}}  
102 - </view>  
103 - {{item.quantum}}  
104 - <image src="{{item.image}}" mode="aspectFill" />  
105 - <view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr oneImg">  
106 - <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="two" />  
107 - </view>  
108 - <view wx:else class="algorithmImg flex-lr twoImgs">  
109 - <image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-type="two" />  
110 - <view class="box flex-cc">  
111 - <view class="num flex-cc"> 19 + </block>
  20 + <block wx:for="{{item.cookbooklist[0]}}" wx:key="{{item.id}}" wx:for-index="index">
  21 + <view class="dishWrap">
  22 + <view class="dishItem flex-lr">
  23 + <view class="dishLeft dishTexts">
  24 + {{item.name}}
  25 + </view>
  26 + <view class="dishTexts dishRight">
  27 + {{item.first_name}}
  28 + </view>
  29 + </view>
  30 + <view class="norms">
  31 + {{item.first_name}}
  32 + </view>
  33 + <block wx:if="{{type=='B'}}">
  34 + <view class="dishItem typeB">
  35 + <view class="dishLeft dishTexts">
  36 + {{item.title}}
  37 + </view>
  38 + <view class="dishTexts dishRight">
  39 + {{item.first_name}}
  40 + </view>
  41 + </view>
  42 + <view class="norms normsB">
  43 + {{item.first_name}}
  44 + </view>
  45 + </block>
  46 + <block wx:if="{{type=='C'}}">
  47 + <view class="dishItem">
  48 + <view class="dishLeft dishTexts">
  49 + {{item.title}}
  50 + </view>
  51 + <view class="dishTexts dishRight">
  52 + {{item.first_name}}
  53 + </view>
  54 + </view>
  55 + <view class="norms">
  56 + {{item.first_name}}
  57 + </view>
  58 + </block>
  59 + <image src="{{item.image}}" class="dishImg" mode="widthFix" />
  60 + <view class="greens">
  61 + <view class="news">
  62 + {{item.first_name}}
  63 + </view>
  64 + </view>
  65 + <view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr">
  66 + <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
  67 + </view>
  68 + <view wx:else class="algorithmImg flex-lr calculate">
  69 + <image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
  70 + <view class="box flex-cc">
  71 + <view class="num flex-cc">
  72 + {{item.quantum}}<view>份</view>
  73 + </view>
  74 + <view class="practice">
  75 + {{item.practice}}
  76 + </view>
  77 + </view>
  78 + <image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{indexs}}" data-indexs="{{indexs}}" />
  79 + </view>
  80 + <view class="wrapIine"></view>
  81 + <view class="twoBox flex-rs">
  82 + <!-- <view class="twoItem">
  83 + <view class="twoTitle">
  84 + {{item.title}}
  85 + </view>
  86 + <view class="twoInfo">
  87 + {{item.info}}{{item.vip}}
  88 + </view>
112 {{item.quantum}} 89 {{item.quantum}}
  90 + <image src="{{item.image}}" mode="aspectFill" />
  91 + <view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr oneImg">
  92 + <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}"/>
  93 + </view>
  94 + <view wx:else class="algorithmImg flex-lr twoImgs">
  95 + <image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}"/>
  96 + <view class="box flex-cc">
  97 + <view class="num flex-cc">
  98 + {{item.quantum}}
  99 + </view>
  100 + </view>
  101 + <image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}"/>
  102 + </view>
  103 + </view> -->
113 </view> 104 </view>
114 </view> 105 </view>
115 - <image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="two" />  
116 - </view> 106 + </block>
117 </view> 107 </view>
118 -</view>  
119 -<view class="fixedBox flex-lr">  
120 - <view class="left flex-cmc" bindtap="showClassifyModal">  
121 - <image src="https://qn.colorcun.com/WechatIMG700.png" mode="" />  
122 - <view class="fixedName">  
123 - 菜品分类 108 + <view class="fixedBox flex-lr">
  109 + <view class="left flex-cmc" bindtap="showClassifyModal">
  110 + <image src="https://qn.colorcun.com/WechatIMG700.png" mode="" />
  111 + <view class="fixedName">
  112 + 菜品分类
  113 + </view>
124 </view> 114 </view>
125 - </view>  
126 - <view class="right flex-cmc">  
127 - <image src="https://qn.colorcun.com/WechatIMG701.png" mode="" />  
128 - <view class="fixedName">  
129 - 已选菜品 115 + <view class="right flex-cmc" bindtap="gotoShoppingCart">
  116 + <image src="https://qn.colorcun.com/WechatIMG701.png" mode="" />
  117 + <view class="fixedName">
  118 + 已选菜品
  119 + </view>
130 </view> 120 </view>
131 </view> 121 </view>
132 -</view> 122 +</block>
133 <my-modal id="checkModal" height="410px" fadeStyle="center"> 123 <my-modal id="checkModal" height="410px" fadeStyle="center">
134 - <view slot="modalContent" class="normsModel">  
135 - <scroll-view scroll-y style="height: 78%;overflow: auto;">  
136 - <view class="textSty">  
137 - 做法  
138 - </view>  
139 - <view class="itemBox">  
140 - <view class="single {{check1==index?'active':''}}" bindtap="checkSingle1" wx:for="{{arr1}}" data-index="{{index}}">  
141 - {{item.name}}</view>  
142 - </view>  
143 - <view class="checkLine"></view>  
144 - <view class="textSty">  
145 - 规格  
146 - </view>  
147 - <view class="itemBox">  
148 - <view class="single {{check2==index?'active':''}}" bindtap="checkSingle2" wx:for="{{arr2}}" data-index="{{index}}">{{item.name}}</view> 124 + <block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs">
  125 + <block wx:for="{{item.cookbooklist[0]}}" wx:key="{{item.id}}" wx:for-index="index">
  126 + <view slot="modalContent" class="normsModel">
  127 + <scroll-view scroll-y style="height: 78%;overflow: auto;">
  128 + <view class="textSty">
  129 + 做法
  130 + </view>
  131 + <view class="itemBox">
  132 + <view class="single {{check1==item?'active':''}}" bindtap="checkSingle1" wx:for="{{item.arr1}}" data-item="{{item}}">
  133 + {{item}}</view>
  134 + </view>
  135 + <view class="checkLine"></view>
  136 + <view class="textSty">
  137 + 规格
  138 + </view>
  139 + <view class="itemBox">
  140 + <view class="single {{check2==item?'active':''}}" bindtap="checkSingle2" wx:for="{{item.arr2}}" data-item="{{item}}">{{item}}</view>
  141 + </view>
  142 + </scroll-view>
  143 + <view class="btns">
  144 + <button class="font32r cancellation btn" bindtap="closeModal">取消</button>
  145 + <button class="font32r determine btn" bindtap="determineFun">确定</button>
  146 + </view>
149 </view> 147 </view>
150 - </scroll-view>  
151 - <view class="btns">  
152 - <button class="font32r cancellation btn" bindtap="closeModal">取消</button>  
153 - <button class="font32r determine btn" bindtap="determineFun">确定</button>  
154 - </view>  
155 - </view> 148 + </block>
  149 + </block>
156 </my-modal> 150 </my-modal>
157 <my-modal id="classifyModal" fadeStyle="slideDown" height="100%"> 151 <my-modal id="classifyModal" fadeStyle="slideDown" height="100%">
158 <view slot="modalContent" class="assortModel"> 152 <view slot="modalContent" class="assortModel">
@@ -162,6 +156,6 @@ @@ -162,6 +156,6 @@
162 <view wx:for="{{assortArr}}" class="assortItem font48r" data-item="{{item}}" bindtap="checkItem"> 156 <view wx:for="{{assortArr}}" class="assortItem font48r" data-item="{{item}}" bindtap="checkItem">
163 {{item.name}} 157 {{item.name}}
164 </view> 158 </view>
165 - <image class="assortImg" bindtap="closeClassifyModal" src="https://qn.colorcun.com/WechatIMG807.png" mode=""/> 159 + <image class="assortImg" bindtap="closeClassifyModal" src="https://qn.colorcun.com/WechatIMG807.png" mode="" />
166 </view> 160 </view>
167 </my-modal> 161 </my-modal>
@@ -74,9 +74,6 @@ page { @@ -74,9 +74,6 @@ page {
74 font-size: 24rpx; 74 font-size: 24rpx;
75 } 75 }
76 76
77 -.Textcolor {  
78 - color: #EBDD3C;  
79 -}  
80 77
81 .algorithmImg { 78 .algorithmImg {
82 height: 60rpx; 79 height: 60rpx;
@@ -212,8 +212,9 @@ Page({ @@ -212,8 +212,9 @@ Page({
212 rid: this.id, 212 rid: this.id,
213 oid: res.data.id, 213 oid: res.data.id,
214 identity: 1, 214 identity: 1,
215 - sid: res.data.sellerid  
216 - }, '/pack-cookbook/pages/index') 215 + sid: res.data.sellerid,
  216 + sellerName:this.data.seller.name
  217 + }, '/pack-cookbook/pages/index_new')
217 }); 218 });
218 }) 219 })
219 } 220 }