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.
 

229 lines
13 KiB

<!--pages/feiyi/list/index.wxml-->
<!-- 文创特产页面 -->
<view class="techanMain">
<view style="{{seachFlag?'':'height: 500rpx;'}}">
<!-- <search name="{{name}}" bindtap="goNewSearch"></search> -->
<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 bindtap="goNewSearch" class="search-box" style="margin-right:{{right + 5}}px;">
<icon class="iconfont icon-sousuo"></icon>
<view class="weui-input" style="color: #999;font-weight: 400;font-size: 27rpx;">请输入商品名称</view>
<!-- <input placeholder-class="{{transparent==1?'phcolor':''}}" 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;">搜索</view>
</view>
</view>
</view>
</view>
<image lazy-load wx:if="{{!seachFlag}}" class="heaimg" src="https://static.ticket.sz-trip.com/uploads/20240710/a39dd5504c4baa66dd239153d2d20787.png" mode="widthFix"></image>
</view>
<view wx:if="{{!seachFlag}}" class="techan-centent">
<!-- 切换分类 以及 切换样式 -->
<view class="type-box">
<view style="display: flex;">
<view wx:for="{{flag?navList:navList2}}" wx:key="*this" bindtap="changeNav" data-index="{{index}}" class="{{index == navIndex ? 'seld-nav':'nav'}}">{{item.title}}</view>
</view>
<!-- 店铺--产品 切换 -->
<image lazy-load wx:if="{{flag}}" bindtap="changeStyle" class="changeStyle" src="https://static.ticket.sz-trip.com/uploads/20240710/62bb38d5f88754e57447a26b14176aa2.png" mode="" />
<image lazy-load wx:else bindtap="changeStyle" class="changeStyle" src="https://static.ticket.sz-trip.com/uploads/20240717/a092bdcdbac0bb26573f8997f3d4ba38.png" mode="" />
</view>
<!-- 产品部分 -->
<view wx:if="{{flag}}" style="flex: 1; display: flex; overflow: hidden;">
<!-- <view style="display: flex; pa/dding-bottom: 167rpx;"> -->
<!-- 左侧二级分类 -->
<view class="left">
<scroll-view scroll-y="true" style="height: 100%" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<view wx:for="{{typeList}}" wx:key="*this" class="{{index == typeIndex ? 'seld-type':'type-two-box'}}" bindtap="changeType" data-index="{{index}}">
<view class="line" wx:if="{{index == typeIndex}}"></view>
<view>
{{item.name}}
</view>
</view>
</scroll-view>
</view>
<!-- 右侧产品列表 -->
<view class="list" style="width: 100%;height:100%; overflow: hidden;padding-bottom: 30rpx;">
<scroll-view scroll-y="true" style="height: 100%" bindscrolltoupper="upper" bindscrolltolower="getList" bindscroll="scroll">
<view class="item" wx:for="{{list}}" wx:key="*this" bindtap="goodsDetail" data-goods="{{item}}">
<image lazy-load class="img" src="{{item.headimg}}" mode="" />
<view class="content">
<view class="title">
{{item.title}}
</view>
<view class="item-bottom">
<view class="price">
<text class="current-price">{{item.price/100}}</text>
<text class="original-price" wx:if="{{item.market_price && item.market_price!=0 && item.market_price>item.price}}">¥{{item.market_price/100}}</text>
</view>
<view class="add" catchtap="addBuyCart" data-item="{{item}}">+</view>
</view>
</view>
</view>
</scroll-view>
</view>
<!-- </view> -->
</view>
<!-- 店铺展示 -->
<view wx:else style="padding: 0 26.67rpx; overflow: hidden;">
<scroll-view scroll-y="true" style="height: 100%" bindscrolltoupper="upper" bindscrolltolower="getSupplierTag" bindscroll="scroll">
<view wx:for="{{list}}" class="list1" wx:key="*this">
<view class="top-info" bindtap="goShop" data-id="{{item.id}}">
<common-image mode="aspectFill" src="{{item.headimg}}" style="border-radius: 13rpx;"></common-image>
<view class="supplier-info">
<view class="supplier-name textOver">{{item.shop_name}}</view>
<view class="mid-box">
<view class="supplier-tags">
<view class="supplier-tag textOver" wx:for="{{item.display_tags}}">{{item}}</view>
</view>
<view class="supplier-price"><text>¥</text><text>{{(item.start_price/100)}}</text><text>起</text></view>
</view>
<view class="bottom-box">
<view class="supplier-address supplier-tags"><text class="iconfont icon-location"></text><text style="max-width: 300rpx;" class="textOver">{{item.address}}</text></view>
<view class="btn">
进店看看
</view>
</view>
</view>
</view>
<view class="product-list">
<view data-item="{{item}}" bindtap="goodsDetail" data-goods="{{item}}" class="product-item" wx:for="{{item.product}}" wx:key="*this">
<image lazy-load src="{{item.headimg}}" mode="aspectFill"></image>
<view class="product-title textOver2">{{item.title}}</view>
<view class="supplier-price"><text>¥</text><text style="font-size:32rpx">{{(item.price/100)}}</text><text class="market_price" wx:if="{{item.market_price && item.market_price!=0 && item.market_price>item.price}}">{{item.market_price/100}}</text></view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- 搜索到的产品列表 -->
<view wx:if="{{seachFlag}}" style="overflow-y: scroll;padding-bottom: 70rpx;">
<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 style="width:100%;height:167rpx;" wx:if="{{flag}}">
</view>
<view class="bottom" wx:if="{{(flag &&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 wx:if="{{totalPrice==0}}" class="no-buy">去结算</view>
<view wx:else class="buy" bindtap="order">去结算</view>
</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 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;min-height: 600rpx;">
<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>
<image lazy-load style="width:179rpx;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;" src="{{item.sku.headimg}}" mode="" />
<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}}" 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="addCart" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
</view>
</view>
</view>
</view>
</view>
</view>
</view>