card-mini/packagecard/shop/catalog/column/column.wxml

76 lines
3.9 KiB
Plaintext

<!--pages/mine/shop/choose.wxml-->
<cu-custom isBack="{{true}}">
<view slot="content">商品管理</view>
</cu-custom>
<view class="category">
<!-- 左边分类 -->
<scroll-view class="nav_left" scroll-y="true">
<block wx:for="{{productList}}" wx:key="index">
<view class="nav_left_bg {{curIndex==index ? 'nav_left_item-active nav_left_border' : ''}}"
data-curindex="{{index}}">
<view class="nav_left_items {{curIndex==index ? 'nav_left_item-active' : ''}} text-cut flex-twice"
data-curindex="{{index}}" bindtap="switchRightTap">{{item.categoryName}}
</view>
</view>
</block>
</scroll-view>
<!-- 右边商品 -->
<scroll-view class="nav_right" scroll-y="true" bindscrolltolower="doLoadMore" style="height:{{contentHeight}}px">
<view class="cu-list menu-avatar" wx:for="{{productList[curIndex].goodsList}}" wx:key="index">
<view class="cu-item">
<view class="cu-avatar radius xl" style="background-image:url({{baseImageUrl+item.goodsIcon}});"
data-item="{{item}}" bindtap="manageGoods">
<!-- <view class="{{item.goodsStatus == 1 ? 'cu-tag badge' : 'cu-tag badgegray'}}">
{{item.goodsStatus=='1' ? '在售' : '下架' }}</view> -->
</view>
<view class="content" style="width:85%;">
<view class="text-depblack" data-item="{{item}}" bindtap="manageGoods" style="width:80%;">
<text class="text-cut">{{item.goodsName}}</text>
<text class="cuIcon-hotfill lg text-red" wx:if="{{item.isPopular == '1' }}"></text>
</view>
<view class="text-gray text-sm flex" style="width:80%;" data-item="{{item}}" bindtap="manageGoods">
<text class="text-cut">{{item.goodsSummary}}</text>
</view>
<view class="bottom-action margin-top-ls">
<view class="text-lg text-red">¥:{{item.goodsUnitPrice}}</view>
<view class="flex margin-top-xs" style="align-items:center;">
<image src="/images/ic_remove_cart.png" mode="scaleToFill" style="width:40rpx;height:40rpx;"
data-item="{{item}}" bindtap="removeToCart" wx:if="{{item.buyNum>0}}"></image>
<view class="solid"
style="width:auto;height:40rpx;min-width:60rpx;text-align:center;display:flex;justify-content:center;align-items:center;">
{{item.buyNum}}</view>
<image src="/images/ic_add_cart.png" mode="scaleToFill" style="width:40rpx;height:40rpx;"
data-item="{{item}}" bindtap="addToCart"></image>
</view>
</view>
</view>
</view>
</view>
<van-loading wx:if="{{isLoadMore}}" size="24px">加载中...</van-loading>
</scroll-view>
</view>
<customcart id="sCart" shopId="{{shopId}}" showBtn="{{false}}" bind:showcart="doShowCart">
</customcart>
<van-action-sheet show="{{ isShowCart }}" title="购物车" bind:close="onHideCart" style="padding-bottom:180rpx;">
<view class="cu-card article" style="margin-top:10rpx;padding-bottom:80rpx;">
<view class="cu-item shadow padding-sm" wx:for="{{shopCart}}" wx:key="index" data-item="{{item}}">
<view class="content">
<image src="{{baseImg+item.goodsIcon}}" mode="scaleToFill" style="width:80px;height:80px;"></image>
<view class="desc">
<view>{{item.goodsName}}</view>
<view class="text-cut-width">{{item.goodsSummary}}</view>
<view class="flex justify-between" style="align-items:center;">
<view class="text-red">¥{{item.goodsUnitPrice}}</view>
<van-stepper value="{{ item.buyNum }}" bind:change="onChange" data-goods="{{item}}" integer="true"
min="1" />
<view class="cu-tag text-red" bindtap="delGoods" data-index="{{index}}" data-goods="{{item}}">删除
</view>
</view>
</view>
</view>
</view>
</view>
</van-action-sheet>