tsteam-business-card-card-mini/packagecard/shop/product/goodsdetail.wxml
2024-02-22 11:04:15 +08:00

68 lines
3.1 KiB
Plaintext
Executable File

<!-- 商品详情页面 -->
<cu-custom isBack="{{true}}" isRelaunch="{{false}}">
<view slot="content">详情</view>
</cu-custom>
<!-- 商品轮播图 -->
<scroll-view>
<swiper class="screen-swiper square-dot bg-white" indicator-dots="true" circular="true" autoplay="true"
interval="5000" duration="500" style="height:550rpx;">
<swiper-item wx:for="{{picList}}" wx:key="index">
<image src="{{item}}" mode='scaleToFill'></image>
</swiper-item>
</swiper>
</scroll-view>
<view class="cu-list scroll-content" style="margin-bottom:90rpx;">
<!-- 商品详细信息 -->
<!-- 价格 -->
<view class="cu-item padding-left-lg padding-right-lg bg-white">
<view class="content text-red">¥ <text class="text-blod text-xxl">{{goodsDetail.goodsUnitPrice}}
</text></view>
<!-- 名称 -->
<view class="margin-top-ls text-xl text-black bg-white margin-top-sm"> {{goodsDetail.goodsName}}</view>
<view class="text-gray text-sm margin-top-sm">库存:{{goodsDetail.goodsTotal}}</view>
</view>
<!-- 描述 -->
<view class="margin-top-sm bg-gray" style="height:20rpx;"></view>
<view class="margin-top-ls text-gray text-lg bg-white padding-sm"> {{goodsDetail.goodsSummary}}</view>
<view class="hint-title bg-gray">
<image src="../../../../images/title-bg.png" mode="scaleToFill"></image>
<text>宝贝详情</text>
</view>
<!-- 视频 -->
<view wx:if="{{goodsDetail.goodsVideo.length>0}}" class="padding-xs bg-white margin-top-ls">
<video id="myVideo" src="{{baseImg+goodsDetail.goodsVideo}}" binderror="videoErrorCallback"
show-center-play-btn='{{true}}' bindenterpictureinpicture='bindVideoEnterPictureInPicture'
bindleavepictureinpicture='bindVideoLeavePictureInPicture' style="width:100%;border-radius:20rpx;"></video>
</view>
<!-- 图片 -->
<view class="margin-top-ls bg-white padding-sm">
<image wx:for="{{picList}}" wx:key="index" src="{{item}}" style="width:100%" mode="widthFix"></image>
</view>
</view>
<customcart id="sCart" shopId="{{shopId}}" goods="{{goodsDetail}}" showBtn="{{true}}" bind:showcart="doShowCart"
bind:refreshShopCart="doRefreshShopcart">
</customcart>
<van-action-sheet show="{{ isShowCart }}" title="购物车" bind:close="onHideCart" style="padding-bottom:180rpx;">
<view class="cu-card article" style="margin-top:100rpx;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"></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>