You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

157 lines
9.5 KiB

<view class="title-box{{transparent==1?' bg-box':''}}" style="height:{{isScene==1?'0':(height+padHeight)}}px;">
<view class="title-header" style="padding-top:{{padHeight}}px;height:{{height}}px">
<icon bindtap="back" class="iconfont icon-fanhui1"></icon>
<view class="search-box" style="margin-right:{{right + 5}}px;">
<icon class="iconfont icon-sousuo"></icon>
<input placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="searchInput" class="weui-input" placeholder="请输入商品名称" />
<!-- <input bindfocus="inputFocus" placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="getVal" class="weui-input" placeholder="搜索" /> -->
<view wx:if="{{isScene!=1}}" style="display: flex;padding-right: 12rpx;">
<view style="color: #ccc;">|</view>
<view style="margin-left:22rpx;font-weight: 400;font-size: 29rpx;color: #0B898E;" bindtap="search">搜索</view>
</view>
</view>
</view>
</view>
<view>
<view class="hot-list" wx:if="{{list.length>0}}">
<view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="this">
<view class="hot-item" wx:if="{{index%2==number}}" wx:for="{{list}}" bindtap="goodsDetail" data-goods="{{item}}" wx:key="id">
<image lazy-load class="hot-item-img" src="{{item.headimg}}" mode="" />
<view class="hot-item-main">
<view class="hot-item-title textOver2">
{{item.title}}
</view>
<view style="display: flex;justify-content: space-between;align-items: center; ">
<view>
<text class="hot-item-price">{{item.price/100}}</text>
<text class="hot-item-market_price" wx:if="{{item.market_price && item.market_price!=0 && item.market_price>item.price}}">{{item.market_price/100}}</text>
</view>
<image lazy-load class="add" catchtap="addBuyCart" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
</view>
</view>
</view>
</view>
</view>
<view wx:else style="display: flex;flex-direction: column;align-items: center;">
<image lazy-load style="width:328rpx;height:450.67rpx;margin-top: 286.67rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/3750a41a89b49e9f546a6ba85d71d66e.png" mode="" />
<view style="font-family: PingFang SC;font-weight: 500;font-size: 28rpx;color: #666666;margin-top: 67rpx;">
暂无搜索结果
</view>
</view>
</view>
<view class="bottom" wx:if="{{(skuFlag != 'cart') || showPopup}}">
<!-- 左边购物车图标及价格 -->
<view class="gwc-left">
<view class="gwc" bindtap="openPopup">
<image lazy-load wx:if="{{cartCount == 0}}" style="width: 100%;height: 100%;" src="https://static.ticket.sz-trip.com/uploads/20240715/520600afc4bd32ed1f44bc5985fc2ba5.png" mode="" />
<image lazy-load wx:else style="width: 100%;height: 100%;" src="https://static.ticket.sz-trip.com/uploads/20240711/f9c290c64c521feae643d28f1b8c9c60.png" mode="" />
<view class="cartCount">{{cartCount}}</view>
</view>
<view style="font-weight: 500;font-size: 27rpx;color: #000000;">
总计:<text class="money">{{totalPrice/100}}</text>
</view>
<view wx:if="{{totalPrice>0}}" bindtap="openPopup">
<text style="margin-left: 16.67rpx;font-weight: 500;font-size: 27rpx;color: #0B898E;">明细</text>
<image lazy-load wx:if="{{showPopup}}" style="width:17.33rpx;height:17.33rpx;margin-left:10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/524acef87f09269f6a4fa39d0fa38c18.png" mode=""/>
<image lazy-load wx:else style="width:17.33rpx;height:17.33rpx;margin-left: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/080e94053d1444707d18860a73b17915.png" mode=""/>
</view>
</view>
<!-- 去结算按钮 -->
<view class="{{totalPrice == 0?'no-buy':'buy'}}" bindtap="order">去结算</view>
</view>
<!-- 规格弹窗 -->
<view class="mask" wx:if="{{skuFlag}}">
<view class="mask-bg" bindtap="hideSku" style="z-index: 9999;"></view>
<view class="mask-content" style="z-index: 99999;">
<view class="iconfont icon-close" bindtap="hideSku"></view>
<view class="sku-info-box">
<image lazy-load id="skuImg" src="{{info.sku[skuIndex].headimg}}" mode="aspectFill"></image>
<view class="sku-info">
<view class="sku-price">{{info.sku[skuIndex].price/100}}
<view class="allowance" wx:if="{{allowance_data}}">
补贴价:¥{{ (1 - allowance_data.discount_rate / 100) * info.sku[skuIndex].price / 100 }}</view>
</view>
<view class="sku-name">已选择:{{info.sku[skuIndex].sku_name}}</view>
</view>
</view>
<view class="sku-names">
<view bindtap="selectSku" data-index="{{index}}" class="sku-name-item textOver{{index==skuIndex?' active':''}}" wx:for="{{info.sku}}">{{item.sku_name}}</view>
</view>
<view class="number-box">
<text>数量</text>
<view class="iconfont icon-sami-select" bindtap="minus"></view>
<view class="number">{{producNum}}</view>
<view class="iconfont icon-add-select" bindtap="add"></view>
</view>
<view class="delivery-method" wx:if="{{info.is_package!=1}}">
<view class="delivery-title">配送方式</view>
<view class="flex" style="display: flex;">
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=1}}" bind:tap="changeSelectSkuPost" data-value="{{0}}">
<view class="select-cycle" wx:if="{{user_type!==0}}"></view>
<view class="select-cycle selected" wx:else>
<image src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png"></image>
</view>
<view class="method-str">邮寄</view>
</view>
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=0}}" bind:tap="changeSelectSkuPost" data-value="{{1}}">
<view class="select-cycle" wx:if="{{user_type!==1}}"></view>
<view class="select-cycle selected" wx:else="">
<image src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png"></image>
</view>
<view class="method-str">自提</view>
</view>
</view>
</view>
<view style="height:138rpx"></view>
<view class="btn-box">
<!-- <view class="mask-btn" bindtap="addCart" wx:if="{{info.sku[skuIndex].flag=='on'}}">{{skuFlag=='cart'?'加入购物车':'立即购买'}}
</view> -->
<view class="mask-btn" bindtap="addCart" wx:if="{{info.sku[skuIndex].flag=='on'}}">加入购物车</view>
<view class="mask-btn disable" wx:else>该商品已下架</view>
</view>
</view>
</view>
<!-- 购物车的弹窗 -->
<view class="mask" wx:if="{{showPopup}}">
<view bindtap="openPopup" class="mask-bg"></view>
<view class="mask-content" style="padding: 40rpx 0 180rpx;height: 900rpx;">
<view style="margin: 0 26.67rpx;">
<!-- 顶部操作按钮 -->
<view class="flex" style="margin-bottom: 56.67rpx;">
<view class="flex">
<image lazy-load bindtap="allSelected" wx:if="{{allSelectedBtn}}" style="width: 40rpx;height: 40rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png" mode="" />
<view bindtap="allSelected" wx:else style="width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px solid #999999;"></view>
<text class="all">全选</text>
</view>
<view class="flex" bindtap="delAll">
<image lazy-load style="width:26.67rpx;height:26.67rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/3320fbf5ccf471145c3c600582cd9b65.png" mode="" />
<text class="del-all">清空</text>
</view>
</view>
<view class="gwc-item" wx:for="{{gwcList}}" wx:key="*this" bindtap="selectedIt" data-item="{{item}}">
<view style="margin-right: 26.67rpx;">
<image lazy-load wx:if="{{item.selected ==1}}" style="width: 43rpx;height: 43rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png" mode="" />
<view wx:else style="width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px solid #999999;"></view>
</view>
<view style="position: relative;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;">
<image lazy-load style="width:179rpx;height: 179rpx;border-radius: 13rpx;" src="{{item.sku.headimg}}" mode="" />
<view class="use-type">{{item.delivery_method==1?"自提":"邮寄"}}</view>
</view>
<view class="main">
<view>
<view class="title textOver">{{item.product.title}}</view>
<view class="sku-title textOver">{{item.sku.sku_name}}</view>
</view>
<view class="main-bottom">
<view class="price">{{item.sku.price/100}}</view>
<view class="num-box">
<image lazy-load class="reduce" catchtap="del" data-item="{{item}}" data-value="{{-1}}" src="https://static.ticket.sz-trip.com/uploads/20240715/054627e5d3864a9a4a8b397cae47754e.png" mode="" />
<view style="margin: 0 25.33rpx;">{{item.num}}</view>
<image lazy-load class="grow" catchtap="del" data-item="{{item}}" data-value="{{1}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
</view>
</view>
</view>
</view>
</view>
</view>
</view>