<view class="switch-box">
    <view class="bg" animation="{{animationData}}" />
    <view class="{{checkedItem==index?'active':''}}" wx:for="{{list}}" wx:key="{{item}}" wx:if="{{index<2}}" bindtap="changeSwitch">{{item}}</view>
</view>