| 1234567891011121314151617181920212223242526272829303132333435 |
- <view class="banner relative overflow-hidden rounded-2xl border border-[#d1aa58] bg-[#7a2f27]">
- <swiper
- class="banner__swiper"
- circular
- autoplay
- interval="{{4200}}"
- duration="{{450}}"
- current="{{current}}"
- bindchange="onChange"
- >
- <swiper-item wx:for="{{list}}" wx:key="id">
- <view class="relative w-full h-full">
- <image class="w-full h-full" src="{{item.image}}" mode="aspectFill" />
- <view wx:if="{{item.tag}}" class="absolute top-3 right-3 rounded-full bg-[#f6e2aa]/90 px-2 py-1 text-xs font-semibold text-[#873325]">{{item.tag}}</view>
- <view wx:if="{{item.subtitle}}" class="absolute inset-x-4 bottom-4 text-white">
- <view class="mt-1 text-sm text-[#f7e9d2]">{{item.subtitle}}</view>
- </view>
- </view>
- </swiper-item>
- </swiper>
- <view class="absolute left-2 top-1/2 -translate-y-1/2 w-7 h-7 rounded-full bg-black/20 text-white flex items-center justify-center" bindtap="onPrev">
- <svg-icon name="solar:alt-arrow-left-linear" size="16px" color="#ffffff" />
- </view>
- <view class="absolute right-2 top-1/2 -translate-y-1/2 w-7 h-7 rounded-full bg-black/20 text-white flex items-center justify-center" bindtap="onNext">
- <svg-icon name="solar:alt-arrow-right-linear" size="16px" color="#ffffff" />
- </view>
- <view class="absolute bottom-3 right-4 flex gap-1.5">
- <view
- wx:for="{{list}}"
- wx:key="index"
- class="{{current === index ? 'w-4 h-1.5 bg-[#f8dc99]' : 'w-1.5 h-1.5 bg-white/65'}} rounded-full"
- ></view>
- </view>
- </view>
|