Commit e78c06e09b67947e75a5d28a2404c86cd44cc7b1

Authored by wangfan
1 parent 5ff69798

cookbook

  1 +// pack-cookbook/components/cart/cart.js
  2 +Component({
  3 + /**
  4 + * 组件的属性列表
  5 + */
  6 + properties: {
  7 +
  8 + },
  9 +
  10 + /**
  11 + * 组件的初始数据
  12 + */
  13 + data: {
  14 +
  15 + },
  16 +
  17 + /**
  18 + * 组件的方法列表
  19 + */
  20 + methods: {
  21 +
  22 + }
  23 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {
  4 + "foodSpec": "../food-spec/food-spec"
  5 + }
  6 +}
  1 +<!--pack-cookbook/components/cart/cart.wxml-->
  2 +<view class="mask flex-bc" style="bottom: 102rpx; align-items: flex-end;">
  3 + <view class="cart">
  4 + <view class="cart-title flex-rr">
  5 + <view class="icon">
  6 + <image src=""></image>
  7 + </view>
  8 + <view class="text">清空购物车</view>
  9 + </view>
  10 + <view class="cart-body">
  11 + <view class="cart-item flex-lr" wx:for="{{[1,2,3,4,5]}}" wx:key="item.key">
  12 + <foodSpec item="{{item}}" type="-" id="foodSpecDel"
  13 + sellerid="{{sellerid}}" orderid="{{orderid}}"
  14 + fromSoucre="{{fromSoucre}}" request_uri="{{request_uri}}"
  15 + bindfoodSpecCallback="foodSpecCallback">
  16 + <view class='jian'></view>
  17 + </foodSpec>
  18 + <view class="t-align-c">{{item.num||10}}</view>
  19 + <foodSpec item="{{item}}" type="+"
  20 + sellerid="{{sellerid}}" orderid="{{orderid}}"
  21 + fromSoucre="{{fromSoucre}}" request_uri="{{request_uri}}"
  22 + bindfoodSpecCallback="foodSpecCallback">
  23 + <view class='add'></view>
  24 + </foodSpec>
  25 + </view>
  26 + </view>
  27 + </view>
  28 +</view>
  1 +/* pack-cookbook/components/cart/cart.wxss */
  2 +@import "/app.wxss";
  3 +.cart{
  4 + background-color: #fefefe;
  5 +}
@@ -76,9 +76,10 @@ @@ -76,9 +76,10 @@
76 } 76 }
77 .toast-content-money{ 77 .toast-content-money{
78 float: left; 78 float: left;
79 - color: #C8B16D;  
80 - font-size:17px;  
81 - line-height: 28px; 79 + color: #353535;
  80 + font-size:36rpx;
  81 + line-height: 50rpx;
  82 + font-weight: bold;
82 } 83 }
83 .toast-content-add{ 84 .toast-content-add{
84 float: right; 85 float: right;
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 "usingComponents": { 5 "usingComponents": {
6 "foodCard": "../components/food-card/food-card", 6 "foodCard": "../components/food-card/food-card",
7 "cookClass": "../components/cook-class/cook-class", 7 "cookClass": "../components/cook-class/cook-class",
8 - "nav":"/components/nav/nav" 8 + "nav":"/components/nav/nav",
  9 + "cart":"../components/cart/cart"
9 } 10 }
10 } 11 }
@@ -67,3 +67,4 @@ @@ -67,3 +67,4 @@
67 <cookClass id="menu" bind:changeList="changeList" 67 <cookClass id="menu" bind:changeList="changeList"
68 cooklist="{{cookbooklist}}" hasListModel="{{hasListModel}}"> 68 cooklist="{{cookbooklist}}" hasListModel="{{hasListModel}}">
69 </cookClass> 69 </cookClass>
  70 +<cart></cart>
@@ -170,6 +170,7 @@ @@ -170,6 +170,7 @@
170 height:100rpx; 170 height:100rpx;
171 background-color: #fefefe; 171 background-color: #fefefe;
172 color:#353535; 172 color:#353535;
  173 + border-top: 2rpx solid #F5F5F5;
173 } 174 }
174 .bottom-view image{ 175 .bottom-view image{
175 width: 100%; 176 width: 100%;