|
|
|
<!--pages/cart/cart.wxml-->
|
|
|
|
<view class="body" wx:if="{{remind}}">
|
|
|
|
<view class='zong'>
|
|
|
|
<view class="spinner">
|
|
|
|
<view class="spinner-container container1">
|
|
|
|
<view class="circle1"></view>
|
|
|
|
<view class="circle2"></view>
|
|
|
|
<view class="circle3"></view>
|
|
|
|
<view class="circle4"></view>
|
|
|
|
</view>
|
|
|
|
<view class="spinner-container container2">
|
|
|
|
<view class="circle1"></view>
|
|
|
|
<view class="circle2"></view>
|
|
|
|
<view class="circle3"></view>
|
|
|
|
<view class="circle4"></view>
|
|
|
|
</view>
|
|
|
|
<view class="spinner-container container3">
|
|
|
|
<view class="circle1"></view>
|
|
|
|
<view class="circle2"></view>
|
|
|
|
<view class="circle3"></view>
|
|
|
|
<view class="circle4"></view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- 加载页面结束 -->
|
|
|
|
<block wx:else>
|
|
|
|
<view class="page">
|
|
|
|
<view class='top-ql' wx:if="{{carts !=''}}">
|
|
|
|
<view wx:if="{{!upstatus}}" bindtap="updata" class='top-ql-1' style='color:#333;'>编辑商品</view>
|
|
|
|
<view wx:else bindtap="ok" class='top-ql-1' style='color:#f60;'>完成</view>
|
|
|
|
<view wx:if="{{upstatus}}" bindtap="delall" class='top-ql-1 iconfont icon-icon-test' style='color:#f60;'>快速清理</view>
|
|
|
|
</view>
|
|
|
|
<!-- productData -->
|
|
|
|
<view class="shop df" wx:for="{{productData}}" wx:key="key">
|
|
|
|
<image class="sh_slt" src="{{item.imgurl}}"></image>
|
|
|
|
<view class="df_1">
|
|
|
|
<view class="sp_text">
|
|
|
|
<navigator url="../index/detail?productId={{item.ProID}}">
|
|
|
|
<view class="sp_tit ovh1">{{item.ProductName}}</view>
|
|
|
|
</navigator>
|
|
|
|
<view class="sp_neb">数量:×{{item.BuyCount}}</view>
|
|
|
|
<view class="sp_jg">¥:{{item.Price}}</view>
|
|
|
|
<button class="dle" data-card-id="{{item.CartID}}" bindtap="removeShopCard">删除</button>
|
|
|
|
<navigator class="dle" url="../order/pay?productId={{item.ProID}}&cartId={{item.CartID}}&buyCount={{item.BuyCount}}">下单</navigator>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!--样式-->
|
|
|
|
<view class="container carts-list" wx:if="{{carts==''}}">
|
|
|
|
<view class="pp">
|
|
|
|
<image class="kong" src="/images/cart.png" mode="aspectFill" />
|
|
|
|
<view class="cla">购物车空空如也</view>
|
|
|
|
<view class="cla" style='padding:5px;background:{{bgcolor}};border-radius:5px;margin:6px;color:#fff;' bindtap='go_index'>去逛逛</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- <view class="shopView" wx:if="{{carts.length > 0}}">
|
|
|
|
<image src="{{shop_logo}}" mode="aspectFill"></image>
|
|
|
|
<text class="left">{{shop.name}}</text>
|
|
|
|
<image class="jiantou-img" src="/images/x_right.png" mode="aspectFill"></image>
|
|
|
|
</view> -->
|
|
|
|
<view class="container carts-list">
|
|
|
|
<!--勾-->
|
|
|
|
<view wx:for="{{carts}}" wx:key="key" class="carts-item" data-title="{{item.pro_name}}" id="{{item.id}}">
|
|
|
|
<icon wx:if="{{item.selected}}" type="success_circle" size="20" bindtap="bindCheckbox" data-index="{{index}}" />
|
|
|
|
<icon wx:else type="circle" size="20" bindtap="bindCheckbox" data-index="{{index}}" />
|
|
|
|
<!--img-->
|
|
|
|
<navigator style='align-content:center;' url="../product/detail?productId={{item.pid}}&size={{item.sizeid}}">
|
|
|
|
<view>
|
|
|
|
<image class="carts-image" src="{{item.imgurl}}" mode="aspectFill" />
|
|
|
|
</view>
|
|
|
|
</navigator>
|
|
|
|
<view class="carts-text">
|
|
|
|
<!-- <navigator style='width:100%;height:120rpx;overflow: hidden;' url="../product/detail?productId={{item.pid}}&size={{item.Size_id}}"> -->
|
|
|
|
<text class="carts-title">{{item.pro_name}}</text>
|
|
|
|
<text class="carts-title" style='font-size:28rpx;color:#CCCCCC;margin-top:25rpx;' data-index="{{index}}" data-id="{{item.pid}}" data-status="1" wx:if="{{item.attrList}}" bindtap="showAttribute">[{{item.skuBeanList[0].name}}]</text>
|
|
|
|
<!-- </navigator> -->
|
|
|
|
<view class="title">
|
|
|
|
<text class="carts-price">¥ {{item.price}}</text>
|
|
|
|
<view class="stepper">
|
|
|
|
<!-- 减号 -->
|
|
|
|
<text class="{{minusStatuses[index]}}" data-index="{{index}}" bindtap="bindMinus" data-cartid="{{item.id}}">-</text>
|
|
|
|
<!-- 数值 -->
|
|
|
|
<input type="number" data-cartid="{{item.id}}" data-index="{{index}}" bindblur="bindManual" value="{{item.num}}" class='cart_number' />
|
|
|
|
<!-- 加号 -->
|
|
|
|
<text class="normal" data-index="{{index}}" bindtap="bindPlus" data-cartid="{{item.id}}">+</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!--右边-->
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<!--底部-->
|
|
|
|
<view class="carts-footer" wx:if="{{carts.length >= 1}}">
|
|
|
|
<view bindtap="bindSelectAll" class='heji'>
|
|
|
|
<icon wx:if="{{selectedAllStatus}}" type="success_circle" size="24" />
|
|
|
|
<icon wx:else type="circle" size="24" />
|
|
|
|
<text>全选</text>
|
|
|
|
<text wx:if="{{!upstatus}}" class="reds">{{total}}</text>
|
|
|
|
</view>
|
|
|
|
<view wx:if="{{upstatus}}" class="bottom_1">
|
|
|
|
<view class="button_1_2" style='background:#FB5657;border:1px solid #f60;' bindtap='delarr'>删除</view>
|
|
|
|
</view>
|
|
|
|
<view wx:else class="button" style='background:#FB5657;' bindtap='bindCheckout'>立即结算</view>
|
|
|
|
</view>
|
|
|
|
<!--弹窗-->
|
|
|
|
<view class="drawer_screen" catchtouchmove="preventTouchMove" bindtap="setModalStatus" data-status="0" wx:if="{{showModalStatus}}"></view>
|
|
|
|
<view animation="{{animationData}}" class="drawer_attr_box" catchtouchmove="preventTouchMove" wx:if="{{showModalStatus}}">
|
|
|
|
<view class="close_icon" bindtap="setModalStatus" data-status="0">×</view>
|
|
|
|
<view class="drawer_attr_content">
|
|
|
|
<view class="text_center">
|
|
|
|
<image class="drawer_image" src="{{itemData.photo_x}}"></image>
|
|
|
|
</view>
|
|
|
|
<view class="mingcheng">
|
|
|
|
<view style="font-size:38rpx;color:#FB5657">¥ {{itemData.price_yh}}</view>
|
|
|
|
<view style="font-size:26rpx;color:#999">库存:{{itemData.num}}</view>
|
|
|
|
</view>
|
|
|
|
<view style='clear:both;'></view>
|
|
|
|
<view class="commodity_attr_list" catchtouchmove="preventTouchMove">
|
|
|
|
<!--每组属性-->
|
|
|
|
<scroll-view scroll-y="true" style="height:100%;">
|
|
|
|
<!-- 属性选择 -->
|
|
|
|
<view wx:for="{{attrList}}" wx:for-index="idx" wx:key="userInfoListId" class="outStyle">
|
|
|
|
<view class='outStyleText textStyle buttonPaddingStyle' style="padding-left:0">{{item.attrName}}</view>
|
|
|
|
<view class='typeStyle textStyle' style="margin-left:0;flex-wrap: wrap;">
|
|
|
|
<view wx:for="{{item.attr}}" data-item='{{item.attr[index]}}' data-index='{{index}}' data-idx='{{idx}}' wx:key="userInfoListId" bindtap="onChangeShowState" wx:for-item="items">
|
|
|
|
<view class="{{items.enable == true ?(items.select==true?'select':'normal') : 'bai'}} textStyle buttonPaddingStyle">
|
|
|
|
{{items.attributeValue}}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</scroll-view>
|
|
|
|
</view>
|
|
|
|
<view class="footc" data-sku="{{skuList}}" type="primary" bindtap="confirmAct"> 确定 </view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!--弹框结尾 -->
|
|
|
|
</view>
|
|
|
|
</block>
|