upgrade.wxml 7.28 KB
<view>
    <view  class="category_wrapper">
        <view class="inner">
            <scroll-view scroll-into-view="{{toSeri}}" class="scroll" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-x="{{true}}" scroll-with-animation>
                <block wx:for="{{categoryList}}" wx:key="index">
                    <view id="toCategory-{{index}}" data-item="{{item}}" bind:tap="toSelectCategory" data-index="{{index}}" class="image_text">
                        <view class="box {{curCategoryIdx==index?'box_active':''}}">
                            <image mode="aspectFill" class="icon" webp src="{{item.categoryImage || 'https://img02.glsx.com.cn/weapp/resource/miniprogram/glsx/discover/version/3_13_0/default_seri_car_bg.png?v=1.0.2'}}"></image>
                            <glsx-image wx:if="{{curCategoryIdx==index}}" class="icon_active" webp src="glsx/discover/version/3_13_0/select_seri.png"></glsx-image>
                        </view>
                        <view class="text hide {{curCategoryIdx==index?'text_active':''}}">
                            {{item.categoryName}}
                        </view>
                    </view>
                </block>
            </scroll-view>
        </view>
    </view>
    <view  wx:if="{{discoverCaseList.length && curCategoryIdx==0}}" class="videoList">
        <block wx:for="{{discoverCaseList}}" wx:key="index">
            <view bind:tap="toVideoPage" data-index="{{index}}" class="video_wrap">
                <view class="image_box">
                    <image class="cover" mode="aspectFill" lazy-load="{{true}}" src="{{item.coverUrl}}" />
                </view>
                <view class="info_box">
                    <view class="title text-two-line">{{item.caseName}}</view>
                    <view class="viewInfo flex_scb">
                        <view class="image-text flex_scb">
                            <glsx-image class="avatar" webp src="glsx/discover/view_logo.png"></glsx-image>
                            <view class="author hide">智享车生活</view>
                        </view>
                        <view class="image-text flex_scb">
                            <glsx-image class="view_icon" webp src="glsx/discover/version/3_13_0/view-point-icon.png"></glsx-image>
                            <view class="author hide">{{item.playTraffic}}</view>
                        </view>
                    </view>
                </view>
            </view>
        </block>
    </view>
    <block wx:else>
        <view wx:if="{{categoryStyle>-1}}" class="{{ categoryStyle=='2' ? 'goods_ctnr_waterfall': categoryStyle=='3' ? 'goods_ctnr_grass_B' : categoryStyle=='1' ? 'goods_ctnr_row' : 'goods_ctnr_col' }}">
            <view wx:if="{{categoryStyle==0 || categoryStyle==1}}" class="goods_wrap">
                <view catch:tap="toGoodsDetail" data-item="{{item}}" class="goods_box" wx:for="{{goodsList}}" wx:key="index">
                    <image mode="aspectFill" class="cover" src="{{item.commerceVideo ? item.coverUrl  : item.goodsImage}}"/>
                    <view class="info  {{categoryStyle?'flex_cccb':''}}">
                        <text class="name">{{item.goodsName}}</text>
                        <block wx:if="{{categoryStyle}}">
                            <text wx:if="{{item.giveIntegral}}" class="tip">获{{item.giveIntegral}}养车积分</text>
                        </block>
                        <view class="price_wrap">
                            <text>
                                <text class="unit">¥</text>
                                <text class="new_price">{{item.activityPrice}}</text>
                                <text class="old_price">{{item.originalPrice}}</text>
                            </text>
                            <glsx-image  catch:tap="toAddBuuCar" data-item="{{item}}"  class="add_btn" webp src="glsx/discover/version/3_13_0/add_buyCar_icon.png"></glsx-image>
                        </view>
                        <block wx:if="{{!categoryStyle}}">
                            <text wx:if="{{item.giveIntegral}}" class="tip">获{{item.giveIntegral}}养车积分</text>
                        </block>
                    </view>
                </view>
            </view>
            <view wx:elif="{{categoryStyle==3}}" class="goods_wrap">
                <view catch:tap="toGoodsDetail" data-item="{{item}}" wx:for="{{goodsList}}" wx:key="{{index}}">
                    <image wx:if="{{item.styleBImg}}" mode="aspectFill" class="publicity-img" src="{{item.styleBImg}}"/>
                    <view class="goods_box">
                        <video 	show-fullscreen-btn="{{false}}" show-play-btn="{{false}}" wx:if="{{curPlayIdx==index && (item.commerceVideo || item.goodsVideo)}}" loop id="video{{index}}" muted="{{false}}" autoplay class="cover" src="{{item.commerceVideo || item.goodsVideo}}"></video>
                        <image wx:else mode="aspectFill" class="cover" src="{{item.commerceVideo ? item.coverUrl  : item.goodsImage}}"/>
                        <view class="info  {{categoryStyle?'flex_cccb':''}}">
                            <text class="name">{{item.goodsName}}</text>
                            <text wx:if="{{item.giveIntegral}}" class="tip">获{{item.giveIntegral}}养车积分</text>
                            <view class="price_wrap">
                                <text>
                                    <text class="unit">¥</text>
                                    <text class="new_price">{{item.activityPrice}}</text>
                                    <text class="old_price">{{item.originalPrice}}</text>
                                </text>
                                <glsx-image  catch:tap="toAddBuuCar" data-item="{{item}}"  class="add_btn" webp src="glsx/discover/version/3_13_0/add_buyCar_icon.png"></glsx-image>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
            <block wx:else>
                <view class="{{parentIndex==0  ? 'left-box' : 'right-box'}}" wx:for-item="parentItem"  wx:for-index="parentIndex" wx:for="{{['leftList','rightList']}}" wx:key="{{index}}">
                    <block wx:for="{{goodsList}}" wx:key="{{index}}">
                        <view catch:tap="toGoodsDetail" data-item="{{item}}" wx:if="{{index%2 == parentIndex}}" class="goods_box">
                            <image mode="widthFix" class="cover" src="{{item.commerceVideo ? item.coverUrl  : item.goodsImage}}"/>
                            <view class="info">
                                <text class="name">{{item.goodsName}}</text>
                                <text wx:if="{{item.giveIntegral}}" class="tip">获{{item.giveIntegral}}养车积分</text>
                                <view class="price_wrap">
                                    <text>
                                        <text class="unit">¥</text>
                                        <text class="new_price">{{item.activityPrice}}</text>
                                        <text class="old_price">{{item.originalPrice}}</text>
                                    </text>
                                </view>
                            </view>
                        </view> 
                    </block>
                </view>
            </block>
        </view>
    </block>
    <view style="height: 20rpx;"></view>
</view>