Commit 5ff69798a6564d8525e09eb9e92ecd3590208e34

Authored by wangfan
1 parent f88d6011

cookbook

@@ -2,56 +2,55 @@ @@ -2,56 +2,55 @@
2 <slot></slot> 2 <slot></slot>
3 </view> 3 </view>
4 <view hidden="{{hiddenFoodSpec}}" class="hiddenFoodSpec"> 4 <view hidden="{{hiddenFoodSpec}}" class="hiddenFoodSpec">
5 - <view class="toast-mask"></view>  
6 - <view class="toast-content">  
7 - <form bindsubmit="formSubmit">  
8 - <input value="{{cookbook_id}}" name="cookbookid" hidden="true"/>  
9 - <view class="toast-content-title">{{cookbook_name}}</view>  
10 - <block wx:if="{{kind.length>0}}">  
11 - <view class="toast-content-kind" style="margin-bottom:{{foodMenu.length==0 ? '80rpx' : '0rpx'}}">  
12 - <view class="toast-kind-title">规格</view>  
13 - <view class="toast-kind-menu">  
14 - <view class="toast-kind-single {{item.iskind==true?'kind-active':''}}" wx:for="{{kind}}" wx:key="kind-key" data-key="{{index}}" id="{{item.id}}" data-price="{{item.price}}" bindtap="kindSelect">{{item.title}}</view>  
15 - <input value="{{specs_id}}" name="specs_id" hidden="true"/>  
16 - <input value="{{selectPrice}}" name="price" hidden="true"/> 5 + <view class="toast-mask flex-vc" bindtap="close">
  6 + <view class="toast-content" catchtap="catchtap">
  7 + <form bindsubmit="formSubmit">
  8 + <input value="{{cookbook_id}}" name="cookbookid" hidden="true"/>
  9 + <view class="toast-content-title">{{cookbook_name}}</view>
  10 + <block wx:if="{{kind.length>0}}">
  11 + <view class="toast-content-kind" style="margin-bottom:{{foodMenu.length==0 ? '80rpx' : '0rpx'}}">
  12 + <view class="toast-kind-title">规格</view>
  13 + <view class="toast-kind-menu flex-ll">
  14 + <view class="toast-kind-single {{item.iskind==true?'kind-active':''}}" wx:for="{{kind}}" wx:key="kind-key" data-key="{{index}}" id="{{item.id}}" data-price="{{item.price}}" bindtap="kindSelect">{{item.title}}</view>
  15 + <input value="{{specs_id}}" name="specs_id" hidden="true"/>
  16 + <input value="{{selectPrice}}" name="price" hidden="true"/>
  17 + </view>
17 </view> 18 </view>
18 - </view>  
19 - </block>  
20 - <block wx:if="{{foodMenu.length>0}}">  
21 - <view class="toast-content-kind" style="margin-bottom:{{kind.length==0 ? '235rpx' : '40rpx'}};">  
22 - <view class="toast-kind-title">做法</view>  
23 - <view class="toast-kind-menu">  
24 - <view class="toast-kind-single {{item.iskind==true?'kind-active':''}}" wx:for="{{foodMenu}}" wx:key="foodmenu-key" data-key="{{index}}" id="{{item.id}}" data-price="{{item.price}}" bindtap='menuSelect'>{{item.title}}</view>  
25 - <input value="{{practice_id}}" name="practice_id" hidden="true"/> 19 + </block>
  20 + <block wx:if="{{foodMenu.length>0}}">
  21 + <view class="toast-content-kind" style="margin-bottom:{{kind.length==0 ? '235rpx' : '40rpx'}};">
  22 + <view class="toast-kind-title">做法</view>
  23 + <view class="toast-kind-menu">
  24 + <view class="toast-kind-single {{item.iskind==true?'kind-active':''}}" wx:for="{{foodMenu}}" wx:key="foodmenu-key" data-key="{{index}}" id="{{item.id}}" data-price="{{item.price}}" bindtap='menuSelect'>{{item.title}}</view>
  25 + <input value="{{practice_id}}" name="practice_id" hidden="true"/>
  26 + </view>
26 </view> 27 </view>
  28 + </block>
  29 + <view class="toast-content-end">
  30 + <view class="toast-content-money" hidden="{{showSpecsPrice}}">¥{{selectPrice}}</view>
  31 + <button class="toast-content-add" formType="submit" hidden="{{showAdd}}">确定</button>
27 </view> 32 </view>
28 - </block>  
29 - <block wx:else>  
30 - <view class="toast-content-kind" style="height:73px;">  
31 - </view>  
32 - </block>  
33 - <view class="toast-content-end">  
34 - <view class="toast-content-money" hidden="{{showSpecsPrice}}">¥{{selectPrice}}</view>  
35 - <button class="toast-content-add" formType="submit" hidden="{{showAdd}}">确定</button>  
36 - </view>  
37 - </form> 33 + </form>
  34 + </view>
38 <image class="toast-content-close" bindtap="close" src="http://qn.colorcun.com/custom/lite/image/close.png" background-size="cover"></image> 35 <image class="toast-content-close" bindtap="close" src="http://qn.colorcun.com/custom/lite/image/close.png" background-size="cover"></image>
39 </view> 36 </view>
40 </view> 37 </view>
41 <view hidden="{{hiddenFoodSpecReduce}}" class="hiddenFoodSpec"> 38 <view hidden="{{hiddenFoodSpecReduce}}" class="hiddenFoodSpec">
42 - <view class="reduce-mask"></view>  
43 - <view class="reduce-conent">  
44 - <view class="reduce-content-title">{{item.name}}</view>  
45 - <view class="reduce-content-list">  
46 - <view class='reduce-content-large' wx:for="{{selectKind}}" wx:key="selectKind-key" wx:for-item="kindItem">  
47 - <view class="reduce-list-title">{{kindItem.title?kindItem.title:''}}{{kindItem.title?':':''}}{{kindItem.ptitle?kindItem.ptitle:''}}</view>  
48 - <view class="reduce-list-info flex-rr">  
49 - <image class="reduce-list-reduce reduce-list-first" data-index="{{index}}" data-cookbookid="{{kindItem.cookbookid}}" data-practiceid="{{kindItem.practiceid}}" data-specid="{{kindItem.specid}}" data-price="{{kindItem.price}}" bindtap="reduce" src="http://qn.colorcun.com/custom/lite/image/subtractCook.png" style="padding-right:18rpx;"></image>  
50 - <view class="reduce-list-reduce">{{kindItem.foodNum}}</view>  
51 - <image class="reduce-list-reduce reduce-list-last" data-index="{{index}}" data-cookbookid="{{kindItem.cookbookid}}" data-practiceid="{{kindItem.practiceid}}" data-specid="{{kindItem.specid}}" data-price="{{kindItem.price}}" bindtap='add' src="http://qn.colorcun.com/custom/lite/image/add.png"></image> 39 + <view class="reduce-mask flex-vc" bindtap="close">
  40 + <view class="reduce-conent" catchtap="catchtap">
  41 + <view class="reduce-content-title">{{item.name}}</view>
  42 + <view class="reduce-content-list">
  43 + <view class='reduce-content-large' wx:for="{{selectKind}}" wx:key="selectKind-key" wx:for-item="kindItem">
  44 + <view class="reduce-list-title">{{kindItem.title?kindItem.title:''}}{{kindItem.title?':':''}}{{kindItem.ptitle?kindItem.ptitle:''}}</view>
  45 + <view class="reduce-list-info flex-rr">
  46 + <image class="reduce-list-reduce reduce-list-first" data-index="{{index}}" data-cookbookid="{{kindItem.cookbookid}}" data-practiceid="{{kindItem.practiceid}}" data-specid="{{kindItem.specid}}" data-price="{{kindItem.price}}" bindtap="reduce" src="http://qn.colorcun.com/custom/lite/image/subtractCook.png" style="padding-right:18rpx;"></image>
  47 + <view class="reduce-list-reduce">{{kindItem.foodNum}}</view>
  48 + <image class="reduce-list-reduce reduce-list-last" data-index="{{index}}" data-cookbookid="{{kindItem.cookbookid}}" data-practiceid="{{kindItem.practiceid}}" data-specid="{{kindItem.specid}}" data-price="{{kindItem.price}}" bindtap='add' src="http://qn.colorcun.com/custom/lite/image/add.png"></image>
  49 + </view>
52 </view> 50 </view>
53 </view> 51 </view>
54 </view> 52 </view>
55 <image src="http://qn.colorcun.com/custom/lite/image/close.png" class="reduce-close" bindtap="close"></image> 53 <image src="http://qn.colorcun.com/custom/lite/image/close.png" class="reduce-close" bindtap="close"></image>
56 </view> 54 </view>
  55 +
57 </view> 56 </view>
@@ -13,17 +13,9 @@ @@ -13,17 +13,9 @@
13 } 13 }
14 .toast-content{ 14 .toast-content{
15 width:542rpx; 15 width:542rpx;
16 - min-height: 300px;  
17 height:auto; 16 height:auto;
18 background: #fff; 17 background: #fff;
19 border-radius: 10rpx; 18 border-radius: 10rpx;
20 - position: fixed;  
21 - top: 35%;  
22 - left:0;  
23 - right:0;  
24 - margin:0 auto;  
25 - margin-top:-150px;  
26 - z-index: 9999;  
27 /* overflow: hidden; */ 19 /* overflow: hidden; */
28 } 20 }
29 .toast-content-title{ 21 .toast-content-title{
@@ -36,7 +28,7 @@ @@ -36,7 +28,7 @@
36 .toast-content-kind{ 28 .toast-content-kind{
37 width: 100%; 29 width: 100%;
38 height: auto; 30 height: auto;
39 - padding:0 19rpx; 31 + padding:0 42rpx;
40 box-sizing: border-box; 32 box-sizing: border-box;
41 padding-top: 20px; 33 padding-top: 20px;
42 } 34 }
@@ -44,8 +36,7 @@ @@ -44,8 +36,7 @@
44 width: 100%; 36 width: 100%;
45 color:#353535; 37 color:#353535;
46 font-size:16px; 38 font-size:16px;
47 - padding-left:19rpx;  
48 - box-sizing:border-box; 39 + margin-bottom: 24rpx;
49 } 40 }
50 .toast-kind-menu{ 41 .toast-kind-menu{
51 width: 100%; 42 width: 100%;
@@ -61,17 +52,14 @@ @@ -61,17 +52,14 @@
61 clear:both; 52 clear:both;
62 } 53 }
63 .toast-kind-single{ 54 .toast-kind-single{
64 - float:left;  
65 - width: 130rpx;  
66 - height: 25px;  
67 - border:1px solid #ccc;  
68 - box-sizing: border-box;  
69 - color:#353535;  
70 - font-size:14px;  
71 - line-height: 23px; 55 + width: 102rpx;
  56 + height: 42rpx;
  57 + border:1px solid #C8B16D;
  58 + color:#C8B16D;
  59 + font-size:28rpx;
  60 + line-height: 42rpx;
72 text-align: center; 61 text-align: center;
73 - margin:0 19rpx;  
74 - margin-top: 10px; 62 + margin-right: 38rpx;
75 } 63 }
76 .toast-kind-single:last-child{ 64 .toast-kind-single:last-child{
77 margin-right: 0; 65 margin-right: 0;
@@ -88,7 +76,7 @@ @@ -88,7 +76,7 @@
88 } 76 }
89 .toast-content-money{ 77 .toast-content-money{
90 float: left; 78 float: left;
91 - color: #e14553; 79 + color: #C8B16D;
92 font-size:17px; 80 font-size:17px;
93 line-height: 28px; 81 line-height: 28px;
94 } 82 }
@@ -96,7 +84,7 @@ @@ -96,7 +84,7 @@
96 float: right; 84 float: right;
97 width: 95px; 85 width: 95px;
98 height: 28px; 86 height: 28px;
99 - background: #e14553; 87 + background: #C8B16D;
100 border-radius:28px; 88 border-radius:28px;
101 color: #fff; 89 color: #fff;
102 font-size:13px; 90 font-size:13px;
@@ -104,18 +92,14 @@ @@ -104,18 +92,14 @@
104 text-align: center; 92 text-align: center;
105 } 93 }
106 .toast-kind-single.kind-active{ 94 .toast-kind-single.kind-active{
107 - border:1px solid #e14553;  
108 - color:#e14553; 95 + border-width:0;
  96 + color:#ffffff;
  97 + background: linear-gradient(to right, #ECDB99, #C8B16D);
109 } 98 }
110 .toast-content-close{ 99 .toast-content-close{
111 width: 60rpx; 100 width: 60rpx;
112 height: 60rpx; 101 height: 60rpx;
113 - position: absolute;  
114 - left: 0;  
115 - right: 0;  
116 - bottom:-140rpx;  
117 - margin:0 auto;  
118 - background: transparent; 102 + margin-top: 160rpx;
119 } 103 }
120 104
121 /*删除规格遮罩*/ 105 /*删除规格遮罩*/