index.wxml 1.2 KB

123456789101112131415161718
  1. <view class="tab-bar {{hidden ? 'tab-bar-hidden' : ''}}">
  2. <image class="tab-bar-bg" src="/static/images/custom-tab-bar/bg.png" mode="widthFix" />
  3. <view class="tab-bar-main">
  4. <view wx:for="{{tabs}}" wx:key="index" class="tab-bar-item" data-path="{{item.path}}" data-index="{{index}}" bindtap="switchTab">
  5. <block wx:if="{{index === 1}}">
  6. <image class="image image-big" src="/static/images/custom-tab-bar/2.png"></image>
  7. <image class="image" style="opacity: 0;" src="/static/images/custom-tab-bar/2.png"></image>
  8. <view class="text {{tabIndex === index ? 'selected-color' : ''}}">{{item.text}}</view>
  9. </block>
  10. <block wx:else>
  11. <image wx:if="{{tabIndex === index}}" class="image" src="/static/images/custom-tab-bar/{{index+1}}-1.png"></image>
  12. <image wx:else class="image" src="/static/images/custom-tab-bar/{{index+1}}.png" mode="widthFix" />
  13. <view class="text {{tabIndex === index ? 'selected-color' : ''}}">{{item.text}}</view>
  14. </block>
  15. </view>
  16. </view>
  17. <button class="tab-bar-login" wx:if="{{!token}}" style="width: 100vw;height: var(--tab-bar-height);border: none;" open-type="getPhoneNumber" bindgetphonenumber="login"></button>
  18. </view>