56 lines
2.8 KiB
Plaintext
56 lines
2.8 KiB
Plaintext
<view class="shopping-cart-page">
|
|
<view class="shopping-cart__header">
|
|
<text class="header__name">购物车</text>
|
|
<text class="header__manege" bindtap="onManage">{{!isManage ?'管理' : '退出管理'}}</text>
|
|
</view>
|
|
<view class="shopping-cart__container">
|
|
<view class="shopping-cart__item {{ item.active ? 'active' : '' }}" wx:for="{{commodities}}" wx:key="id" data-item="{{ item }}" bindtouchstart="handleTouchStart" bindtouchmove="handleTouchMove">
|
|
<view class="item__image">
|
|
<van-checkbox value="{{ item.checked }}" data-item="{{ item }}" bind:change="onChangeCheckbox">
|
|
</van-checkbox>
|
|
<image class="image__icon" src="{{item.icon}}" />
|
|
</view>
|
|
<view class="item__texts">
|
|
<view class="item__title">{{item.name}}</view>
|
|
<view class="item__attribute">{{item.attribute}}</view>
|
|
<view class="item__line">
|
|
<view class="line__price">
|
|
<!-- <view class="line__price__actual">¥<text>20</text>.00</view> -->
|
|
<view class="line__price__actual">¥{{item.price}}</view>
|
|
<view class="line__price__origin">¥39.00</view>
|
|
</view>
|
|
<view class="line__num">
|
|
<van-icon name="minus" data-type="minus" data-id="{{ item.id }}" bindtap="onChangeNum" />
|
|
<view class="num__number">{{item.num}}</view>
|
|
<van-icon name="plus" data-type="plus" data-id="{{ item.id }}" bindtap="onChangeNum" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="item__btns">
|
|
<view class="item__btns__wrap" data-id="{{ item.id }}" bindtap="onDeleteItem">
|
|
<van-icon name="delete-o" color="#fff" size="32rpx" />
|
|
<text>删除</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="shopping-cart__footer">
|
|
<van-checkbox value="{{ checked }}" bind:change="onChange"></van-checkbox>
|
|
<view class="footer__center">
|
|
<view class="footer__center__line">
|
|
<view class="footer__center__price">
|
|
<!-- ¥<text>50</text>.52 -->
|
|
¥<text>50</text>.52
|
|
</view>
|
|
<text class="footer__center__title">合计:</text>
|
|
</view>
|
|
<view class="footer__center__line">
|
|
<van-icon name="arrow-up" />
|
|
<text class="footer__center__detail-btn">| 明细</text>
|
|
<text>红包共减 ¥30.34 </text>
|
|
</view>
|
|
</view>
|
|
<van-button>结算(2)</van-button>
|
|
</view>
|
|
<custom-tabbar cartCount="{{ 2 }}" />
|
|
</view> |